You are on page 1of 48

Chapter 10

Hypothesis Testing Using


a Single Sample
Sharing prescription drugs with others can
be dangerous. Is this a common
occurrence among teens?
How do we answers questions
OR like these using sample data?

The National Association of Colleges and


In Chapter
Employers 9, wethat
stated usedthe
sample datastarting
average to
In this chapter,
estimate we will
the value use sample data
of an unknown
salary for
to test some students
claim orgraduating
hypothesiswith a bachelor’s
about
population characteristic.
degree
the in 2010characteristic
population is $48,351. Istothis
seetrue
if for
your college?it is plausible.
To do this, we use a test of hypotheses
or test procedure.
What is a test of hypotheses?
A test of hypotheses is a method that
uses sample data to decide between two
competing claims (hypotheses) about the
population characteristic.
Hypothesis statements:
The null hypothesis, denoted byYouHare
0, is a
usually
trying to
claim about a population characteristic
determine if
that is initially assumed to be true.
this claim is
The hypothesis statements are ALWAYS
about the population believable.
– NEVER about a sample!
The alternative hypothesis, denoted by
Ha, is the competing claim.
To determine what the alternative
hypothesis should be, you need to keep the
research objectives in mind.
Let’s consider a murder trial . . .
To determine which hypothesis is
What is the
correct, null
the jury will listen to the You are trying to
hypothesis?
So we
evidence. Only will make
if there one This
is “evidence is what you
ofdetermine
two if the
Hbeyond
0: the adefendant would assume
is innocent
reasonable decisions:
doubt” is true
evidence
the null hypothesis be rejected in before you begin.
supports this
favor of the alternative hypothesis. claim.
• Reject the null hypothesis
What is the
• Fail alternative
to reject
If there hypothesis?
is not the null hypothesis
convincing evidence, then
we would “fail to reject” the null
Ha: the hypothesis.
defendantRemember
is guilty that the actually
verdict that is returned is “GUILTY” or
“NOT GUILTY”. We never end up
determining the null hypothesis is true –
only that there is not enough evidence to
say it’s not true.
The Form of Hypotheses:
Null hypothesis
H0: population characteristic = hypothesized value
This one is considered a
two-tailed test because
you are interested
Alternative hypothesisin both
The null hypothesis always
direction.
Ha: population includes the equal
characteristic case.
> hypothesized value
This hypothesized
Ha: population characteristic valuevalue
< hypothesized is
a specific number
Ha: population characteristic ≠ hypothesized
This
determined is the value
signby
Notice
These are that the alternative
considered one-determined
context of theby the
problem
hypothesis
tailed tests usesyou
because the same
context of the
population Let’s practice
characteristic
are only interested in one and writing
the
same hypothesized value asproblem.
the
hypothesis statements.
direction.
null hypothesis.
Sharing prescription drugs with others can be
dangerous. A survey of a representative sample
of 592 U.S. teens age 12 to 17 reported that 118
of those surveyed admitted to having shared a
prescription drug with a friend. Is this sufficient
evidence that more than 10% of teens have
shared prescription medication with friends?

State the hypotheses : What is the


What words indicate
What the
is the population
hypothesized
direction of theThe
characteristic
value?ofp of
H : p = .1
alternative hypothesis?
true proportion
0 teensinterest?
who have shared
prescription medication
Ha: p > .1 with friends
Compact florescent (cfl) lightbulbs are
much more energy efficient than regular
incandescent lightbulbs. Ecobulb brand
60-watt cfl lightbulbs state on the package
“Average life 8000 hours”. People who purchase
this brand would be unhappy if the bulbs lasted
less than 8000 hours. A sample of these bulbs
will be selected and tested.
What is the
StateWhat
the words
hypotheses
indicate: theis the
What population
hypothesized
direction of thecharacteristic of
value?
H : m alternative
0 = 8000 hypothesis?interest?
The true mean (m) life of
the cfl lightbulbs
Ha: m < 8000
Because in variation of the manufacturing
process, tennis balls produced by a particular
machine do not have the same diameters.
Suppose the machine was initially calibrated to
achieve the specification of m = 3 inches.
However, the manager is now concerned that the
diameters no longer conform to this specification.
If the mean diameter is not 3 inches, production
will have to be halted.
State the hypotheses :
What words indicateWhat
the is the population
direction
H0: m =of3 the characteristic of
The true mean m
alternative hypothesis? diameter
interest?
of tennis
Ha: m ≠ 3 balls
For each pair of hypotheses, indicate which are
Must useand
not legitimate a population characteristic - x
explain why
is a statistics (sample)
a) H0 : m  15 ; Ha : m  15

b) H0 : xMust
 4be
; Honly
a : xgreater
 15 than!

Must use same


c) H0number
: p  .1as; H a :
in H0!
p  .1

d) H0 :Hm0 MUST
 2.3 ;be
Ha“=“
: m!  3.2

e) H0 : p  .5 ; Ha : p  .5
When you perform a hypothesis
test you make a decision:

reject H0 or fail to reject H0

Each could possibly


When beyoua make
wrongone of
these decisions, there is
decision; therefore, there are
a possibility thattwo
you
types of errors. could be wrong!
That you made an error!
Type I error
• The error of rejecting H0 when H0 is
true

• The probability of a Type I error is


denoted by a.
a is called the significance level of the
This is the lower-case
test Greek letter “alpha”.
Type II error

• The error of failing to reject H0


when H0 is false

• The probability of a Type II error


is denoted by b

This is the lower-case


Greek letter “beta”.
Here is another way to look at the
types of errors:
Suppose
Suppose
Suppose H0H
H is is
true
Suppose 0H is
00
true
is
andand
false wereject
weand
false andfail to
wewefail
it,
reject
toreject
what it,
rejecttype
it, what
it,what
what
of H0 is H0 is
type of decision
decision
type
typedecision
was
of
of
was
was
decision
made?
made?
made?
made?
was
true false
Reject Type I Correct
H0 error
Fail to
Type II
reject Correct
error
H0
The U.S. Bureau of Transportation Statistics
reports that for 2009 72% of all domestic
passenger flights arrived on time (meaning within
15 minutes of its scheduled arrival time). Suppose
that an airline with a poor on-time record decides
to offer its employees a bonus if, in an upcoming
month, the airline’s proportion of on-time flights
exceeds the overall 2009 industry rate of .72.
State the hypotheses. Type I error – the airline
H0: p = .72 State a decides
Type Ito reward the
error
in employees when the
context.
H : p > .72
a proportion of on-time
flights doesn’t exceeds .72
State a Type II error
Type II error – the airline
in context.
employees do not receive the
bonus when they deserve it.
The relationship between a and b

The ideal test procedure would result in both


Selecting a of
a = 0 (probability significance level aand
a Type I error) = .05
b=0
results inof
(probability a test
a Typeprocedure that, used over
II error).
and over with different samples, rejects a
This isSo
impossible
why
truenot to achieve
H0always
about since
choose
5 times we must
ainsmall
100. a base
our decision(like a = .05data.
on sample or a = .01)?

Standard test procedures allow us to select a,


the significance level of the test, but we have no
direct control over b.
How does one decide what a
level to use?
After assessing the consequences of
type I and type II errors, identify the
largest a that is tolerable for the
problem. Then employ a test procedure
that uses this maximum acceptable value
–rather than anything smaller – as the
level of significance.

Remember, using a smaller a increases b.


The EPA has adopted what is known as the Lead and
Copper Rule, which defines drinking water as unsafe if the
concentration of lead is 15 parts per billion (ppb) or
greater or if the concentration of copper is 1.3 ppb or
greater.
The manager of aState
Which aa Type
type of
community
State errorIII
water
Type error
has inmight
incontext.
a more
system
error serious
use lead
context.
level measurements
Since most from aconsequence?
people sample
wouldof water specimens
consider theI? to
What
What is
test the following
is a consequence
a consequence
hypotheses:
of a Type
ofIaerror
Type II?
consequence of the Type
more serious,
H0: m = 15we would
versus Hawant
: m < 15to keep
smallto
a leads
A Type I error – so
theselect a smaller
conclusion that a water source
meets EPA standards when the
significance water
level of ais=really
.01. unsafe.
There are possible health risks to the community
A Type II error leads to the conclusion that a
water source does NOT meet EPA standards
when the water is really safe.
The community might lose a good water source.
Large-Sample Hypothesis Test
for a Population Proportion
The fundamental idea behind hypothesis
testing is:

We reject H0 if the observed sample is very


unlikely to occur if H0 is true.
Recall the General Properties for
Sampling Distributions of p
These three properties imply that the standardized
variable pˆ  p
m p
1. ˆ
p
z 
p 1  p 
n
As long normal
as the distribution
sample size is
p (1  p )standard
has an approximately
2.  pˆn is
when  large. less than 10% of the population
n
3. When n is large, the sampling
distribution of p is approximately
normal.
In June 2006, an Associated Press survey
was conducted to investigate how people
use the nutritional information provided
on food packages. Interviews were
conducted with 1003 randomly selected
adult Americans, and each participant was
asked a series of questions, including the following two:
Based on these data, is it reasonable to
Question 1: When
conclude purchasing
that packaged
a majority food,Americans
of adult how often do
you check thecheck
frequently nutritional labeling on
nutritional the package?
labels when
purchasing
Question 2: How packaged
often do you purchasefoods?
food that is bad
for you, even after you’ve checked the nutrition
labels?
It was reported that 582 responded “frequently” to the
question about checking labels and 441 responded “very
often” or “somewhat often” to the question about
purchasing bad foods even after checking the labels.
Nutritional Labels Continued . . .
H0: p = .5
Ha:We
p > .5
will create a test statistic using:
p = true proportion of adult
pˆ  p Americans who
frequently checkz  nutritional labels
p 1  p 
n
We use p > .5 to test for a majority
582
pˆ 
of adult Americans
For this sample: .58 frequently
who
1003
check nutritional labels.
A test statistic indicates how many standard
This observed
deviations thesample
sampleproportion is is
statistic (p) greater than
from the
.5..58
Isit.5plausible
population a characteristic
sample proportion (p). of p = .58
z occurred
  5a.08
as result of chance variation, or is it
.5.5
unusual to observe a sample proportion this large
1003
when p = .5?
Nutritional Labels Continued . . .
H0: p = .5
Ha: p > .5
p = true proportion of adult Americans who
frequently
NextIn check
we the nutritional
findstandard labels
normal
the P-value for curve,
this seeing
a value
testofstatistic.
5.08 or larger is unlikely.
It’s probability
582 is approximately 0.
For this sample: pˆ   .58
1003

The
.58P-value
 .5 is the probability of obtaining
Since the P-value a we
is so small,
z   5.08 reject H0. There is convincing
test.5statistic
.5 at least as inconsistent with H0
as was observed, evidence
assumingto suggest
H is that the
true.
1003 0
majority of adult Americans
frequently check the nutritional
P-value ≈ 0 labels on packaged0foods.
Computing P-values
The calculation of the P-value depends on the form
of the inequality in the alternative hypothesis.

• Ha: p > hypothesize value

z curve

P-value = area in upper tail

Calculated z
Computing P-values
The calculation of the P-value depends on the form
of the inequality in the alternative hypothesis.

• Ha: p < hypothesize value

z curve

P-value = area in lower tail

Calculated z
Computing P-values
The calculation of the P-value depends on the form
of the inequality in the alternative hypothesis.

• Ha: p ≠ hypothesize value


P-value = sum of area in two tails

z curve

Calculated z and –z
Using P-values to make a decision:
To decide whether or not to reject
H0, we compare the P-value to the
significance level a

If the P-value > a, we “fail to reject”


the null hypothesis.

If the P-value < a, we “reject” the null


hypothesis.
Summary of the Large-Sample z
Test for p
Null hypothesis: H0: p = hypothesized value
Test Statistic: pˆ  p
z 
p (1  P )
n
Alternative Hypothesis: P-value:
Ha: p > hypothesized value Area to the right of calculated z
Ha: p < hypothesized value Area to the left of calculated z
Ha: p ≠ hypothesized value 2(Area to the right of z) of +z
or 2(Area to the left of z) of -z
Summary of the Large-Sample z
Test for p Continued . . .
Assumptions:

1. p is a sample proportion from a random sample

2. The sample size n is large. (np > 10 and


n(1 - p) > 10)

3. If sampling is without replacement, the sample


size is no more than 10% of the population size
A report states that nationwide, 61% of high
school graduates go on to attend a two-year or
four-year college the year after graduation.
Suppose a random sample of 1500 high school
graduates in 2009 from a particular state
estimated the proportion of high school graduates
that attend college the year after graduation to be
58%. Can we reasonably conclude that the
proportion of this state’s high school graduates in
2009 who attended college the year after
graduation is different from the national figure?
Use a = .01.
H0: p = .61 Where p is the proportion of all
State
2009 highthe hypotheses.
school graduates in
Ha: p ≠ .61 this state who attended college
the year after graduation
College Attendance Continued . . .
H0: p = .61 Where p is the proportion of all 2009 high
school graduates in this state who
Ha: p ≠ .61 attended college the year after graduation

Assumptions:
• Given a random sample of 1500 high school
graduates
• Since 1500(.61) > 10 and 1500(.39) > 10, sample
size is large enough.
• Population size is much larger than the sample
size.
College Attendance Continued . . .
H0: p = .61 Where p is the proportion of all 2009 high
school graduates in this state who attended
Ha: p ≠ .61 college the year after graduation

Test statistic: .58  .61


z   2.38
.61(.39)
What potential error could you
1500
have made? Type II
The= area
P-value = 2(.0087) .0174to the left
Useof
a -2.38
= .01 is
approximately .0087
Since P-value > a, we fail to reject H0. The evidence does
not suggest that the proportion of 2009 high
school graduates in this state who attended
college the year after graduation differs from
the national value.
In December 2009, a county-wide water
conservation campaign was conducted in a
particular county. In 2010, a random
sample of 500 homes was selected and water
usage was recorded for each home in the sample.
Suppose the sample results were that 220
households had reduced water consumption. The
county supervisors wanted to know if their data
supported the claim that fewer than half the
households in the county reduced water
consumption.
H0: p = .5 State
where p is the the hypotheses.
proportion of all households in
Calculate
the county with reduced water p.usage
Ha: p < .5
220
pˆ   .44
500
Water Usage Continued . . .

H0: p = .5 where p is the proportion of all households in


Ha: p < .5 the county with reduced water usage

Verify assumptions

1. p is from a random sample of households


2. Sample size n is large because np = 250 >10 and n(1-p) =
250 > 10
3. It is reasonable that there are more than 5000 (10n)
households in the county.
Water Usage Continued . . .

H0: p = .5 where p is the proportion of all households in


Ha: p < .5 the county with reduced water usage

Calculate
Look this the up
value test
in the
.44  .5 statistic
z   2.What
68 potential
table of z and
error P-value
could
curve you
areas
.5(.5) have made? Type I
500

P-value = .0037 Use a = .01

Since P-value < a, we reject H0. There is convincing


evidence that the proportion of households with
reduced water usage is less than half.
Water Usage Continued . . .

H0: p = .5 where p is the proportion of all households in


Ha: p < .5 the county with reduced water usage

Since P-value < a, we reject H0.


Confidence intervals are two-
Used a = .01 Compute
tailed,
With .01 soain
98%
we need
each confidence
to put
tail, that.01
putsin
Notice that the interval:
the upper
.98 tail
in (since
the the –curve is
middle
Let’s create a confidence
symmetrical).
hypothesizedSince
valueweinterval
are is
this testing
the
with
Ha: p < .05, a
appropriate
this
 . data.
44 (.56 ) 
would
of .5 is NOT in the also
.44be  in
2
confidence. the
326 lower
 level tail. 
What is the appropriate  500 
.98
98% confidence  to use? 
confidence level
interval and that we
“rejected” H0!
(.388 , .492 )
.5
College Attendance Revisited . . .
H0: p = .61 Where p is the proportion of all 2009 high
school graduates in this state who attended
Ha: p ≠ .61 college the year after graduation

Since P-value > a, we fail to reject H0.


Use a = .01
Let’s compute
This is a two-tailed a a
test so
Notice that the gets splitconfidence
evenly intointerval for
both tails,
hypothesized value leaving 99% this problem.
in the
.58 (.42) 
middle.
of .5 IS in the 99% .58  2.576  
.99
 1500 
confidence interval
and that we “failed (.547, .613)
to reject” H0!
Hypothesis Tests
for a Population Mean
Let’s review the assumptions for a
confidence interval for a population mean
The assumptions are the same for a
1) x is the large-sample
sample mean from a random
hypothesis testsample,
for a
2) the sample size n population
is large (n mean.
> 30), and
3) , the population standard deviation, is known
or unknown
This
Thisisisthe
thetest
teststatistic
statistic
when
when isisunknown.
known.
x m x m
z  t 
 s
n n
P-value is area under P-value is area under
the z curve the t curve with df=n-1
The One-Sample t-test for a
Population Mean
Null hypothesis: H0: m = hypothesized value
Test Statistic: x m
t 
s
n
Alternative Hypothesis: P-value:
Ha: m > hypothesized value Area to the right of calculated t
with df = n-1
Ha: m < hypothesized value Area to the left of calculated t
with df = n-1
Ha: m ≠ hypothesized value 2(Area to the right of t) of +t
or 2(Area to the left of t) of -t
The One-Sample t-test for a
Population Mean Continued . . .
Assumptions:

1. x and s are the sample mean and sample


standard deviation from a random sample

2. The sample size n is large (n > 30) or the


population distribution is at least approximately
normal.
A study conducted by researchers at Pennsylvania
State University investigated whether time
perception, an indication of a person’s ability to
concentrate, is impaired during nicotine withdrawal.
After a 24-hour smoking abstinence, 20 smokers were
asked to estimate how much time had elapsed during a
45-second period. Researchers wanted to see whether
smoking abstinence had a negative impact on time
perception, causing elapsed time to be overestimated.
Suppose the resulting data on perceived elapsed time
(in seconds) were as follows:
69 65 72 73 59 55 39 52 67 57
56 50 70 47 56 45 70 64 67 53
What is the mean and standard
x = 59.30 s = 9.84 n = 20
deviation of the sample?
Smoking Abstinence Continued . . .
69 65 72 73 59 55 39 52 67 57
56 50 70 47 56 45 70 64 67 53
x = 59.30 s = 9.84 n = 20
H0: m = 45 Where m is the true mean perceived elapsed
time for smokers who haveState
abstained
the from
Ha: m > 45 smoking for 24-hours
Since the boxplot is approximately hypotheses.
Assumptions:
symmetrical, it is plausible that the
1) It is reasonable
population believe thatisthe sampleVerify
todistribution of smokers
To do this, we need to graph the
assumptions.
is representative of all smokers.
approximately normal.
data using a boxplot or normal
2) Since the sample size is probability
not plot
at least 30, we must
determine if it is plausible
that the population
distribution is approximately 40 50 60 70
normal.
Smoking Abstinence Continued . . .
69 65 72 73 59 55 39 52 67 57
56 50 70 47 56 45 70 64 67 53
x = 59.30 s = 9.84 n = 20
H0: m = 45 Where m is the true mean perceived elapsed
time for smokers whoCompute
have abstained from
the test
Ha: m > 45 smoking for 24-hours
statistic and P-value.
Test statistic: 59.30  45
t   6.50
9.84
20
P-value ≈ 0 a = .05

Since P-value < a, we reject H0. There is convincing


evidence that the mean perceived elapsed time is
greater than the actual elapsed time of 45 seconds.
Smoking Abstinence Continued . . .
69 65 72 73 59 55 39 52 67 57
56 50 70 47 56 45 70 64 67 53
x = 59.30 s = 9.84 n = 20
Where m isCompute
the true the appropriate
mean perceived elapsed
H0: m = 45
confidence
time for smokers who have interval.
abstained from
Ha: m > 45 smoking for 24-hours

Since P-value < a, we reject H0.


Notice that the
a = .05
hypothesized value  9.84  
of 45 is NOT in the 59 .30  1 . 729
 20 
90% confidence
Since this is a one-tailed
(55.497test, a )
, 63.103
interval
goes inand
thethat
upperwetail. .05 goes in
“rejected” H0! leaving .90 in the
the lower tail,
middle.
A growing concern of employers is time spent in activities
like surfing the Internet and emailing friends during work
hours. The San Luis Obispo Tribune summarized the
findings of a large survey of workers in an article that
ran under the headline “Who Goofs Off More than 2
Hours a Day? Most Workers, Survey Says” (August 3,
2006). Suppose that the CEO of a large company wants
to determine whether the average amount of wasted time
during an 8-hour day for employees of her company is less
than the reported 120 minutes. Each person in a random
sample of 10 employees was contrasted and asked about
daily wasted time at work. The resulting data are the
following:
108 112 117 130 111 131 113 113 105 128
What is the mean and standard
x = 116.80 s = 9.45 n = 10
deviation of the sample?
Surfing Internet Continued . . .
108 112 117 130 111 131 113 113 105 128

x = 116.80 s = 9.45 n = 10
H0: m = 120 Where m is the true mean daily wasted
Ha: m < 120 time for employees of this company

The boxplot reveals some skewness, State the


Verify the
Assumptions:
but there is no outliers. It is plausible
hypotheses.
assumptions.
that the population distribution is
1) The given sample was a random sample of employees
approximately normal.
2) Since the sample size is not
at least 30, we must
determine if it is plausible
that the population 110 120 130
distribution is approximately
normal.
Surfing Internet Continued . . .
108 112 117 130 111 131 113 113 105 128
x = 116.80 s = 9.45 n = 10
H0: m = 120 Where m is the true mean daily wasted
Ha: m < 120 time for employees of this company

.80 Compute
116potential
What the
120 error testwe
could
Test Statistic: thave
 statistic
9made?
.45
1.07
 and
TypeP-value.
II
10
P-value =.150 a = .05

Since p-value > a, we fail to reject H0. There is not


sufficient evidence to conclude that the mean daily
wasted time for employees of this company is less than
120 minutes.

You might also like