0% found this document useful (0 votes)
87 views30 pages

Chapter 10-Statistical Inference For Two Samples

Uploaded by

nhanthce181655
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
87 views30 pages

Chapter 10-Statistical Inference For Two Samples

Uploaded by

nhanthce181655
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

ĐẠI HỌC FPT CẦN THƠ

Chapter 10

Statistical Inference for Two Samples

Probability & Statistics


ĐẠI HỌC FPT CẦN THƠ

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

Probability & Statistics


ĐẠI HỌC FPT CẦN THƠ

10.1. Inference on the Difference


in Means of Two Normal
Distributions, Variance Known

Probability & Statistics


ĐẠI HỌC FPT CẦN THƠ

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.

Probability & Statistics


ĐẠI HỌC FPT CẦN THƠ

Tests on the Difference in Means, Var(X) known


Null hypothesis: H0: μ1 - μ2 = Δ0

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α

Probability & Statistics


ĐẠI HỌC FPT CẦN THƠ

σ2 knownTEST 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?

Probability & Statistics


ĐẠI HỌC FPT CẦN THƠ

Probability of type II error β for a two-sided test


   
   
   0     0 
    z /2       z /2 
2 
  2
 2
2    2
 2 

1
  
1
 
 n 1 n 2   n 1 n 2 

Probability & Statistics


ĐẠI HỌC FPT CẦN THƠ

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    1 2 
2
z  z  2
  2

n
   0 
2

Sample Siz for a One-sided test


For a one-sided alternative hypothesis with significance level α, the
sample size n1 = n2 = n required to detect a true difference in means
of Δ(≠ Δ0) with power at least 1 - β is
z  z   12   22 
2

n
   0 
2

Probability & Statistics


ĐẠI HỌC FPT CẦN THƠ

Probability & Statistics


ĐẠI HỌC FPT CẦN THƠ

Probability & Statistics


ĐẠI HỌC FPT CẦN THƠ

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

Probability & Statistics


ĐẠI HỌC FPT CẦN THƠ

10.2 Inference on the Difference in


Means of Two Normal Distributions,
Variance Unknown

Probability & Statistics


ĐẠI HỌC FPT CẦN THƠ

Tests on the Difference in Means, Var(X) Unknown



Case 1: 1
2
  2
2   2

Probability & Statistics


ĐẠI HỌC FPT CẦN THƠ

Tests on the Difference in Means, Var(X) Unknown


Null hypothesis: H0: μ1 - μ2 = Δ0

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

Probability & Statistics


ĐẠI HỌC FPT CẦN THƠ

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

Catalyst 1 91.50 94.18 92.18 95.39 91.79 89.07 94.72 89.21

Catalyst 2 89.19 90.95 90.46 93.21 97.19 97.04 91.07 92.75


Probability & Statistics
ĐẠI HỌC FPT CẦN THƠ

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.

Probability & Statistics


ĐẠI HỌC FPT CẦN THƠ

Case 2:  12   22

If H0: μ1 - μ2 = Δ0 is true, the statistic


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

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:

We wish to determine whether any difference exists in mean arsenic


concentrations for metropolitan Phoenix communities and for
communities in rural Arizona.
Probability & Statistics
ĐẠI HỌC FPT CẦN THƠ

Confidence Interval on the Difference in Means,


Variances Unknown

Probability & Statistics


ĐẠI HỌC FPT CẦN THƠ

Confidence Interval on the Difference in Means,


Variances Unknown

Probability & Statistics


ĐẠI HỌC FPT CẦN THƠ

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.

Probability & Statistics


ĐẠI HỌC FPT CẦN THƠ

10.6. Inference on Two Population


Proportions

Probability & Statistics


ĐẠI HỌC FPT CẦN THƠ

Test Statistic for the Difference of Two Population Proportions


Null hypothesis: H0: p1 = p2
P1  P 2
Z0 
 
1 1
Test statistic:
P 1 P   
 n1 n2 
Alternative P-Value Rejection criteria
hypothesis
H1: p1 ≠ p2 P = 2[1 - Φ(|z0|)] |z0| > zα/2
H1: p1 > p2 P = 1 - Φ(z0) z0 > z α
H1: p1 < p2 P = Φ(z0) z0 < - zα

Probability & Statistics


ĐẠI HỌC FPT CẦN THƠ

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.

Probability & Statistics


ĐẠI HỌC FPT CẦN THƠ

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.

Probability & Statistics


ĐẠI HỌC FPT CẦN THƠ

Type II Error and Choice of Sample Size


Two-sided test z pq 1/ n1  1/ n2    p1  p2  
  
 /2

  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Ơ

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 

One-sided test: p < p0

  z pq 1/ n  1/ n    p  p  
  1   
 1 2 1 2

  p p 
 1 2 

Probability & Statistics


ĐẠI HỌC FPT CẦN THƠ

Sample Size Formulas


Two-sided test
2
 z /2  p1  p2  q1  q2  / 2  z p1q1  p2 q2 
n  
 p1  p2 
2

where q1=1 – p1 and q2 = 1-p2.

Probability & Statistics


ĐẠI HỌC FPT CẦN THƠ

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.

Probability & Statistics


ĐẠI HỌC FPT CẦN THƠ

Confidence Interval on the Difference in Population


Proportions

Probability & Statistics

You might also like