Hypothesis Testing
C
h
a
p
t
e
r
Tests of Hypotheses
Section 8.1: The Elements of a Test of Hypotheses
Section 8.2: Formulating Hypotheses and Setting Up the
rejection Region
Section 8.3: Test of Hypothesis about a Population Mean:
Normal (z) Statistic
Section 8.4: Observed Significance Levels: p-Values
Section 8.5: Test of a Hypothesis about a Population Mean:
Students t-Statistic
Section 8.6: Large-Sample Test of a Hypothesis about a
Population Proportion
8
2
C
h
a
p
t
e
r
Hypotheses
Hypothesis:
A hypothesis is a statement that something is true.
Example: The statement the mean weight of all bags of
pretzels packaged differs from the advertised weights of
454 grams is a hypothesis.
Statistical Hypothesis:
A statistical hypothesis is a conjecture about a population
parameter.
Hypotheses are always in terms of the parameter (eg., , ,
etc. ) NOT the statistic (eg. x , p , etc.)
C
h
a
p
t
e
r
Terminology
Null Hypothesis ( )
8
4
C
h
a
p
t
e
r
Terminology
Alternative Hypothesis ( or .)
8
5
C
h
a
p
t
e
r
0 : =
(. . 0 : = 21)
where the hypothesized value is a specific number
determined by the problem context.
: >
(e. g. : > 21 )
: <
(. . : < 21 )
:
(. . : 21 )
6
C
h
a
p
t
e
r
0: = 0
: < 0
: 0
: > 0
8
7
C
h
a
p
t
e
r
Identifying Hypotheses
Accidents Involving Teen Drivers
C
h
a
p
t
e
r
Identifying Hypotheses
Accidents Involving Teen Drivers
Let p represent the proportion of accidents involving teenage
drivers.
8
9
C
h
a
p
t
e
r
Identifying Hypotheses
Cholesterol in Children
Cholesterol levels in children is normally distributed
=15
= 190
10
C
h
a
p
t
e
r
Identifying Hypotheses
Cholesterol in Children
8
11
C
h
a
p
t
e
r
Statistical Test
A statistical test is:
a. Left-tailed if 1 states that
the parameter is less than
the value claimed in 0
b. Right-tailed if 1 states that
the parameter is greater
than the value claimed in 0
c. Two-tailed if 1 states that
the parameter is different
from (or not equal to) the
value claimed in 0
12
C
h
a
p
t
e
r
Claim about or
historical value of
: = 0
1 : < 0
1 : > 0
1 : 0
Left-tailed test
Right-tailed test
Two-tailed test
8
13
C
h
a
p
t
e
r
Test Statistic
If the test statistic has
a high probability when
0 is true, then 0 is
not rejected.
C
h
a
p
t
e
r
8
15
C
h
a
p
t
e
r
Courtroom Analogy
Potential Choices and Errors
16
C
h
a
p
t
e
r
8
Courtroom Analogy
Jurys
Decision
Innocent
Guilty
Not Guilty
Correct
Error
Guilty
Worse Error
Correct
17
C
h
a
p
t
e
r
Hypothesis Testing
The reasoning of Hypothesis Testing is Similar
Each test has 4 potential decisions two are
correct decisions, two are errors.
Possible decisions are based on:
the reality about the null hypothesis;
your decision based on the evidence from the sample.
Null Hypothesis is Actually
Your
Decision
True
False
Dont Reject
the Null
Correct
Type II Error
Reject the
Null
Type I Error
Correct
18
C
h
a
p
t
e
r
8
19
C
h
a
p
t
e
r
0 = .4 . : > .4
Type I error: you conclude that the
new treatment is more eective
than the current treatment when it
really isnt.
Type II error: you conclude that the
new treatment is not more
eective than the current
treatment when it really is.
20
C
h
a
p
t
e
r
21
22
C
h
a
p
t
e
r
Tests of Hypotheses
Section 8.1: The Elements of a Test of Hypotheses
Section 8.2: Formulating Hypotheses and Setting Up the
Rejection Region
Section 8.3: Test of Hypothesis about a Population Mean:
Normal (z) Statistic
Section 8.4: Observed Significance Levels: p-Values
Section 8.5: Test of a Hypothesis about a Population Mean:
Students t-Statistic
Section 8.6: Large-Sample Test of a Hypothesis about a
Population Proportion
8
23
C
h
a
p
t
e
r
24
C
h
a
p
t
e
r
Procedure
Label the parameter:
Null Hypothesis
0 : = 0 , a specified value; (in words)
Alternative hypothesis
: > 0 , a specified value; (in words)
C
h
a
p
t
e
r
Procedure
Identify the test and its conditions:
Test
Large sample z-test for
Conditions
A random sample is selected from the target population.
The sample size is large.
26
C
h
a
p
t
e
r
Procedure
Describe the rejection region:
Upper
Tailed
Two tailed
= .10
z - 1.28
z > 1.28
= .05
z - 1.645
z > 1.645
= .01
z - 2.33
z > 2.33
C
h
a
p
t
e
r
Rejection Regions
Example
=.05 (Upper Tailed Test)
8
28
C
h
a
p
t
e
r
Procedure
Calculate the test statistic:
x 0 x 0
zcal
x
/ n
C
h
a
p
t
e
r
H0
Reject
Ha
Support
Reject H0
sufficient
Fail to reject H0
insufficient
30
C
h
a
p
t
e
r
n=100 rats
Sample mean = 1.05 seconds
Standard deviation = .5 second
Control mean = 1.2 seconds
31
C
h
a
p
t
e
r
Hypotheses:
8
32
C
h
a
p
t
e
r
8
33
C
h
a
p
t
e
r
zcal
x 0
x 0 1.05 1.2
3.0
/ n .5 / 100
34
C
h
a
p
t
e
r
Conclusion ???
35
C
h
a
p
t
e
r
0
Reject
Support
Reject 0
sufficient
Fail to reject 0
insufficient
36
C
h
a
p
t
e
r
C
h
a
p
t
e
r
C
h
a
p
t
e
r
Hypotheses:
C
h
a
p
t
e
r
8
40
C
h
a
p
t
e
r
zcal
x 0
x 0
6.5 10
10.58
/ n 8.6 / 676
41
C
h
a
p
t
e
r
42
C
h
a
p
t
e
r
Terminology
The -Value (Short for Probability value)
The probability of obtaining a test statistic from the
sampling distribution that is as extreme or more extreme (as
specified by ) than the observed test statistic (computed
from the sample data) under the assumption that 0 is true.
Calculated instead of the rejection region
Decision based on the -value
8
43
C
h
a
p
t
e
r
8
44
C
h
a
p
t
e
r
8
45
C
h
a
p
t
e
r
: 0 (hypothesized value)
P-value = sum of area in two tails
= P(z - zcal or z zcal) = 2 P(z | zcal |)
8
46
C
h
a
p
t
e
r
8
47
48
C
h
a
p
t
e
r
Tests of Hypotheses
Section 8.1: The Elements of a Test of Hypotheses
Section 8.2: Formulating Hypotheses and Setting Up the
Rejection Region
Section 8.3: Test of Hypothesis about a Population Mean:
Normal (z) Statistic
Section 8.4: Observed Significance Levels: p-Values
Section 8.5: Test of a Hypothesis about a Population Mean:
Students t-Statistic
Section 8.6: Large-Sample Test of a Hypothesis about a
Population Proportion
8
49
C
h
a
p
t
e
r
Hypotheses
Null Hypothesis
0 : = 0 a specified value; (in words)
Alternative Hypothesis
: > 0 a specified value; (in words)
: < 0 a specified value; (in words)
50
C
h
a
p
t
e
r
Required Conditions
The sample was randomly selected from the population of
interest or there is some other indication that it was
representative (implying randomness).
The original population is known to be normal.
Population standard deviation () is unknown.
51
C
h
a
p
t
e
r
Rejection Region
> if upper tailed test (or : > 0 )
< if lower tailed test (or : < 0 )
<
>
s/ n
~ t( n 1) df
52
C
h
a
p
t
e
r
8
53
C
h
a
p
t
e
r
: >
2. Lower-tailed test
: <
3. Two-tailed test
= P (t > tcal)
1. Upper-tailed test
= P (t < tcal)
= 2 *P (t > |tcal|)
Decision Rule
If < , we reject 0
54
C
h
a
p
t
e
r
38.25
40.10
40.50
41.25
39.45
37.00
39.25
38.00
40.75
C
h
a
p
t
e
r
2.
3.
4.
5.
6.
7.
8
56
C
h
a
p
t
e
r
8
57
C
h
a
p
t
e
r
C
h
a
p
t
e
r
df n 1 10 1 9
tcal
x 0 39.18 40.5
2.79
s / n 1.4963 / 10
59
C
h
a
p
t
e
r
OR
p-value = < 2.79 = > 2.79 = ?
8
60
C
h
a
p
t
e
r
8
2.79
61
C
h
a
p
t
e
r
OR
p-value = < 2.79 = > 2.79 = . < <.
8
62
C
h
a
p
t
e
r
64
C
h
a
p
t
e
r
Tests of Hypotheses
Section 8.1: The Elements of a Test of Hypotheses
Section 8.2: Formulating Hypotheses and Setting Up the
Rejection Region
Section 8.3: Test of Hypothesis about a Population Mean:
Normal (z) Statistic
Section 8.4: Observed Significance Levels: p-Values
Section 8.5: Test of a Hypothesis about a Population Mean:
Students t-Statistic
Section 8.6: Large-Sample Test of a Hypothesis about a
Population Proportion
8
65
C
h
a
p
t
e
r
Hypotheses
Null Hypothesis
0 : = 0 a specified value; (in words)
Alternative Hypothesis
: > 0 a specified value; (in words)
: < 0 a specified value; (in words)
66
C
h
a
p
t
e
r
Required Conditions
o Random sample
o The sample size is large
(0 15, and (1 0 ) 15)
Verification of these assumptions makes it reasonable to
assume the approximate normality of the sampling distribution
of sample proportion,. Therefore, we can perform the z-test.
67
C
h
a
p
t
e
r
Rejection Region
> if upper tailed test (or : > 0 )
< if lower tailed test (or : < 0 )
<
>
p p0
N (0,1)
p0 (1 p0 )
n
68
C
h
a
p
t
e
r
8
69
C
h
a
p
t
e
r
Lower-tailed test
= P (z > zcal)
= P (z < zcal)
o : <
Two-tailed test
o :
= 2 *P (z > |zcal |)
Decision Rule
If < , we reject 0
70
C
h
a
p
t
e
r
C
h
a
p
t
e
r
Hypotheses:
o 0 : = 0.07; the proportion of accidents involving
teenage drivers is equal to the proportion of teens in the
driving population.
o : 0.07; the proportion of accidents involving
teenage drivers is not equal to the proportion of teens in
the driving population.
8
72
C
h
a
p
t
e
r
Conditions:
o The sample was a random sample of all accidents.
o 0 = 500 0.07 = 35 > 15, and
o 1 0 = 500 0.93 = 465 > 15
8
73
C
h
a
p
t
e
r
Rejection Region
< 1.96 or > 1.96
p p0
p0 (1 p0 )
n
.14 .07
6.13
.07 (1 .07 )
500
74
C
h
a
p
t
e
r
OR
= 2 ( > )
= 2 > 6.13
20
=0
75
C
h
a
p
t
e
r