Professional Documents
Culture Documents
Hypothesis Testing
with Two Samples
§ 8.1
Testing the Difference
Between Means
(Large Independent
Samples)
Two Sample Hypothesis Testing
In a two-sample hypothesis test, two parameters from two
populations are compared.
and
σ 12 σ 22
σ x x σ x2 σ x2 .
1 2 1 2
n1 n2
Sampling distribution
for x1 x 2 σ x x
1 2
μ1 μ2 σ x x
1 2
x1 x 2
z
x1 x 2 μ1 μ2
where σ x x
σ 12 σ 22
.
σ x x n 1 n2 1 2
When the samples are large, you can use s1 and s2 in place
1 2
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.
Larson & Farber, Elementary Statistics: Picturing the World, 3e 7
Two Sample z-Test for the Means
Using a Two-Sample z-Test for the Difference Between
Means (Large Independent Samples)
In Words In Symbols
1. State the claim mathematically. State H0 and Ha.
Identify the null and alternative
hypotheses.
2. Specify the level of significance. Identify .
3. Sketch the sampling distribution.
4. Determine the critical value(s). Use Table 4 in
Appendix B.
5. Determine the rejection regions(s).
Continued.
Larson & Farber, Elementary Statistics: Picturing the World, 3e 8
Two Sample z-Test for the Means
Using a Two-Sample z-Test for the Difference Between
Means (Large Independent Samples)
In Words In Symbols
x x 2 μ1 μ2
z 1
6. Find the standardized test σ x x
statistic. 1 2
-3 -2 -1 0 1 2 3
z
z0 = 1.28 Continued.
Larson & Farber, Elementary Statistics: Picturing the World, 3e 10
Two Sample z-Test for the Means
Example continued:
H0: 1 2 z0 = 1.28
Ha: 1 > 2 (Claim) z
-3 -2 -1 0 1 2 3
t
x1 x 2 μ1 μ2 .
σ x x
1 2
σˆ
n1 1 s12 n2 1 s 22
n1 n2 2 Continued.
Larson & Farber, Elementary Statistics: Picturing the World, 3e 14
Two Sample t-Test
Two-Sample t-Test (Continued)
The standard error for the sampling distribution of
x1 is
x2
σ x x σˆ 1 1 Variances equal
1 2
n1 n2
and d.f.= n1 + n2 – 2.
and d.f =
Yes No n1 + n2 – 2.
Use the z-test. Use the t-test with
s12 s 22
σ x x
1 2
n1 n2
and d.f = smaller of n1 – 1 or
n2 – 1.
Larson & Farber, Elementary Statistics: Picturing the World, 3e 16
Two Sample t-Test for the Means
Using a Two-Sample t-Test for the Difference Between
Means (Small Independent Samples)
In Words In Symbols
1. State the claim mathematically. State H0 and Ha.
Identify the null and alternative
hypotheses.
2. Specify the level of significance. Identify .
3. Identify the degrees of freedom d.f. = n1+ n2 – 2 or
and sketch the sampling d.f. = smaller of n1 – 1
distribution. or n2 – 1.
t
d.f. = n1 + n2 – 2 -3 -2 -1 0 1 2 3
t0 = 2.576
–t0 = –2.576
= 17 + 18 – 2 = 33 Continued.
Larson & Farber, Elementary Statistics: Picturing the World, 3e 19
Two Sample t-Test for the Means
Example continued:
H0: 1 = 2
Ha: 1 2 (Claim) -3 -2 -1 0 1 2 3
t
–t0 = –2.576 t0 = 2.576
σ x x σˆ 1
1
n1 1 s12 n2 1 s 22 1
1
1 2
n1 n2 n1 n2 2 n1 n2
17 1 78002 18 1 73752 1 1
17 18 2 17 18
7584.0355(0.3382)
2564.92 Continued.
Larson & Farber, Elementary Statistics: Picturing the World, 3e 20
Two Sample t-Test for the Means
Example continued:
H0: 1 = 2
Ha: 1 2 (Claim) -3 -2 -1 0 1 2 3
t
–t0 = –2.576 t0 = 2.576
t
x1 x 2 μ1 μ2 35800 35100 0
0.273
σ x x
1 2
2564.92
Fail to reject H0.
d
–t 0 μd t0
Symbol Description
n The number of pairs of data
d The difference between entries for a data pair, d = x1 – x2
μd The hypothesized mean of the differences of paired data
in the population
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
n(d 2 ) d
2
sd
n(n 1)
Larson & Farber, Elementary Statistics: Picturing the World, 3e 27
t-Test for the Difference Between Means
t-Test for the Difference Between Means
A t-test can be used to test the difference of two population
means when a sample is randomly selected from each
population. The requirements for performing the test are that
each population must be normal and each member of the first
sample must be paired with a member of the second sample.
The test statistic is
d d
n
and the standardized test statistic is
d μd
t .
sd n
The degrees of freedom are
d.f. = n – 1.
Larson & Farber, Elementary Statistics: Picturing the World, 3e 28
t-Test for the Difference Between Means
Using the t-Test for the Difference Between Means
(Dependent Samples)
In Words In Symbols
1. State the claim mathematically. State H0 and Ha.
Identify the null and alternative
hypotheses.
2. Specify the level of significance. Identify .
3. Identify the degrees of freedom d.f. = n – 1
and sketch the sampling
distribution.
4. Determine the critical value(s). Use Table 5 in
Appendix B.
Continued.
Larson & Farber, Elementary Statistics: Picturing the World, 3e 29
t-Test for the Difference Between Means
Using a Two-Sample t-Test for the Difference Between
Means (Small Independent Samples)
In Words In Symbols
5. Determine the rejection region(s).
6. Calculate d and sd . Use a table. d d
n
n(d 2 ) (d )2
sd
n(n 1)
d μd
7. Find the standardized test statistic. t
sd n
d d 43 7.167
n 6
σ pˆ pˆ pq 1 1 , where q 1 p.
1 2
n1 n21
In Words In Symbols
6. Find the standardized test statistic. ( pˆ1 pˆ 2 ) ( p1 p2 )
z
pq 1 1
n1 n2
H 0: p 1 p 2 = 0.01
Continued.
Larson & Farber, Elementary Statistics: Picturing the World, 3e 42
Two Sample z-Test for Proportions
Example continued:
H 0 : p1 p2
Ha: p1 < p2 (Claim) z
-3 -2 -1 0 1 2 3
z0 = 2.33