Hypothesis Testing With Two Samples
Hypothesis Testing With Two Samples
Hypothesis Testing
with Two Samples
Solution:
Dependent Samples (The samples can be paired with
respect to each student)
12 22
Standard error: x x x2 x2 n n
1 2 1 2
1 2
Sampling distribution
for x1 x2 :
x1 x2
σ x x 1 2 σ x x
© 2012 Pearson Education, Inc. All rights reserved. 1 2 1 2
12 of 70
Two Sample z-Test for the Difference
Between Means
• Test statistic is x1 x2.
• The standardized test statistic is
z
x1 x2 1 2
where x x
12 22
.
x x 1 2
1 2
n1 n2
• When the samples are large, you can use s1 and s2 in place
of σ1 and σ2. If the samples are not large, you can still use
a two-sample z-test, provided the populations are
normally distributed and the population standard
deviations are known.
sampling distribution.
6. Make a decision to reject or If z is in the rejection
fail to reject the null region, reject H0.
hypothesis. Otherwise, fail to
reject H0.
7. Interpret the decision in the
context of the original claim.
Calculate:
Draw:
–1.25
t
x1 x2 1 2
.
sx x1 2
Teacher 1 Teacher 2
x1 473 x2 459
s1 = 39.7 s2 = 24.5
n1 = 8 n2 = 18
© 2012 Pearson Education, Inc. All rights reserved. 31 of 70
Solution: Two-Sample t-Test for the
Difference Between Means
• Test Statistic:
• H0: μ1 = μ2
• Ha: μ1 ≠ μ2 (claim) (473 459) 0
t 0.922
• α 0.10 39.7 2 24.52
• d.f. = 8 – 1 = 7 8 18
• Rejection Region: • Decision: Fail to Reject H0 .
At the 10% level of significance,
there is not enough evidence to
support the claim that the mean
mathematics test scores for the
students of the two teachers are
t ≈ 0.922
different.
© 2012 Pearson Education, Inc. All rights reserved. 32 of 70
Example: Two-Sample t-Test for the
Difference Between Means
A manufacturer claims that the mean calling range (in feet) of
its 2.4-GHz cordless telephone is greater than that of its
leading competitor. You perform a study using 14 randomly
selected phones from the manufacturer and 16 randomly
selected similar phones from its competitor. The results are
shown below. At α = 0.05, can you support the manufacturer’s
claim? Assume the populations are normally distributed and
the population variances are equal.
Manufacturer Competitor
x1 1275ft x2 1250 ft
s1 = 45 ft s2 = 30 ft
n1 = 14 n2 = 16
© 2012 Pearson Education, Inc. All rights reserved. 33 of 70
Solution: Two-Sample t-Test for the
Difference Between Means
• H0: μ1 ≤ μ2
• Ha: μ1 > μ2 (claim)
• α = 0.05
• d.f. = 14 + 16 – 2 = 28
• Rejection Region:
0.05
t
0 1.701
sx1 x2
1 1 2 2
n 1 s 2
n 1 s 2
1 1
n1 n2 2 n1 n2
x1 x2 1 2 1275 1250 0
t 1.811
sx1 x2 13.8018
d
-t0 μd t0
© 2012 Pearson Education, Inc. All rights reserved. 41 of 70
Symbols used for the t-Test for μd
Symbol Description
n The number of pairs of data
Symbol Description
d The mean of the differences between the paired
data entries in the dependent samples
d
d
n
sd The standard deviation of the differences between
the paired data entries in the dependent samples
2 (d )
2
(d d ) 2 d
sd n
n 1 n 1
(d d ) 2 d
2
sd n
n 1 n 1
d d
5. Find the standardized test t
statistic. sd n
© 2012 Pearson Education, Inc. All rights reserved. 46 of 70
t-Test for the Difference Between Means
(Dependent Samples)
In Words In Symbols
8. Make a decision to reject or If t is in the rejection
fail to reject the null region, reject H0.
hypothesis. Otherwise, fail to
reject H0.
9. Interpret the decision in the
context of the original
claim.
x1 x2 129 148
p 0.7914
n1 n2 150 200
q 1 p 1 0.7914 0.2086
Note:
n1 p 200(0.2086) 5 n1q 200(0.6556) 5
n2 p 200(0.2086) 5 n2q 200(0.6556) 5
z
pˆ1 pˆ 2 p1 p2
0.86 0.74 0
1 1
0.7914 0.2086
1 1
pq
n1 n2 150 200
2.73
0.01
z
–2.33 0
q 1 p 1 0.0731 0.9269
Note:
n1 p 4700(0.0731) 5 n1q 4700(0.9269) 5
n2 p 4300(0.0731) 5 n2q 4300(0.9269) 5