Professional Documents
Culture Documents
Statistical Inference
for Two Samples
CHAPTER OUTLINE
1
Chapter 10: Statistical Inference for Two Samples
LEARNING OBJECTIVES
10.1 Inference on the Difference in Means of Two
Normal Distributions, Variance Known
10.2 Inference on the Difference in Means of Two
Normal Distributions, Variance Unknown
10.6 Inference on the Two Proportions
10.1. Inference on the Difference
in Means of Two Normal
Distributions, Variance Known
Assumptions for Two-Sample Inference
(1) X11, X12, … , X1n1 is a random sample from population 1.
(2) X21, X22, … , X2n2 is a random sample from population 2.
(3) The two populations represented by X1 and X2 are
independent.
(4) Both populations are normal.
Tests on the Difference in Means, Var(X) known
X1 X 2 0
Z0
12 22
n1 n2
σ2 known TEST ON THE μ OF NORMDIST: σ2 KNOWN
Example 2
A product developer is interested in reducing the drying time of a
primer paint. Two formulations of the paint are tested; formulation 1
is the standard chemistry, and formulation 2 has a new drying
ingredient that should reduce the drying time. From experience, it is
known that the standard deviation of drying time is 8 minutes, and
this inherent variability should be unaffected by the addition of the
new ingredient. Ten specimens are painted with formulation 1, and
another 10 specimens are painted with formulation 2; the 20
specimens are painted in random order. The two sample average
drying times are x1 121 minutes and x2 112 minutes, respectively.
What conclusions can the product developer draw about the
effectiveness of the new ingredient, using α = 0.05?
Example 2 σ2 known
1. Parameter of interest: The quantity of interest is the difference in
mean drying times, μ1 - μ2, and Δ0 = 0. We have
12 22 82 ; n1 n2 10; x1 121; x2 112; z 1.645
20/07/22
Sample Siz for a two-sided test
For the two-sided alternative hypothesis with significance level α, the
sample size n1 = n2 = n required to detect a true difference in means
of Δ with power at least 1 - β is
2
z /2 z 12 22
n
0
2
X1 X 2 0
T0
1 1
sp
n1 n2
Example
Two catalysts are being analyzed to determine how they affect the
mean yield of a chemical process. Specifically, catalyst 1 is currently
used; but catalyst 2 is acceptable. Because catalyst 2 is cheaper, it
should be adopted, if it does not change the process yield. A test is run
in the pilot plant and results in the data shown in Table 10.1. Is there
any difference in the mean yields? Use α = 0.05, and assume equal
variances.
Observation 1 2 3 4 5 6 7 8
Number
3. Test statistic:
n 1 s 2
n 1 s 2
7 2.392 7 2.982
2 1 1 2 2
sp 7.3
n1 n2 2 882
x1 x2 0 92.255 92.733
t0 0.35
sp 1/ n1 1/ n2 7.3 1/ 8 1/ 8
4. Conclusion: Because |t0| = 0.35 < 2.145, the P-value is
P = 2(1 - Φ(0.35)) = 0.7269. Therefore, because the P-value exceeds
α = 0.05, the null hypothesis cannot be rejected H0.
2 2
Case 2: 1 2
* X1 X 2 0
T
0
s12 s22
n1 n2
is distributed approximately as t with degrees of freedom given by
2
s 2
s 2
1 2
n1 n2
v
s1 / n1 s2 / n2
2 2 2 2
n1 1 n2 1
If v is not an integer, round down to the nearest integer
Example
Arsenic concentration in
public drinking water
supplies is a potential health
risk. An article in the
Arizona Republic (May 27,
2001) reported drinking
water arsenic concentrations
in parts per billion (ppb) for
10 metropolitan Phoenix
communities and 10
communities in rural
Arizona. The data follow:
We wish to determine whether any difference exists in mean arsenic
concentrations for metropolitan Phoenix communities and for
communities in rural Arizona.
1. Parameter of interest: The parameters of interest are the mean
arsenic concentrations for the two geographic regions, say, μ1 and μ2,
and we are interested in determining whether μ1 - μ2 = 0. We have
n1 n2 10; x1 12.5; s1 7.63; x2 27.5; s2 15.3
3. Test statistic:
* x1 x2 12.5 27.5
t
0 2.77
2 2 2 2
s / n1 s / n2
1 2 7.63 /10 15.3 /10
2
s
2
s
2
7.632 15.32
1 2
n n
1 2 10 10
v 13.2 13
1 1 2 2 /10
2 2 2 2 2 2 2 2
s / n s / n 7.63 /10 15.3
n1 1 n2 1 9 9
p p
1 2
z pq 1/ n 1/ n p p
/2 1 2 1 2
p p
1 2
where n1 p1 n2 p2 n1 1 p1 n2 1 p2
p ,q
n1 n2 n1 n2
and
p1 1 p1 p2 1 p2
p p
1 2 n1 n2
Type II Error and Choice of Sample Size
One-sided test: p1 > p2
z pq 1/ n 1/ n p p
1 2 1 2
p p
1 2
z pq 1/ n 1/ n p p
1
1 2 1 2
p p
1 2
Sample Size Formulas
Two-sided test
2
z / 2 p1 p2 q1 q2 / 2 z p1q1 p2 q2
n
p1 p2
2