You are on page 1of 3

Hypothesis Testing

Lesson 5: Testing the Difference between Two Proportions

Circumstances often arise in which we desire to test the hypothesis that two populations proportions are
equal. For example, we might try to prove that the proportion of doctors who are pediatricians in one state is
greater than the proportion of pediatricians in another state.
In general, we wish to test the null hypothesis
𝐻0 : 𝑃1 − 𝑃2 = 0 or
𝐻0 : 𝑃1 − 𝑃2 ≥ 0 or
𝐻0 : 𝑃1 − 𝑃2 ≤ 0 .
against some suitable alternative. The parameters 𝑃1 and 𝑃2 are two population proportions of the attribute under
investigation. The statistic on which we base our decision criterion is the random variable 𝑝̂1 − 𝑝̂ 2. Independent
samples of size 𝑛1 ≥ 30 and 𝑛2 ≥ 30 are selected at random from two binomial populations and the proportion
of successes 𝑝̂1 and 𝑝̂ 2 , for the two samples are computed.
Table below provides a formula in testing difference between two proportions.
Formula for Testing the Difference between Two Proportions

Test Statistic 𝑯𝟎 𝑯𝒂 Rejection Region

𝑝̂1 − 𝑝̂2 𝑃1 − 𝑃2 ≤ 0 𝑃1 − 𝑃2 > 0


𝑍𝑐 = or or 𝑍𝑐 > 𝑍𝛼
1 1
√𝑝̅ 𝑞̅ ( + ) 𝑃1 ≤ 𝑃2 𝑃1 > 𝑃2
𝑛1 𝑛2
𝑃1 − 𝑃2 ≥ 0 𝑃1 − 𝑃2 < 0
where or or 𝑍𝑐 < −𝑍𝛼
𝑥1 𝑥2 𝑃1 ≥ 𝑃2 𝑃1 < 𝑃2
𝑝̂1 = ; 𝑝̂2 = ;
𝑛1 𝑛2
𝑃1 − 𝑃2 = 0 𝑃1 − 𝑃2 ≠ 0 𝑍𝑐 < −𝑍𝛼 or 𝑍 𝑐 > 𝑍𝛼
𝑥1 + 𝑥2 or or 2 2
𝑝̅ = ; 𝑞̅ = 1 − 𝑝̅
𝑛1 + 𝑛2 𝑃1 = 𝑃2 𝑃1 ≠ 𝑃2

Example 1. In a random sample of 250 CMU faculties, 108 used a Master Card while in another random sample
of 200, 116 used a Visa Card. At α = 0.05, test the hypothesis that there is no significant difference in the
proportion of the CMU faculties who use each type of credit card.

Given: α = 0.05
Master Card Visa Card
𝑥1 = 108 𝑥2 = 116
𝑛1 = 250 𝑛2 = 200
𝑥1 108 𝑥2 116
𝑝̂1 = = = 0.432 𝑝̂2 = = = 0.580
𝑛1 250 𝑛2 200

𝑥 +𝑥 108+116
𝑝̅ = 𝑛1 +𝑛2 = 250+200 = 0.498;
1 2
𝑞̅ = 1 − 𝑝̅ = 1 − 0.498 = 0.502

Solution: Following the steps in hypothesis testing, we have:


Steps:
1. Hypotheses:
𝐻0 : There is no significant difference in the proportion of the CMU faculties who use each type of
credit card, that is, 𝑃1 − 𝑃2 = 0 or 𝑃1 = 𝑃2 .
𝐻𝑎 : There is a significant difference in the proportion of the CMU faculties who use each type of
credit card, that is, 𝑃1 − 𝑃2 ≠ 0 or 𝑃1 ≠ 𝑃2 .

2. Significance Level: 𝜶 = 𝟎. 𝟎𝟓
3. Test Statistic: The appropriate test statistic is
̂𝟏 − 𝒑
𝒑 ̂𝟐
𝒁𝒄 =
𝟏 𝟏
√𝒑
̅𝒒̅( + )
𝒏𝟏 𝒏𝟐

4. Critical Regions: Since the alternative hypothesis is 𝑝1 ≠ 𝑝2 , we apply two-tailed test, that is,
𝑍𝑐 < −𝑍𝛼 or 𝑍𝑐 > 𝑍𝛼 , where 𝑍𝛼 = 𝑍0.05 = 𝑍0.025 = 1.96.
2 2 2 2

Thus, we reject 𝑯𝟎 if 𝒁𝒄 < −𝟏. 𝟗𝟔 or 𝒁𝒄 > 𝟏. 𝟗𝟔.

5. Computation: Using the formula in step 3, the actual value of the test statistic is:

𝑝̂1 − 𝑝̂ 2 0.432 − 0.580


𝑍𝑐 = = = −3.12
1 1
√(0.498)(0.502) (
1 1
√𝑝̅ 𝑞̅ ( + )
𝑛1 𝑛2 + )
250 200

6. Statistical Decision: Since 𝒛𝒄 = −𝟑. 𝟏𝟐 is less than −𝟏. 𝟗𝟔 (meaning, it is in the critical region), the null
hypothesis 𝑯𝟎 is rejected.
7. Conclusion: There is a significant difference in the proportion of store costumers who use each
type of credit card at 𝜶 = 𝟎. 𝟎𝟓.

Example 2. A geneticist is interested in the proportion of males and females in a population that have a certain
minor blood disorder. In a random sample of 100 males, 31 are found to be afflicted, whereas only 24 of 100
females tested appear to have disorder. Can we conclude at the 0.01 level of significance that the proportion of
men in the population afflicted with this blood disorder is significantly greater than the proportion of women
afflicted?

Given: α = 0.01
Male Female
𝑥1 = 31 𝑥2 = 24
𝑛1 = 100 𝑛2 = 100
𝑥1 31 𝑥2 24
𝑝̂1 = = = 0.31 𝑝̂2 = = = 0.24
𝑛1 100 𝑛2 100

𝑥 +𝑥 31+24
𝑝̂ = 𝑛1 +𝑛2 = 100+100 = 0.275;
1 2
𝑞̂ = 1 − 𝑝̂ = 1 − 0.275 = 0.725

Solution: Following the steps in hypothesis testing, we have:


Steps:
1. Hypotheses:
𝐻0 : The proportion of men in the population afflicted with this blood disorder is NOT significantly
greater than the proportion of women afflicted, that is, 𝑃1 − 𝑃2 ≤ 0 or 𝑃1 ≤ 𝑃2 .
𝐻𝑎 : The proportion of men in the population afflicted with this blood disorder is significantly greater
than the proportion of women afflicted, that is, 𝑃1 − 𝑃2 > 0 or 𝑃1 > 𝑃2 .
2. Significance Level: 𝜶 = 𝟎. 𝟎𝟏
3. Test Statistic: The appropriate test statistic is
̂𝟏 − 𝒑
𝒑 ̂𝟐
𝒁𝒄 =
𝟏 𝟏
√𝒑
̅𝒒̅( + )
𝒏𝟏 𝒏𝟐

4. Critical Regions: Since the alternative hypothesis is 𝑃1 > 𝑃2 , we apply right-tailed test, that is,
𝑍𝑐 > 𝑍𝛼 , where 𝑍𝛼 = 𝑍0.01 = 2.325.
Thus, we reject 𝑯𝟎 if 𝒁𝒄 > 𝟐. 𝟑𝟐𝟓.
5. Computation: Using the formula in step 3, the actual value of the test statistic is:

̂𝟏 − 𝒑
𝒑 ̂𝟐 𝟎. 𝟑𝟏 − 𝟎. 𝟐𝟒
𝒁𝒄 = == = 𝟏. 𝟏𝟎𝟗
𝟏 𝟏
√𝒑
̅𝒒̅( + ) √(𝟎. 𝟐𝟕𝟓)(𝟎. 𝟕𝟐𝟓) ( 𝟏 + 𝟏 )
𝒏𝟏 𝒏𝟐 𝟏𝟎𝟎 𝟏𝟎𝟎

6. Statistical Decision: Since 𝒛𝒄 = 𝟏. 𝟏𝟎𝟗 is NOT greater than 𝟐. 𝟑𝟐𝟓 (meaning, it is NOT in the critical
region), the null hypothesis 𝑯𝟎 is NOT rejected.
7. Conclusion: There is no sufficient evidence to conclude that the proportion of men in the
population afflicted with this blood disorder is significantly greater than the proportion of
women afflicted at 𝜶 = 𝟎. 𝟎𝟏.

Reference: Supe, A., et. al., (2013). Elementary Statistics. Central Book Supply Inc.

Prepared by:

JOBELLE S. SIMBLANTE
Stat 26 Instructor

You might also like