6_Two Sample Hypotheses Testing
6_Two Sample Hypotheses Testing
𝑯𝟏 : 𝝁𝟏 < 𝝁𝟐
The output from the semi-automatic line is significantly lesser than
that from the automatic line
Alternatively,
𝑯𝟏 : 𝝁𝟐 > 𝝁𝟏
The output from the automatic line is significantly greater than that
from the semi- automatic line
𝜶 = 𝟎. 𝟎𝟐
𝒁𝑳𝑳 = −𝟐. 𝟎𝟓
or
𝒁𝑪𝒓𝒊𝒕𝒊𝒄𝒂𝒍 = −𝟐. 𝟎𝟓
−𝟐. 𝟎𝟓
Standardizing in terms of
Z- Statistics
(𝑥ҧ1 −𝑥ҧ2 )−(𝜇1 −𝜇2 )
z=
𝜎𝑥ഥ1 − 𝑥ഥ2
𝒔𝟏 𝟐 𝒔𝟐 𝟐
𝜎𝑥ҧ1− 𝑥ҧ2 = +
𝒏𝟏 𝒏𝟐
Standard Error of the Difference
between Two Means
𝒔𝟏 𝟐 𝒔𝟐 𝟐
𝜎𝑥ҧ1− 𝑥ҧ2 = +
𝒏𝟏 𝒏𝟐
𝟑𝟐𝟐 +𝟐𝟗𝟐
➔𝜎𝑥ҧ1 − 𝑥ҧ2 =
𝟏𝟓𝟎 𝟐𝟎𝟎
(198−206)−(0)
➔
3.3214
➔- 2.41
𝑍𝐻0 = −2.41
−2.41 −𝟐. 𝟎𝟓
Conclusion
| 𝑍𝐻0 | > |𝑍𝐶𝑟𝑖𝑡𝑖𝑐𝑎𝑙 |
Sample 1 : Male
Sample 2 : Female
Hypothesis
𝑯𝟎 : 𝝁𝟏 = 𝝁𝟐 + 20
𝑯𝟎 : 𝝁𝟏 − 𝝁𝟐 =20
Male operators are earning exactly Rs 20
more per hour than the female operators
𝑯𝟏 : 𝝁𝟏 − 𝝁𝟐 > 𝟐𝟎
Male operators are earning over Rs 20
more per hour than the female operators
𝜶 = 𝟎. 𝟎𝟏
𝒁𝑼𝑳 = 𝟐. 𝟑𝟑
or
𝒁𝑪𝒓𝒊𝒕𝒊𝒄𝒂𝒍 = 𝟐. 𝟑𝟑
2. 𝟑𝟑
Standard Error of the Difference
between Two Means
𝒔𝟏 𝟐 𝒔𝟐 𝟐
𝜎𝑥ҧ1− 𝑥ҧ2 = +
𝒏𝟏 𝒏𝟐
𝟏𝟖.𝟒𝟐 𝟏𝟑.𝟏𝟐
➔𝜎𝑥ҧ1 − 𝑥ҧ2 = +
𝟑𝟖 𝟒𝟓
(113.8−84.2)−(20)
➔
3.566
➔ 2.7
𝑍𝐻0 = 2.7
2. 𝟑𝟑 < 2.7
Conclusion
| 𝑍𝐻0 | > |𝑍𝐶𝑟𝑖𝑡𝑖𝑐𝑎𝑙 |
2
σ(𝑥𝑖 − 𝑥ҧ )
𝑠2 =
𝑛−1
Solution to Problem 3
Sample 1 : Female
Sample 2 : Male
Hypothesis
𝑯𝟎 : 𝝁𝟏 = 𝝁𝟐
The women are equally effective as the
men in generating new accounts
𝑯𝟏 : 𝝁𝟏 > 𝝁𝟐
The women are significantly more
effective than the men in generating new
accounts
𝜶 = 𝟎. 𝟎𝟓
Look for
Df = 18 - 2 = 16
𝒕𝑼𝑳 = 𝟏. 𝟕𝟒𝟔
or
𝒕𝑪𝒓𝒊𝒕𝒊𝒄𝒂𝒍 = 𝟏. 𝟕𝟒𝟔
𝟏. 𝟕𝟒𝟔
Standardizing in terms of
t- Statistics
(𝑥ҧ1 −𝑥ҧ2 )−(𝜇1 −𝜇2 )
t= 1 1
σ 𝑛 +𝑛
p
1 2
➔1.1032 Accounts
Standardizing in terms of
t- Statistics
(𝑥ҧ1 −𝑥ҧ2 )−(𝜇1 −𝜇2 )
t= 1 1
σ 𝑛 +𝑛
p
1 2
(12.8−11.625)−(0)
➔
1 1
1.1032 +
10 8
➔2.40
𝑡𝐻0 = 2.40
𝟏. 𝟕𝟒𝟔 2.40
Conclusion
| 𝑡𝐻0 | > |𝑡𝐶𝑟𝑖𝑡𝑖𝑐𝑎𝑙 |
Sample 1 : Mail
Sample 2 : Electronic
Hypothesis
𝑯𝟎 : 𝝁𝟏 = 𝝁𝟐
Refunds due on returns filed by mail were similar
to those due on return filed electronically
𝑯𝟏 : 𝝁𝟏 < 𝝁𝟐
Refunds due on returns filed by mail were smaller
than those due on return filed electronically
t- Table
(1-Tailed)
𝜶 = 𝟎. 𝟎𝟏
Look for
Df = 30 - 2 = 28
➔$ 495.84
Standardizing in terms of
t- Statistics
(𝑥ҧ1 −𝑥ҧ2 )−(𝜇1 −𝜇2 )
t= 1 1
σ 𝑛 +𝑛
p
1 2
(563−958)−(0)
➔
1 1
495.84 +
17 13
➔- 2.162
𝑡𝐻0 = −2.162
- 2.162
- 2.467
Conclusion
| 𝑡𝐻0 | < |𝑡𝐶𝑟𝑖𝑡𝑖𝑐𝑎𝑙 |
𝑊𝑒 𝐷𝑜𝑛𝑜𝑡 𝑅𝐸𝐽𝐸𝐶𝑇 𝐻𝑜
Refunds due on returns filed by
mail were similar to those due on
return filed electronically
Agenda
• Testing Differences
between Means with
Dependent Samples
• Tests for Differences between
Proportions : Large Sample Sizes
DEPENDENT SAMPLE
Smaller Sample
1 2 3 4 5 6 7 8 9 10
Before 38 11 34 25 17 38 12 27 32 29
After 45 24 41 39 30 44 30 39 40 41
Solution to Problem 5
Participant Before After
1 38 45
2 11 24
3 34 41
4 25 39
5 17 30
6 38 44
7 12 30
8 27 39
9 32 40
10 29 41
Standard Deviation
2
σ 𝑥 − 𝑛𝑥ҧ 2
S=
𝑛−1
Note:
𝒙 = (𝒙𝑨 −𝒙𝑩 )
Participant Before After Change (𝒙𝑨 −𝒙𝑩 )𝟐
𝒙𝑩 𝒙𝑨 𝒙𝑨 − 𝒙𝑩
1 38 45 7 49
2 11 24 13 169
3 34 41 7 49
4 25 39 14 196
5 17 30 13 169
6 38 44 6 36
7 12 30 18 324
8 27 39 12 144
9 32 40 8 64
10 29 41 12 144
Sum 110 1344 𝑥2
Average (𝑥)ҧ 11
Standard Deviation
2
σ 𝑥 − 𝑛𝑥ҧ 2
S=
𝑛−1
1344 −10×(11)2
=
10−1
= 3.8586
Standard Error (Characterizing 1-Sample HT)
𝑠
𝜎𝑥ҧ =
𝑛
3.8586
➔
10
➔ 1.2202 push-ups
Hypothesis
𝑯𝟎 : 𝝁𝑨 = 𝝁𝑩 +8
No Change in Body Conditioning
𝑯𝟏 : 𝝁𝑨 − 𝝁𝑩 > 𝟖
The data supports the club’s claim
𝜶 = 𝟎. 𝟎𝟐𝟓
Look for
Df = 10 - 1 = 9
𝒕𝑼𝑳 = 𝟐. 𝟐𝟔𝟐
or
𝒕𝑪𝒓𝒊𝒕𝒊𝒄𝒂𝒍 = 𝟐. 𝟐𝟔𝟐
2.262
Standardizing in terms of
t- Statistics
x̅ −µ Note:
t=
𝜎𝑥ഥ 𝑋ത = 𝒙𝑨 − 𝒙𝑩
µ = 𝝁𝑨 − 𝝁𝑩
11− 8
➔
1.2202
➔ 2.459
𝑡𝐻0 = 2.459
2.262 2.459
Conclusion
| 𝑡𝐻0 | > |𝑡𝐶𝑟𝑖𝑡𝑖𝑐𝑎𝑙 |
1 16 14 -2 4
2 12 13 1 1
3 18 12 -6 36
4 7 6 -1 1
5 14 9 -5 25
6 19 15 -4 16
7 6 8 2 4
8 17 15 -2 4
Sum -17 91 𝑥2
2
σ 𝑥 − 𝑛𝑥ҧ 2
S=
𝑛−1
91 − 8×(−2.125)2
=
8−1
= 2.7999 Items
Note:
𝒙 = (𝒙𝑨 −𝒙𝑩 )
Standard Error
𝑠
𝜎𝑥ҧ =
𝑛
2.7999
➔
8
➔ 0.9899 items
Hypothesis
𝑯𝟎 : 𝝁𝑨 = 𝝁𝑩
The new measures have not significantly lowered
the average number of broken items
𝑯𝟏 : 𝝁𝑨 < 𝝁𝑩
The new measures have lowered the average
number of broken items
𝜶 = 𝟎. 𝟎𝟓
Look for
Df = 8 - 1 = 7
➔-2.147
𝑡𝐻0 = −2.147
- 2.147 - 1.895
Conclusion
| 𝑡𝐻0 | > |𝑡𝐶𝑟𝑖𝑡𝑖𝑐𝑎𝑙 |
𝟗𝟒
Sample proportion of successes: 𝒑 ഥ𝟐 = = 𝟎. 𝟒𝟐𝟕𝟑
𝟐𝟐𝟎
ഥ𝟐 = 𝟏 − 𝒑
Sample proportion of failures: 𝒒 ഥ𝟐 = 𝟎. 𝟓𝟕𝟐𝟕
Size of Sample 2: 𝒏𝟐 = 220
𝑯 𝟏 : 𝒑𝟏 ≠ 𝒑𝟐
There is a significant difference in the proportions of
people in the two age groups who rate the program
as excellent
𝜶 = 𝟎. 𝟎𝟓
𝒁𝑳𝑳 = −𝟏. 𝟗𝟔
𝒁𝑼𝑳 = 𝟏. 𝟗𝟔
or
𝒁𝑪𝒓𝒊𝒕𝒊𝒄𝒂𝒍 = ±𝟏. 𝟗𝟔
−𝟏. 𝟗𝟔 𝟏. 𝟗𝟔
Weighted Average Concept
𝑛1 𝑝1 + 𝑛2 𝑝2
𝑝ҧ =
𝑛1 + 𝑛2
Overall proportion of successes in
two population
𝑛1 𝑝1 + 𝑛2 𝑝2
ഥ=
𝒑
𝑛1 + 𝑛2
= 0.4582
ഥ = 1 − 𝑝ҧ = 0.5418
𝒒
Estimated Standard Error
1 1
𝝈 ഥ𝟏 − 𝒑
𝒑 ഥ𝟐 = 𝑝ҧ 𝑞ത ( + )
𝑛1 𝑛2
1 1
➔ 0.4582 × 0.5418 × (
175
+
220
)
➔ 0.0505
Standardizing in terms of
Z- Statistics
(𝑝ҧ1 −𝑝ҧ2 )−(𝑝1 −𝑝2 )
z=
𝜎𝑝
ഥ 1 −𝑝
ഥ2
0.4971−0.4273 − 0
➔
0.0505
➔ 1.38
𝑍𝐻0 = 1.38
−𝟏. 𝟗𝟔 𝟏. 𝟑𝟖 𝟏. 𝟗𝟔
Conclusion
| 𝑍𝐻0 | < |𝑍𝐶𝑟𝑖𝑡𝑖𝑐𝑎𝑙 |
𝑊𝑒 𝐷𝑜𝑛𝑜𝑡 𝑅𝐸𝐽𝐸𝐶𝑇 𝐻𝑜
The proportions of people in the two
age groups who rate the program as
excellent are not significantly different
Solution to Problem 7
(Upgrade)
𝟓𝟐
Sample proportion of successes: 𝒑 ഥ𝟏 = = 𝟎. 𝟐𝟗𝟕𝟏
𝟏𝟕𝟓
ഥ𝟏 = 𝟏 − 𝒑
Sample proportion of failures: 𝒒 ഥ𝟏 = 𝟎. 𝟕𝟎𝟐𝟗
Size of Sample 1: 𝒏𝟏 = 175
𝟑𝟕
ഥ𝟐 =
Sample proportion of successes: 𝒑 = 𝟎. 𝟏𝟔𝟖𝟏
𝟐𝟐𝟎
ഥ𝟐 = 𝟏 − 𝒑
Sample proportion of failures: 𝒒 ഥ𝟐 = 𝟎. 𝟖𝟑𝟏𝟗
Size of Sample 2: 𝒏𝟐 = 220
𝑯 𝟏 : 𝒑𝟏 ≠ 𝒑𝟐
There is a significant difference in the proportions of
people in the two age groups who wish to upgrade
Significance Level = 𝛼 = 0.05
Z- Table
(2-Tailed)
𝜶 = 𝟎. 𝟎𝟓
𝒁𝑳𝑳 = −𝟏. 𝟗𝟔
𝒁𝑼𝑳 = 𝟏. 𝟗𝟔
or
𝒁𝑪𝒓𝒊𝒕𝒊𝒄𝒂𝒍 = ±𝟏. 𝟗𝟔
−𝟏. 𝟗𝟔 𝟏. 𝟗𝟔
Weighted Average Concept
𝑛1 𝑝1 + 𝑛2 𝑝2
𝑝ҧ =
𝑛1 + 𝑛2
Overall proportion of successes in
two population
𝑛1 𝑝1 + 𝑛2 𝑝2
ഥ=
𝒑
𝑛1 + 𝑛2
= 0.2252
ഥ = 1 − 𝑝ҧ = 0.7748
𝒒
Estimated Standard Error
1 1
𝝈 ഥ𝟏 − 𝒑
𝒑 ഥ𝟐 = 𝑝ҧ 𝑞ത ( + )
𝑛1 𝑛2
1 1
➔ 0.225 × 0.7748 × (
175
+
220
)
➔ 0.0423
Standardizing in terms of
Z- Statistics
(𝑝ҧ1 −𝑝ҧ2 )−(𝑝1 −𝑝2 )
z=
𝜎𝑝
ഥ 1 −𝑝
ഥ2
0.2971−0.1681 − 0
➔
0.0423
➔ 3.049
𝑍𝐻0 = 3.049
−𝟏. 𝟗𝟔 𝟏. 𝟗𝟔 3. 𝟎𝟒𝟗
Conclusion
| 𝑍𝐻0 | > |𝑍𝐶𝑟𝑖𝑡𝑖𝑐𝑎𝑙 |
𝑊𝑒 𝑅𝐸𝐽𝐸𝐶𝑇 𝐻𝑜
There is a significant difference in
the proportions of people in the two
age groups who wish to upgrade