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.
H0: μ1 =
H0: μ1 μ2 H0: μ1 μ2
μ2
Ha: μ1 > μ2 Ha: μ1 < μ2
H a: μ 1 μ 2
μx x μx μx μ1 μ2
1 2 1 2
and
2 2
σ σ
σx x σx2 σx2 1 2 .
1 2 1
n1 n22
Sampling distribution
for x1 x2 σx x
1 2
μ1 μ2 σx x
1 2
x1 x2
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.
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 Identify .
significance.
3. Sketch the sampling Use Table 4 in
distribution. Appendix B.
4. Determine the critical value(s).
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
z
x1 x2 μ1 μ2
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 x2 μ1 μ2
6. Find the standardized test σx x
1 2
statistic.
If t is in the
rejection region,
7. Make a decision to reject or fail reject H0.
to reject the null hypothesis. Otherwise, fail to
reject H0.
8. Interpret the decision in the
context of the& Farber,
Larson original claim.
Elementary Statistics: Picturing the World, 3e 18
Two Sample t-Test for the
Means
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
= 0.005 = 0.005
Ha: 1 2 (Claim)
t
d.f. = n1 + n2 – 2 -3 -2 -1 0 1 2 3
t0 = 2.576
–t0 = –2.576
= 17 + 18 – 2 = Continued.
33 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 s22 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 x2 μ1 μ2 35800 35100 0
σx x 0.273
1 2
2564.92
Fail to reject H0.
There is not enough evidence at the 1% level to
support the claim that the mean annual incomes
differ.
Larson & Farber, Elementary Statistics: Picturing the World, 3e 21
§ 8.3
Testing the
Difference Between
Means (Dependent
Samples)
Independent and Dependent
Samples
Two samples are independent if the sample
selected from one population is not related to the
sample selected from the second population. Two
samples are dependent if each member of one
sample corresponds to a member of the other
sample. Dependent samples are also called paired
samples or matched samples.
d
–t0 μd t0
n( d 2) ( d )2
sd
n(n 1)
d μd
t
sd n
7. Find the standardized test
statistic.
t0 = 2.015
The standardized test statistic is
d μd 7.167 0
t 1.714.
sd n 10.245 6
pq
1 1
σ pˆ pˆ , where q 1 p.
1 2
n1 n21
Note:
wherep x1 x2 and q 1 p. n1p, n1q , n2p, and n2q
n1 n2
must be at least 5.
x1 x2
4. Determine the rejection p
n1 n2
region(s).
Continued.
5. Find the weighted estimate of
Larson & Farber, Elementary Statistics: Picturing the World, 3e 39
Two Sample z-Test for
Proportions
Using a Two-Sample z-Test for the Difference
Between Proportions
In Words In Symbols
6. Find the standardized test z
(pˆ1 pˆ2) (p1 p2)
statistic.
pq
1 1
n1 n2
If z is in the
7. Make a decision to reject or fail rejection region,
to reject the null hypothesis. reject H0.
Otherwise, fail to
8. Interpret the decision in the
reject H0.
context of the original claim.