Chapter 10-Statistical Inference For Two Samples
Chapter 10-Statistical Inference For Two Samples
Chapter 10
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
X1 X 2 0
Test statistic: Z 0
12 22
n1 n2
Alternative Rejection criteria for
hypothesis P-Value Fixed-Level Tests
H1: μ1 - μ2 ≠ Δ0 P = 2[1 - Φ(|z0|)] |z0|> zα/2
H1: μ1 - μ2 > Δ0 P = 1 - Φ(z0) z0 > zα
H1: μ1 - μ2 < Δ0 P = Φ(z0) z0 < - zα
n
0
2
Exercise
Consider the hypothesis test H0: μ1 = μ2 against H1: μ1 ≠ μ2 with
known variances σ1 = 10 and σ2 = 5. Suppose that sample sizes n1 =
10 and n2 = 15 and that x1 4.7 and x2 7.8 . Use α = 0.05.
(a) Test the hypothesis and find the P-value.
(b) Explain how the test could be conducted with a confidence
interval.
(c) What is the power of the test in part (a) for a true difference in
means of 3?
(d) Assume that sample sizes are equal. What sample size should be
used to obtain β =0.05 if the true difference in means is 3? Assume
that α = 0.05
X1 X 2 0
Test statistic: T0
1 1
sp
n1 n2
Alternative Rejection criteria for
hypothesis P-Value Fixed-Level Tests
H1: μ1 - μ2 ≠ Δ0 P = 2[1 - Φ(|z0|)] |t0|> tα/2; n1+n2-2
H1: μ1 - μ2 > Δ0 P = 1 - Φ(z0) t0 > tα; n1+n2-2
H1: μ1 - μ2 < Δ0 P = Φ(z0) t0 < - tα; n1+n2-2
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. Figure
10.2 presents a normal probability plot and a comparative box plot of
the data from the two samples. 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
Example
An experiment was performed to compare the abrasive wear of two
different laminated materials. Twelve pieces of material 1 were tested
by exposing each piece to a machine measuring wear. Ten pieces of
material 2 were similarly tested. In each case, the depth of wear was
observed. The samples of material 1 gave an average (coded) wear of
85 units with a sample standard deviation of 4, while the samples of
material 2 gave an average of 81 with a sample standard deviation of 5.
Can we conclude at the 0.05 level of significance that the abrasive wear
of material 1 exceeds that of material 2 by more than 2 units? Assume
the populations to be approximately normal with equal variances.
Case 2: 12 22
s12 s22
n1 n2
is distributed approximately as t with degrees of freedom given by
2
s 2
s 2
1 2
v n1 n2
s1 / n1 s2 / n2
2 2 2 2
n1 1 n2 1
If v is not an integer, round down to the nearest integer
Probability & Statistics
ĐẠI HỌC FPT CẦN THƠ
Example
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:
EXAMPLE.
An article in the journal Hazardous Waste and Hazardous Materials
(1989, Vol. 6) reported the results of an analysis of the weight of
calcium in standard cement and cement doped with lead. Reduced
levels of calcium would indicate that the hydration mechanism in the
cement is blocked and would allow water to attack various locations
in the cement structure. Ten samples of standard cement had an
average weight percent calcium of x1 90 with a sample standard
deviation of s1 = 5.0, and 15 samples of the lead-doped cement had an
average weight percent calcium of x 2 87 with a sample standard
deviation of s2 = 4.0.
Assume that weight percent calcium is normally distributed and find
a 95% confidence interval on the difference in means, μ1 - μ2, for the
two types of cement. Furthermore, we assume that both normal
populations have the same standard deviation.
Example
Extracts of St. John’s Wort are widely used to treat depression. An
article in the April 18, 2001, issue of the Journal of the American
Medical Association (“Effectiveness of St. John’s Wort on Major
Depression: A Randomized Controlled Trial”) compared the efficacy
of a standard extract of St. John’s Wort with a placebo in 200
outpatients diagnosed with major depression. Patients were randomly
assigned to two groups; one group received the St. John’s Wort, and
the other received the placebo. After 8 weeks, 19 of the placebo-
treated patients showed improvement, and 27 of those treated with
St. John’s Wort improved. Is there any reason to believe that St.
John’s Wort is effective in treating major depression? Use α = 0.05.
Example
A vote is to be taken among the residents of a town and the
surrounding county to determine whether a proposed chemical plant
should be constructed. The construction site is within the town
limits, and for this reason many voters in the county believe that the
proposal will pass because of the large proportion of town voters
who favor the construction. To determine if there is a significant
difference in the proportions of town voters and county voters
favoring the proposal, a poll is taken. If 120 of 200 town voters favor
the proposal and 240 of 500 county residents favor it, would you
agree that the proportion of town voters favoring the proposal is
higher than the proportion of county voters? Use an α = 0.05 level of
significance.
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
Probability & Statistics
ĐẠI HỌC FPT CẦN THƠ
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
Example
Two different types of injection-molding machines are used to form
plastic parts. A part is considered defective if it has excessive
shrinkage or is discolored. Two random samples, each of size 300,
are selected, and 15 defective parts are found in the sample from
machine 1, and 8 defective parts are found in the sample from
machine 2.
(a) Is it reasonable to conclude that both machines produce the
same fraction of defective parts, using α = . 0 05? Find the
P-value for this test.
(b) Suppose that p1 = 0.05 and p2 = 0.01. With the sample sizes given
here, what is the power of the test for this two-sided alternate?
(c) Suppose that p1 = 0.05 and p2 =0.01. Determine the sample size
needed to detect this difference with a probability of at least 0.9.