Chap11 Two Sample Test BBA 2K3
Chap11 Two Sample Test BBA 2K3
Chapter 11
Two sample Tests of Hypothesis
or Testing for Two Population
Parameters
Chapter Goals
Population
means, Paired Population
independent samples proportions
samples
Examples:
Group 1 vs. Same group Proportion 1 vs.
independent before vs. after Proportion 2
Group 2 treatment
Difference Between Two Means
Independent
Population means,
independent The confidence interval for
samples μ1 – μ2 is:
*
x
σ1 and σ2 known 2 2
σ σ
1 x 2 z/2 1
2
σ1 and σ2 unknown n1 n2
but assumed equal
σ1 and σ2 unknown,
not assumed equal
σ1 and σ2 unknown
Population means,
independent
Forming interval estimates:
samples
The population standard
deviations are assumed equal,
σ1 and σ2 known so use the two sample
standard deviations and pool
σ1 and σ2 unknown
but assumed equal
* them to estimate σ
σ1 and σ2 known
sp
n1 1s12 n2 1s22
σ1 and σ2 unknown
but assumed equal
* n1 n2 2
σ1 and σ2 unknown,
not assumed equal
σ1 and σ2 unknown
(continued)
σ1 and σ2 known x 1
x 2 t /2 sp
1 1
n1 n2
σ1 and σ2 unknown
but assumed equal
* Where t/2 has (n1 + n2 – 2) d.f.,
and
σ1 and σ2 unknown,
sp
n1 1s12 n2 1s22
not assumed equal n1 n2 2
σ1 and σ2 unknown
σ1 and σ2 unknown,
not assumed equal
* df
(s12 /n1 s22 /n2 )2
s2 /n 2 s2 /n 2
1 1 2 2
n1 1 n2 1
σ1 and σ2 unknown
(continued)
σ1 and σ2 known x 1
x 2 t α/2
s12 s22
n1 n2
σ1 and σ2 unknown
but assumed equal Where t/2 has d.f. given by
σ1 and σ2 unknown,
not assumed equal
* df
(s12 /n1 s22 /n2 )2
s2 /n 2 s2 /n 2
1 1 2 2
n1 1 n2 1
Hypothesis Tests for the
Difference Between Two Means
Population means,
independent The test statistic for
samples μ1 – μ2 is:
σ1 and σ2 known * z
x 1
x 2 μ1 μ2
2 2
σ1 and σ2 unknown σ σ2
but assumed equal
1
n1 n2
σ1 and σ2 unknown,
not assumed equal
σ1 and σ2 unknown,
large samples
Population means,
The test statistic for
independent μ1 – μ2 is:
samples
t
x 1
x 2 μ1 μ2
σ1 and σ2 known
1 1
sp
σ1 and σ2 unknown
but assumed equal
* n1 n2
Where t has (n1 + n2 – 2) d.f.,
σ1 and σ2 unknown,
not assumed equal
* df
(s12 /n1 s22 /n2 )2
s2 /n 2 s2 /n 2
1 1 2 2
n1 1 n2 1
Hypothesis tests for μ1 – μ2
/2 /2
t
x 1
x 2 μ1 μ2 3.27 2.53 0
2.040
1 1 1 1
sp 1.2256
n1 n2 21 25
Where:
sp
n1 1s12 n2 1s2 2
21 11.30 2 25 11.16 2 1.2256
n1 n2 2 21 25 2
Solution
Reject H0 Reject H0
H0: μ1 - μ2 = 0 i.e. (μ1 = μ2)
HA: μ1 - μ2 ≠ 0 i.e. (μ1 ≠ μ2) .025 .025
= 0.05
-2.0154 0 2.0154 t
df = 21 + 25 - 2 = 44
Critical Values: t = ± 2.0154 2.040
n
The sample standard
deviation is i
(d d) 2
sd i1
n 1
n is the number of pairs in the paired sample
Paired Differences
(continued)
sd i1
n 1
n is the number of pairs in the paired sample
Hypothesis Testing for
Paired Samples
The test statistic for d is
Paired
samples
d μd
t
sd
n
n is the
number n
of pairs
in the
Where t has n - 1 d.f. i
(d d) 2
/2 /2
-21
n 1
5.67
Paired Samples: Solution
Has the training made a difference in the number of
complaints (at the 0.05 level)?
Reject Reject
H0: μd = 0
HA: μd 0 /2
/2
= .05 d = - 4.2 - 2.7765 2.7765
- 1.66
Critical Value = ± 2.7765
d.f. = n - 1 = 4 Decision: Do not reject H0
(t stat is not in the reject region)
Test Statistic:
Conclusion: There is not a
d μd 4.2 0
t 1.66 significant change in the
s d / n 5.67/ 5 number of complaints.
Two Population Proportions
p1(1 p1 ) p 2 (1 p 2 )
p1 p2 z
n1 n2
Hypothesis Tests for
Two Population Proportions
Population proportions
n1p1 n2p 2 x1 x 2
p
n1 n2 n1 n2
where x1 and x2 are the numbers from
samples 1 and 2 with the characteristic of interest
Two Population Proportions
(continued)
z
p1 p2 π1 π 2
1 1
p (1 p )
n1 n2
Hypothesis Tests for
Two Population Proportions
Population proportions
Lower tail test: Upper tail test: Two-tailed test:
H0: π1 – π2 0 H0: π1 – π2 ≤ 0 H0: π1 – π2 = 0
HA: π1 – π2 < 0 HA: π1 – π2 > 0 HA: π1 – π2 ≠ 0
/2 /2
.50 .62 0 1.31
1 1 Decision: Do not reject H0
.549 (1 .549)
72 50
Conclusion: There is not
significant evidence of a
Critical Values = ±1.96
For = .05 difference in the proportion
who will vote yes between
men and women.
Chapter Summary
Compared two independent samples
Formed confidence intervals for the differences between two
means
Performed z test for the differences in two means
Performed t test for the differences in two means
Compared two related samples (paired samples)
Formed confidence intervals for the paired difference
Performed paired sample t tests for the mean difference
Compared two population proportions
Formed confidence intervals for the difference between two
population proportions
Performed z test for two population proportions