Two Sample Hypothesis Examples
Two Sample Hypothesis Examples
Two Sample Hypothesis Examples
(Chapter 11)
1. In a test of the reliability of products produced by two machines, machine A produced 15 defective
parts in a run of 280, while machine B produced 10 defective parts in a run of 200. Do these
results imply a difference in the reliability of these two machines? (Use α=0.01.)
Step 0 : Check Assumptions
nA pA = y A = 15 ≥ 10 and nA (1− pA ) = nA − y A = 265 ≥ 10
nB pB = y B = 10 ≥ 10 and nB (1− pB ) = nB − y B = 190 ≥ 10
Step 1 : Hypotheses
H0 : π A − π B = 0
Ha : π A − π B ≠ 0
Step 2 : Significance Level
α = 0.01
Step 3 : Critical Value(s) and Rejection Region(s)
Critical Value: ±zα = ± z0.005 = ±2.58
Reject the null hypothesis if Z ≤ –2.58 or if Z ≥ 2.58.
Step 4 : Test Statistic
yA + yB 15 + 10 25
pc = = =
n A + nB 280 + 200 480
⎛ 15 10 ⎞
− −0
Z=
( pA − pB ) − δ 0 =
⎝ 280 200⎠
= 0.1736
⎛ 1 1⎞ ⎛ 25 ⎞ ⎛ 455 ⎞ ⎛ 1 1 ⎞
pc (1− pc )⎜ + ⎟ +
⎝ 480⎠ ⎝ 480 ⎠ ⎝ 280 200 ⎠
⎝ nA nB ⎠
p - value = 2 * P (z ≥ 0.1736) ≈ 2* P ( z ≥ 0.17) = 2* 0.4325 = 0.8650
Step 5 : Conclusion
Since –2.58 ≤ 0.1736 ≤ 2.58 (p-value ≈ 0.8650 > 0.01 = α), we fail to reject
the null hypothesis.
Step 6 : State conclusion in words
At the α = 0.01 level of significance, there is not enough evidence to conclude
that there is a difference in the reliability of the two machines.
2. Two sections of a class in statistics were taught by two different methods. Students’ scores on a
standardized test are shown below. Do the results present evidence of a difference in the
effectiveness of the two methods? (Use α = 0.01.)
Class A Class B
74 76 78 79
97 75 92 76
79 82 94 93
88 86 78 82
78 100 71 69
93 94 85 84
70
Step 1 : Hypotheses
H0 : µ A − µ B = 0
Ha : µ A − µ B ≠ 0
Step 2 : Significance Level
α = 0.01
Step 3 : Critical Value(s) and Rejection Region(s)
Since we don’t know the population variances ( σ 2A and σ B2 ) and don’t think that
they are equal, we’ll use the non-pooled t-test.
⎛
∑ (
yA ⎞ ⎛ )
2
⎜ ∑ yA −
2
⎟ (1022)2 ⎞
⎜ nA ⎟ ⎜ 87960 − 12 ⎟
⎝ ⎠ ⎝ ⎠
sA = = = 83.6061
2
nA − 1 12 − 1
⎛
∑ ( ⎞ )
2
y
⎟ ⎛ 85841− (1051) ⎞
2
⎜ ∑ y 2B −
B
⎜ nB ⎟ ⎜ 13 ⎟⎠
⎝ ⎠ ⎝
sB =
2
= = 72.6410
nB − 1 13− 1
[(s nA ) + (s2B nB ) ] = [(83.6061 12) + ( 72.6410 13)]
2 2
2
A
df = υ = = 22.0147 → 22
(s
nA ) ( sB2 nB ) (83.6061 12) + (72.6410 13)
2 2 2 2 2
+
A
nA − 1 nB − 1 12 − 1 13 − 1
Critical Values: ±tα ,df =υ = ±t0.005,df = 22 = ±2.82
2
Reject the null hypothesis if T≤–2.82 or if T ≥ 2.82.
Step 4 : Test Statistic
yA =
∑y 1022
A
=
= 85.1667 yB =
∑ y B = 1051 = 80.8462
nA 12 nB 13
( y − y ) − δ (85.1667 − 80.8462) − 0 = 1.2193
T= A 2 B 2 0=
sA sB 83.6061 72.6410
+ +
nA nB 12 13
p - value = 2 * P (t ≥ 1.2193) ≈ 2* P ( t ≥ 1.2) = 2 *0.121 = 0.242
Step 5 : Conclusion
Since –2.82 ≤ 1.2193 ≤ 2.82 (p-value ≈ 0.242 > 0.01 = α), we fail to reject
the null hypothesis.
Step 6 : State conclusion in words
At the α = 0.01 level of significance, there is not enough evidence to conclude
that there is a difference in the effectiveness of the two methods.
3. The table below shows the observed pollution indexes of air samples in two areas of a city. Test the
hypothesis that the mean pollution indexes are the same for the two areas. (Use α=0.05.)
Area A Area B
2.92 4.69 1.84 3.44
1.88 4.86 0.95 3.69
5.35 5.81 4.26 4.95
3.81 5.55 3.18 4.47
Step 1 : Hypotheses
H0 : µ A − µ B = 0
Ha : µ A − µ B ≠ 0
Step 2 : Significance Level
α = 0.05
Step 3 : Critical Value(s) and Rejection Region(s)
Since we don’t know the population variances ( σ 2A and σ B2 ) but think that they
are not equal (air varies across different areas of the same city due to
industrialization, vegetation, etc.), we’ll use the non-pooled t-test.
⎛
∑ (yA ⎞ ⎛ )
2
⎜ ∑ yA −
2
⎟ (34.87) 2 ⎞
⎜ nA ⎟ ⎜ 165.3737 − 8 ⎟⎠
⎝ ⎠ ⎝
sA = = = 1.9120
2
nA − 1 8 −1
⎛
∑ ( ⎞ )
2
y
⎟ ⎛ 102.4812 − (26.78) ⎞
2
⎜ ∑ y 2B −
B
⎜ nB ⎟ ⎜ 8 ⎟⎠
⎝ ⎠ ⎝
sB =
2
= = 1.8336
nB − 1 8 −1
[(s n A ) + ( sB2 n B ) ] = [(1.9120 8) + (1.8336 8)]
2 2
2
A
df = υ = = 13.9939 →13
nA )(s
2
( sB2 nB )
2
(1.9120 8) + (1.8336 8)
2 2 2
+
A
nA − 1 nB − 1 8 −1 8 −1
Critical Values: ±tα ,df =υ = ±t0.025,df =13 = ±2.16
2
Reject the null hypothesis if T≤–2.16 or if T ≥ 2.16.
Step 4 : Test Statistic
yA =
∑y A
=
34.87
= 4.3588 yB =
∑y B
=
26.78
= 3.3475
nA 8 nB 8
T=
( y A − y B ) − δ 0 = ( 4.3588 − 3.3475) − 0 = 1.4780
sA2 sB2 1.9120 1.8336
+ +
nA nB 8 8
p - value = 2 * P (t ≥ 1.4780) ≈ 2 * P (t ≥ 1.5) = 2* 0.079 = 0.158
Step 5 : Conclusion
Since –2.16 ≤ 1.4780 ≤ 2.16 (p-value ≈ 0.158 > 0.05 = α), we fail to reject
the null hypothesis.
Step 6 : State conclusion in words
At the α = 0.05 level of significance, there is not enough evidence to conclude
that there is a difference in the mean pollution indexes for the two areas.
4. A closer examination of the records of the air samples in Example 3 reveals that each line of the
data actually represents readings on the same day: 2.92 and 1.84 are from day 1, and so forth.
Since this affects the validity of the results obtained in Example 10, reanalyze. (Use α=0.05.)
Area A Area B yd = A – B
2.92 1.84 1.08
1.88 0.95 0.93
5.35 4.26 1.09
3.81 3.18 0.63
4.69 3.44 1.25
4.86 3.69 1.17
5.81 4.95 0.86
5.55 4.47 1.08
Step 1 : Hypotheses
H0 : µ d = 0
H a : µd ≠ 0
Step 2 : Significance Level
α = 0.05
Step 3 : Critical Value(s) and Rejection Region(s)
Since we have paired data and don’t know the population variance of the
differences ( σ d2 ), we’ll use the paired t-test.
Critical Values: ±tα ,df = n d −1 = ± t0.025,df =7 = ±2.37
2
Reject the null hypothesis if T ≤ –2.37 or if T ≥ 2.37.
Step 4 : Test Statistic
(∑ y ) 2
(8.09) 2
∑ y d2 d
− 8.45 −
yd =
∑y d8.09
= = 1.0113 sd =
nd
= 8 = 0.1960
nd 8 nd − 1 7
y − δ 0 1.0113 − 0
T = sd = 0.1960 = 14.5938
d
nd 8
p - value = 2 * P (t ≥ 14.5938) ≈ 2 * P (t ≥ 4.0) = 2 *0.003 = 0.006
Step 5 : Conclusion
Since 14.5938 ≥ 2.37 (p-value ≈ 0.006 ≤ 0.05 = α), we shall reject the null
hypothesis.
Step 6 : State conclusion in words
At the α = 0.05 level of significance, there exists enough evidence to
conclude that there is a difference in the mean pollution indexes for the two
areas.
5. Eight quantities of effluent from a pulp mill were each divided into ten batches. From each quantity,
five randomly selected batches were subjected to a treatment process intended to remove toxic
substances. Five fish of the same species were placed in each batch, and the mean number
surviving in the five treated and untreated portions of each effluent quantity after five days were
recorded and are given below. Test to see if the treatment increased the mean number of surviving
fish. (Use α=0.01.)
Quantity No. 1 2 3 4 5 6 7 8
Mean Number Surviving
Untreated 5 1 1.8 1 3.6 5 2.6 1
Treated 5 5 1.2 4.8 5 5 4.4 2
yd = U – T 0 -4 0.6 -3.8 -1.4 0 -1.8 -1
Step 1 : Hypotheses
H0 : µ d = 0
H a : µd < 0
Step 2 : Significance Level
α = 0.01
Step 3 : Critical Value(s) and Rejection Region(s)
Since we have paired data and don’t know the population variance of the
differences ( σ d2 ), we’ll use the paired t-test.
Critical Value: −tα ,df = n d −1 = −t0.01,df = 7 = −3.00
Reject the null hypothesis if T ≤ –3.00.
Step 4 : Test Statistic
yd =
∑y d
=
−11.4
= −1.425
nd 8
(∑ y ) 2
(−11.4 )2
∑y d
2
d − 37 −
nd 8
sd = = = 1.7219
nd − 1 7
y − δ 0 −1.425 − 0
T = sd = 1.7219 = −2.3407
d
nd 8
p - value = P (t ≤ −2.3407) = P( t ≥ 2.3407) ≈ P (t ≥ 2.3) = 0.027
Step 5 : Conclusion
Since –2.3407 > –3.00 (p-value ≈ 0.027 > 0.01 = α), we fail to reject the null
hypothesis.
Step 6 : State conclusion in words
At the α = 0.01 level of significance, there is not enough evidence to conclude
that the treatment increased the mean number of surviving fish.
6. In a test of the effectiveness of a device that is supposed to increase gasoline mileage in
automobiles, 12 cars were run, in random order, over a prescribed course both with and without the
device in random order. The mileages (mpg) are given below. Is there evidence that the device is
effective? (Use α=0.01.)
Car Without Device With Device y d = With – Without
1 21.0 20.6 –0.4
2 30.0 29.9 –0.1
3 29.8 30.7 0.9
4 27.3 26.5 –0.8
5 27.7 26.7 –1.0
6 33.1 32.8 –0.3
7 18.8 21.7 2.9
8 26.2 28.2 2.0
9 28.0 28.9 0.9
10 18.9 19.9 1.0
11 29.3 32.4 3.1
12 21.0 22.0 1.0
Step 1 : Hypotheses
H0 : µ d = 0
H a : µd > 0
Step 2 : Significance Level
α = 0.01
Step 3 : Critical Value(s) and Rejection Region(s)
Since we have paired data and don’t know the population variance of the
differences ( σ d2 ), we’ll use the paired t-test.
Critical Value: tα ,df = n d −1 = t0.01,df =11 = 2.72
Reject the null hypothesis if T ≥ 2.72.
Step 4 : Test Statistic
(∑ y ) 2
(9.2)2
∑y d
2
− 27.54 −
yd =
∑y 9.2
d
=
= 0.7667 sd =
d
nd
= 12 = 1.3647
nd 12 nd − 1 11
y − δ 0 0.7667 − 0
T = sd = 1.3647 = 1.9462
d
nd 12
p - value = P (t ≥ 1.9462) ≈ P (t ≥ 1.9) = 0.042
Step 5 : Conclusion
Since 1.9462 < 2.72 (p-value ≈ 0.042 > 0.01 = α), we fail to reject the null
hypothesis.
Step 6 : State conclusion in words
At the α = 0.01 level of significance, there is not enough evidence to conclude
that the device is effective for increasing gasoline mileage.