Академический Документы
Профессиональный Документы
Культура Документы
Statistical Inference
for Two Samples
Learning Objectives
• Comparative experiments involving two samples
• Test hypotheses on the difference in means of
two normal distributions
• Test hypotheses on the ratio of the variances or
standard deviations of two normal distributions
• Test hypotheses on the difference in two
population proportions
• Compute power, type II error probability, and
make sample size decisions for two-sample tests
• Explain and use the relationship between
confidence intervals and hypothesis tests
Assumptions
• Interested on statistical inferences on the
difference in means of two normal distributions
• Populations represented by X1 and X2
• Expected Value
Assumptions
• Quantity
E at 100(1-α)% confidence
Example
• Two machines are used for filling plastic bottles with a net
volume of 16.0 ounces
• The fill volume can be assumed normal, with standard
deviation 1=0.020 and 2=0.025 ounces
• A member of the quality engineering staff suspects that
both machines fill to the same mean net volume, whether
or not this volume is 16.0 ounces. A random sample of 10
bottles is taken from the output of each machine as
follows
Questions
1. Do you think the engineer is correct? Use =0.05
2. What is the P-value for this test?
3. What is the power of the test in part (1) for a true
difference in means of 0.04?
4. Find a 95% confidence interval on the difference in
means. Provide a practical interpretation of this interval.
5. Assuming equal sample sizes, what sample size should
be used to assure that =0.05 if the true difference in
means is 0.04? Assume that =0.05
Solution-Part 1
1. Parameter of interest is the difference in fill volume, 1 2 0
2. H0 :1 2 or 1 2
3. H1 :1 2 0 or 1 2
4. = 0.05
( x x2 ) 0
5. The test statistic is z0 1
12 22
n1 n2
8. Since -1.96 < 0.99 < 1.96, do not reject the null hypothesis
Solution-Part 2 and 3
2. P-value = 2(1 (0.99)) 2(1 0.8389) 0.3222
0 0
3. z / 2
z / 2
12 22 1 2
2
2
n1 n2 n1 n2
0.08 0.08
196
. 196
.
2 2
(0.02) (0.025) (0.02) 2 (0.025) 2
10 10 10 10
196
. 7.9 196
. 7.9 5.94 9.86
=00=0
Hence, the power = 1 0 = 1
Solution-Part 4
4. Confidence interval
12 22 12 22
x1 x2 z / 2
n1 n2
1 2 x1 x2 z / 2
n1 n2
0.0098 1 2 0.0298
Hence, n = 3, use n1 = n2 = 3
Hypotheses Tests for a Difference
in Means, Variances Unknown
• Tests of hypotheses on the difference in
means μ1-μ2 of two normal distributions
• Form an estimator of 2
• Pooled estimator of 2, denoted by S2p
• Test statistic
Hypotheses Tests
• Test hypothesis
– H0: μ1-μ2 =∆0
– H1: μ1-μ2 #∆0
• Test statistic
• Case 12#22
– 100(1- )% CI on the difference in means μ1-μ2
Example
• The diameter of steel rods manufactured on two
different extrusion machines is being investigated
• Two random samples of of sizes n1=15 and n2=17
are selected, and the sample means and sample
variances are x1 8.73, s12=0.35, x2 8.68, and
s22=0.40, respectively
• Assume that equal variances and that the data
are drawn from a normal distribution
– Is there evidence to support the claim that the two
machines produce rods with different mean diameters?
Use α=0.05 in arriving at this conclusion
– Find the P-value for the t-statistic you calculated in part
(1)
– Construct a 95% confidence interval for the difference
in mean rod diameter. Interpret this interval
Solution
1 2
1. Parameter of interest,
2. H0 : 0 or 1 2
1 2
3. H1 : 0 or 1 2
1 2
4. = 0.05
(x x ) 0
t0 1 2
5. Test statistic is 1 1
sp
n1 n2
6. Reject the null hypothesis if t0 < t / 2,n n 2 where t 0.025, 30 =
1 2
and n2 = 17,
Solution
14(0.35) 16(0.40)
0.614
30
(8.73 8.68) 0
t0 0.230
1 1
0.614
15 17
8. Since 2.042 < 0.230 < 2.042, do not reject the null hypothesis
Solution-Cont.
• P-value = 2P t 0.230 2( 0.40), P-value > 0.80
• 95% confidence interval: t0.025,30 = 2.042
x1 x2 t / 2,n n 2 (s p ) 1 1
1 2 x1 x2 t / 2,n1 n2 2 ( s p )
1 1
1 2
n1 n2 n1 n2
0.415 1 2 0.515
• Since zero is contained in this interval, we are 95% confident
that machine 1 and machine 2 do not produce rods whose
diameters are significantly different
Paired t Test
• Special case of the two-sample t-tests
• When the observations are collected in
pairs
• Each pair of observations is taken under
homogeneous conditions
• Conditions may change from one pair to
another
• Testing
– H0: μD=∆0
– H1: μD#∆0
Paired t Test
• Test statistic
3. H1 : 12 22
4. = 0.05
s12
5. Test statistic is f 0 s 2
2
6. Reject the null hypothesis if f0 < f 0.975,9,15 where f 0.975,9,15 = 0.265 or
f0 > f 0.025,9,15 where f 0.025,9,15 =3.12
7. n1=10, n2=16, s1= 4.7, and s2=5.8
(4.7) 2
f0 2
0.657
(5.8)
8. Since 0.265 < 0.657 < 3.12 do not reject the null hypothesis
Hypothesis Tests on Two
Population Proportions
• Suppose two binomial parameters of
interest, p1and p2
• Large-Sample Test
• Test statistic
• Critical regions
β-Error
• Where
Confidence Interval on the
Difference in Means
• Two sided 100(1-α)% C.I. on the difference
in the true proportions p1-p2
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 while 8 defective parts
are found in the sample from machine 2
• Is it reasonable to conclude that both machines
produce the same fraction of defective parts,
using α=0.05?
Solution
1. Parameters of interest are the proportion of defective parts, p1
and p2
2. H0 : p1 p2
3. H1 : p1 p2
4. = 0.05 p 1 p 2 x x2
z0 p 1
5. Test statistic is 1 1 n1 n2
p (1 p )
n1 n2