Topic 9:
Statistical Inference
Between Two Means
Table of contents
01 Inference on the difference in means of two normal distributions:
variance known
02 Inference on the difference in means of two normal distributions:
variance unknown
03 Inference on the variance of two normal distributions
04 Inference on two population proportions
01
Inference on the difference in means of two
normal distributions: variance known
Before we start, we must recognize
the following assumptions:
(1) 𝑋11 , 𝑋12 , … , 𝑋1𝑛1 is a random sample from
population 1.
(2) 𝑋21 , 𝑋22 , … , 𝑋2𝑛2 is a random sample from
population 2.
(3) The two populations represented by 𝑋1 and 𝑋2
are independent.
(4) Both populations are normal.
𝑋ത1 −𝑋ത2 −(𝜇1 −𝜇2 )
𝑍=
𝜎2 𝜎2
1+ 2
𝑛1 𝑛2
T-6. Approximating Sampling Distribution of a
Difference in Sample Means
Recall:
𝑋ത1 −𝑋ത2 −(𝜇1 −𝜇2 )
𝑍=
𝜎2 𝜎2
1+ 2
𝑛1 𝑛2
This will be our test statistic since the POPULATION
VARIANCE is KNOWN.
𝑋ത1 −𝑋ത2 −(𝜇1 −𝜇2 ) Parameter of Interest
Test statistic: 𝑍=
𝜎2 2
1 + 𝜎2
𝑛1 𝑛2
𝑋ത1 −𝑋ത2 −(𝜇1 −𝜇2 )
Test statistic: 𝑍=
𝜎2 2
1 + 𝜎2
𝑛1 𝑛2
Null Hypothesis: 𝐻0 : 𝜇1 − 𝜇2 = Δ0
Note:
The Null Hypothesis always
contains some form of equality (=,
≤, or ≥)
𝑋ത1 −𝑋ത2 −(𝜇1 −𝜇2 )
Test statistic: 𝑍=
𝜎2 2
1 + 𝜎2
𝑛1 𝑛2
Null Hypothesis: 𝐻0 : 𝜇1 − 𝜇2 = Δ0
Alternative Hypothesis: 𝐻1 : 𝜇1 − 𝜇2 ≠ Δ0
𝐻1 : 𝜇1 − 𝜇2 > Δ0
𝐻1 : 𝜇1 − 𝜇2 < Δ0
𝑋ത1 −𝑋ത2 −(𝜇1 −𝜇2 )
Test statistic: 𝑍= Null Hypothesis: 𝐻0 : 𝜇1 − 𝜇2 = Δ0
𝜎2 2
1 + 𝜎2
𝑛 1 𝑛2
Alternative Hypothesis P-Value Rejection Criterion for Fixed-Level
Tests
𝐻1 : 𝜇1 − 𝜇2 ≠ Δ0 Probability above 𝑧0 and 𝑧0 > 𝑧𝛼Τ2 or 𝑧0 < −𝑧𝛼Τ2
probability below − 𝑧0 ,
𝑃 = 2[1 − Φ 𝑧0 ]
𝐻1 : 𝜇1 − 𝜇2 > Δ0 Probability above 𝑧0 , 𝑧0 > 𝑧𝛼
𝑃 = 1 − Φ 𝑧0 ]
Probability below − 𝑧0 , 𝑧0 < −𝑧𝛼
𝐻1 : 𝜇1 − 𝜇2 < Δ0
𝑃 = Φ 𝑧0 ]
Example 10-1 Paint Drying Time
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 𝑥ҧ1 = 121 minutes and 𝑥ҧ 2 = 112 minutes , respectively. What conclusions can the
product developer draw about the effectiveness of the new ingredient, using α = 0.05? Apply the
seven-step procedure to this problem.
Example 10-1 Paint Drying Time
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 𝑥ത1 = 121 minutes and 𝑥ത2 = 112 minutes , respectively. What
conclusions can the product developer draw about the effectiveness of the new ingredient, using α = 0.05? Apply
the seven-step procedure to this problem.
1. Parameter of Interest: The quantity of interest is the difference in mean drying times,
𝜇1 − 𝜇2 , and Δ0 = 0.
2. Null Hypothesis: 𝐻0 : 𝜇1 − 𝜇2 = 0, or 𝐻0 : 𝜇1 = 𝜇2 .
3. Alternative Hypothesis: 𝐻1 : 𝜇1 > 𝜇2 . We want to reject 𝐻0 if the new ingredient
reduces mean drying time
4. Test Statistic: The test statistic is
𝑋ത1 −𝑋ത2 −(𝜇1 −𝜇2 )
𝑍= where𝜎12 = 𝜎22 = 82 = 64and𝑛1 = 𝑛2 = 10.
𝜎2 2
1 +𝜎2
𝑛1 𝑛2
5. Reject 𝑯𝟎 if: Reject 𝐻0 : 𝜇1 = 𝜇2 if the P-value is less than 0.05.
6. Computations: Because 𝑥ത1 = 121 minutes and 𝑥ത2 = 112 minutes, the test
statistic is
121 − 112 − 0
𝑧0 = = 2.52
82 8 2
+
10 10
Example 10-1 Paint Drying Time
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 𝑥ത1 = 121 minutes and 𝑥ത2 = 112 minutes , respectively. What
conclusions can the product developer draw about the effectiveness of the new ingredient, using α = 0.05? Apply
the seven-step procedure to this problem.
7. Conclusion: Because 𝑧0 = 2.52, the P-value is 𝑃 = 1 − Φ 2.52 = 0.0059, so
we reject 𝐻0 at the α = 0.05 level.
Practical Interpretation:
We conclude that adding the new ingredient to the paint significantly reduces the drying
time. This is a strong conclusion.
02
Inference on the difference in means of two
normal distributions: variance unknown
2 Cases for when the Population
Variances are unknown:
Case 1: 𝜎12 = 𝜎22 Case 2: 𝜎12 ≠ 𝜎22
“Pooled-Variance t-Test” “Welch (Unpooled) t-Test”
Case 1: 𝜎12 = 𝜎22
2 2
2
𝑛1 − 1 + 𝑛 2 𝑠1
− 1 𝑠2
𝑠𝑝 =
𝑛1 + 𝑛2 − 2
Population Variance estimator
Case 1: 𝜎12 = 𝜎22
𝑋ത1 − 𝑋ത2 − (𝜇1 − 𝜇2 )
𝑇=
1 1
𝑠𝑝 +
𝑛1 𝑛2
Test statistic
𝑋ത1 − 𝑋ത2 − (𝜇1 − 𝜇2 )
Test statistic: 𝑇= Null Hypothesis: 𝐻0 : 𝜇1 − 𝜇2 = Δ0
1 1
𝑠𝑝 +
𝑛1 𝑛2
Alternative Hypothesis P-Value Rejection Criterion for Fixed-Level
Tests
𝐻1 : 𝜇1 − 𝜇2 ≠ Δ0 Probability above 𝑡0 and 𝑡0 > 𝑡𝛼Τ2,𝑛1 +𝑛2−2 or 𝑡0 < −𝑡𝛼Τ2,𝑛1 +𝑛2 −2
probability below − 𝑡0
𝐻1 : 𝜇1 − 𝜇2 > Δ0 Probability above 𝑡0 𝑡0 < −𝑡𝛼,𝑛1 +𝑛2 −2
𝐻1 : 𝜇1 − 𝜇2 < Δ0 Probability below − 𝑡0 𝑡0 > 𝑡𝛼,𝑛1 +𝑛2−2
Example 10-5 Yield from a Catalyst
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.
Example 10-5 Yield from a Catalyst
Table 10-1 Catalyst Yield Data, Example 10-5
Observation Catalyst 1 Catalyst 2
Number
1 91.51 89.19
2 94.18 90.95
3 92.18 90.46
4 95.39 93.21
5 91.79 97.19
6 89.07 97.04
7 94.72 91.07
8 89.21 92.75
𝑥1ҧ = 92.255 𝑥ҧ2 = 92.733
𝑠12 = 2.39 𝑠22 = 2.98
Example 10-5 Yield from a Catalyst
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.
The parameters of interest are 𝜇1 and 𝜇2 , the mean process yield
1. Parameter of Interest:
using catalysts 1 and 2, respectively, and we want to know if
𝜇1 − 𝜇2 = 0
2. Null Hypothesis: 𝐻0 : 𝜇1 − 𝜇2 = 0, or 𝐻0 : 𝜇1 = 𝜇2 .
3. Alternative Hypothesis: 𝐻1 : 𝜇1 ≠ 𝜇2
4. Test Statistic: The test statistic is
𝑋ത1 − 𝑋ത2 − (𝜇1 − 𝜇2 )
𝑡0 =
1 1
𝑠𝑝 +
𝑛1 𝑛2
5. Reject 𝑯𝟎 if: Reject if the P-value is less than 0.05.
6. Computations: From Table 10-1, we have 𝑥ҧ1 = 92.255, 𝑥ҧ 2 = 92.733, 𝑠12 = 2.39
𝑠22 = 2.98, 𝑛1 = 𝑛2 = 8. Therefore,
2 2 2 + 7 (2.98)2
𝑛1 − 1 𝑠1 + 𝑛 2 − 1 𝑠2 7 (2.39)
𝑠𝑝2 = = = 7.30
𝑛1 + 𝑛2 − 2 8+8−2
𝑠𝑝 = 7.30 = 2.70
𝑋ത1 − 𝑋ത2 − (𝜇1 − 𝜇2 ) 92.255 − 92.733
𝑡0 = = = −0.35
1 1 1 1
𝑠𝑝 + 2.70 +
𝑛1 𝑛2 8 8
Case 2: 𝜎12 ≠ 𝜎22
2 2
𝑠1 𝑠2 2
( + )
𝑛1 𝑛2
𝑣= 2 2
𝑠1 2 𝑠2 2
( ) ( )
𝑛1 𝑛2
+
𝑛1 − 1 𝑛2 − 1
Approximates degrees of freedom
03
Inference on the variance of two normal
distributions
F - Distribution
𝑊ൗ
𝑢
𝐹=
𝑌ൗ
𝑣
Ratio
𝑊ൗ
F - Distribution 𝐹=
𝑢
𝑌ൗ
𝑣
𝑣
𝜇= , 𝑣>2
𝑣−2
Mean of the F-Distribution
2
2
2𝑣 (𝑢 + 𝑣 − 2)
𝜎 = 2
, v>4
𝑢 𝑣 − 2 (𝑣 − 4)
Variance of the F-Distribution
𝑊ൗ
F - Distribution 𝐹=
𝑢
𝑌ൗ
𝑣
Probability Density Function
Hypothesis Test on the Ratio
of Two Variances
Test Statistic
Hypothesis Test on the Ratio of Two
Variances
04
Inference on Two Population Proportions
1 − 𝑃
𝑃 2 − (𝑝1 − 𝑝2 )
𝑍=
𝑝1 (1 − 𝑝1 ) 𝑝2 (1 − 𝑝2 )
+
𝑛1 𝑛2
Test Statistic
1 − 𝑃
𝑃 2 − (𝑝1 − 𝑝2 )
𝑍=
𝑝1 (1 − 𝑝1 ) 𝑝2 (1 − 𝑝2 )
+
𝑛1 𝑛2
Test Statistic
1 − 𝑃
𝑃 2 − (𝑝1 − 𝑝2 )
𝑍=
𝑝1 (1 − 𝑝1 ) 𝑝2 (1 − 𝑝2 )
+
𝑛1 𝑛2
Test Statistic
1 − 𝑃
𝑃 2 − (𝑝1 − 𝑝2 )
𝑍=
𝑝1 (1 − 𝑝1 ) 𝑝2 (1 − 𝑝2 )
+
𝑛1 𝑛2
Test Statistic