Hypothesis Testing
Hypothesis Testing
Hypothesis Testing
Hypothesis Testing
with Two Samples
8.1
Testing the
Difference Between
Means
(Large
Independent
Samples)
H0: 1 2
Ha: 1 > 2
Ha: 1 < 2
H0: 1
and
x x
1
2
2
x2 x2 1 2 .
n1 n2
1
Sampling distribution
for x1 x2
x x
1
1 2
2
x x
1
x1 x2
2
1
2
z is1
where x x 1 2 .
statistic
x x
n1 n2
1
Identify .
Use Table 4 in
Appendix B.
Continued.
8
x1 x2 1
If z is in the
rejection region,
reject H0.
Otherwise, fail to
reject H0.
x x
1
Example:
A high school math teacher claims that students in
her class will score higher on the math portion of the
ACT than students in a colleagues math class. The
mean ACT math score for 49 students in her class is
22.1 and the standard deviation is 4.8. The mean
ACT math score for 44 of the colleagues students is
19.8 and the standard deviation is 5.4. At = 0.10,
can the teachers claim be supported?
H0: 1 2
=
0.10
-1
z0 = 1.28
Larson & Farber, Elementary Statistics: Picturing the World, 3e
Continued.
10
Example continued:
H0: 1 2
Ha: 1 > 2 (Claim)
z0 = 1.28
-3 -2
-1
2
2
12 22
4.8
5.4
1.0644.
n1 n2
49
44
Reject H0.
2 1
z
x x
1
22.1 19.8 0
2.161
1.0644
11
8.2
Testing the
Difference Between
Means
(Small
Independent
Samples)
13
2 should
t
.
standardized test
x xstatistic is
1
.
If the population variances
are equal, then information
from the two
samples is combined to calculate a pooled
n1 1 s12 n2 1 s22
Continued.
14
Variances equal
n n
1
and d.f.= n1 + n2 2.
If the population variances are not equal, then the standard
error is
s12 s22
x x
15
Normal or t-Distribution?
Are both sample sizes
at least 30?
Yes
No
No
Yes
No
Yes
n1 + n2 2.
s12 s22
n1 n2
16
Identify .
d.f. = n1+ n2 2 or
d.f. = smaller of n1
1 or n2 1.
Use Table 5 in
Appendix B.
Continued.
17
x1 x2 1
x x
1
If t is in the
rejection region,
reject H0.
Otherwise, fail to
reject H0.
18
Example:
A random sample of 17 police officers in Brownsville
has a mean annual income of $35,800 and a standard
deviation of $7,800. In Greensville, a random sample
of 18 police officers has a mean annual income of
$35,100 and a standard deviation of $7,375. Test the
claim at = 0.01 that the mean annual incomes in
the two cities are not the same. Assume the
population variances are equal.
H0: 1 = 2
Ha: 1 2 (Claim)
= 0.005
= 0.005
t
-3 -2 -1
0
1
2
3
d.f. = n1 + n2 2
t0 = 2.576
t0 = 2.576
= 17 + 18 2 =
Continued.
33
Larson & Farber, Elementary Statistics: Picturing the World, 3e
19
Example continued:
H0: 1 = 2
Ha: 1 2 (Claim)
-3 -2
-1
t0 = 2.576
t0 = 2.576
1 1
n1 n2
n1 1 s12 n2 1 s22
n1 n2 2
1 1
n1 n2
17 1 78002 18 1 73752
17 18 2
1 1
17 18
7584.0355(0.3382)
2564.92
Larson & Farber, Elementary Statistics: Picturing the World, 3e
Continued.
20
Example continued:
H0: 1 = 2
Ha: 1 2 (Claim)
-3 -2
-1
t0 = 2.576
t0 = 2.576
x1 x
2 1
x x
1
35800 35100 0
2564.92
0.273
21
8.3
Testing the
Difference Between
Means (Dependent
Samples)
Independent
Samples
Dependent Samples
23
Example:
Classify each pair of samples as independent or
dependent.
Sample 1: The weight of 24 students in a first-grade clas
Sample 2: The height of the same 24 students
These samples are dependent because the weight
and height can be paired with respect to each
student.
Sample 1: The average price of 15 new trucks
Sample 2: The average price of 20 used sedans
These samples are independent because it is not
possible to pair the new trucks with the used
sedans. The data represents prices for different
vehicles.Larson & Farber, Elementary Statistics: Picturing the World, 3e
24
d
The test statistic is the mean
of these differences.
Mean of the differences between
d
d
.
paired data entries in the dependent
n
samples.
25
t0
t0
26
Description
n
d
d
sd
n(d 2) d
sd
n(n 1)
27
.
sd
28
Identify .
d.f. = n 1
Use Table 5 in
Appendix B.
Continued.
29
d
n
n(d 2) (d )2
sd
n(n 1)
t
d d
sd n
30
If t is in the
rejection region,
reject H0.
Otherwise, fail to
reject H0.
31
85 96 70 76 81 78
Score (after)
88 85 89 86 92 89
H0: d 0
Ha: d > 0 (Claim)
Larson & Farber, Elementary Statistics: Picturing the World, 3e
Continued.
32
d.f. = 6 1 = 5
=
0.05
3
70
4
76
-3 -2
5
81
-1
6
78
t0 = 2.015
89 86 92 89 d 43
2
1 1 1 1 d 833
9
0
1
1
2 d
43 9 12 36 10 12 12
d
7.167
d
6
n
1
1
0
1
1
n( d 2) ( d )2 6(833) 1849 104.967 10.245
sd
6(5)
n(n 1)
Larson & Farber, Elementary Statistics: Picturing the World, 3e
Continued.
33
-1
sd n 10.245 6
t0 = 2.015
34
8.4
Testing the
Difference Between
Proportions
36
pq
1
1
, where q 1 p.
n1 n21
37
1 1
n
1 n2
wherep x1 x2 and q 1 p.
n1 n2
Note:
n1p, n1q , n2p, and n2q
must be at least 5.
38
x1 x2
p
n1 n2
Continued.
39
In Symbols
z
1 1
n
1 n2
If z is in the
rejection region,
reject H0.
Otherwise, fail to
reject H0.
40
Example:
A recent survey stated that male college students
smoke less than female college students. In a survey
of 1245 male students, 361 said they smoke at least
one pack of cigarettes a day. In a survey of 1065
female students, 341 said they smoke at least one
pack a day. At = 0.01, can you support the claim
that the proportion of male college students who
smoke at least one pack of cigarettes a day is lower
then the proportion of female college students who
smoke at least one pack a day?
=
H0: p1 p2
0.01
-3 -2 -1
z0 = 2.33
Continued.
41
Example continued:
H0: p1 p2
Ha: p1 < p2 (Claim)
-3 -2 -1
z0 = 2.33
x1 x 2 n1p1 n2p2
361 341
702
0.304
n1 n2
n1 n2
1245 1065 2310
q 1 p 1 0.304 0.696
Because 1245(0.304), 1245(0.696), 1065(0.304), and
1065(0.696) are all at least 5, we can use a two-sample ztest.
Continued.
Larson & Farber, Elementary Statistics: Picturing the World, 3e
42
Example continued:
H0: p1 p2
Ha: p1 < p2 (Claim)
z
1 1
n
1 n2
-3 -2 -1
z0 = 2.33
(0.29 0.32) 0
1.56
1
1
(0.304)(0.696)
1245 1065
43