# 9.4 - Comparing Two Proportions

9.4 - Comparing Two Proportions

So far, all of our examples involved testing whether a single population proportion p equals some value $$p_0$$. Now, let's turn our attention for a bit towards testing whether one population proportion $$p_1$$ equals a second population proportion $$p_2$$. Additionally, most of our examples thus far have involved left-tailed tests in which the alternative hypothesis involved $$H_A \colon p < p_0$$ or right-tailed tests in which the alternative hypothesis involved $$H_A \colon p > p_0$$. Here, let's consider an example that tests the equality of two proportions against the alternative that they are not equal. Using statistical notation, we'll test:

$$H_0 \colon p_1 = p_2$$ versus $$H_A \colon p_1 \ne p_2$$

## Example 9-5 Time magazine reported the result of a telephone poll of 800 adult Americans. The question posed of the Americans who were surveyed was: "Should the federal tax on cigarettes be raised to pay for health care reform?" The results of the survey were:

Non- Smokers Smokers

$$n_1 = 605$$
$$y_1 = 351 \text { said "yes"}$$
$$\hat{p}_1 = \dfrac{351}{605} = 0.58$$

$$n_2 = 195$$
$$y_2 = 41 \text { said "yes"}$$
$$\hat{p}_2 = \dfrac{41}{195} = 0.21$$

Is there sufficient evidence at the $$\alpha = 0.05$$, say, to conclude that the two populations — smokers and non-smokers — differ significantly with respect to their opinions?

If $$p_1$$ = the proportion of the non-smoker population who reply "yes" and $$p_2$$ = the proportion of the smoker population who reply "yes," then we are interested in testing the null hypothesis:

$$H_0 \colon p_1 = p_2$$

against the alternative hypothesis:

$$H_A \colon p_1 \ne p_2$$

Before we can actually conduct the hypothesis test, we'll have to derive the appropriate test statistic.

Theorem

The test statistic for testing the difference in two population proportions, that is, for testing the null hypothesis $$H_0:p_1-p_2=0$$ is:

$$Z=\dfrac{(\hat{p}_1-\hat{p}_2)-0}{\sqrt{\hat{p}(1-\hat{p})\left(\dfrac{1}{n_1}+\dfrac{1}{n_2}\right)}}$$

where:

$$\hat{p}=\dfrac{Y_1+Y_2}{n_1+n_2}$$

the proportion of "successes" in the two samples combined.

### Proof

Recall that:

$$\hat{p}_1-\hat{p}_2$$

is approximately normally distributed with mean:

$$p_1-p_2$$

and variance:

$$\dfrac{p_1(1-p_1)}{n_1}+\dfrac{p_2(1-p_2)}{n_2}$$

But, if we assume that the null hypothesis is true, then the population proportions equal some common value p, say, that is, $$p_1 = p_2 = p$$. In that case, then the variance becomes:

$$p(1-p)\left(\dfrac{1}{n_1}+\dfrac{1}{n_2}\right)$$

So, under the assumption that the null hypothesis is true, we have that:

$$Z=\frac{\left(\hat{p}_{1}-\hat{p}_{2}\right)- \color{blue}\overbrace{\color{black}\left(p_{1}-p_{2}\right)}^0}{\sqrt{p(1-p)\left(\frac{1}{n_{1}}+\frac{1}{n_{2}}\right)}} }$$

follows (at least approximately) the standard normal N(0,1) distribution. Since we don't know the (assumed) common population proportion p any more than we know the proportions $$p_1$$ and $$p_2$$ of each population, we can estimate p using:

$$\hat{p}=\dfrac{Y_1+Y_2}{n_1+n_2}$$

the proportion of "successes" in the two samples combined. And, hence, our test statistic becomes:

$$Z=\dfrac{(\hat{p}_1-\hat{p}_2)-0}{\sqrt{\hat{p}(1-\hat{p})\left(\dfrac{1}{n_1}+\dfrac{1}{n_2}\right)}}$$

as was to be proved.

## Example 9-5 (continued) Time magazine reported the result of a telephone poll of 800 adult Americans. The question posed of the Americans who were surveyed was: "Should the federal tax on cigarettes be raised to pay for health care reform?" The results of the survey were:

Non- Smokers Smokers

$$n_1 = 605$$
$$y_1 =351 \text { said "yes"}$$
$$\hat{p}_1 = \dfrac{351}{605} = 0.58$$

$$n_2 = 195$$
$$y_2 = 41 \text { said "yes"}$$
$$\hat{p}_2 = \dfrac{41}{195} = 0.21$$

Is there sufficient evidence at the $$\alpha = 0.05$$, say, to conclude that the two populations — smokers and non-smokers — differ significantly with respect to their opinions?

The overall sample proportion is:

$$\hat{p}=\dfrac{41+351}{195+605}=\dfrac{392}{800}=0.49$$

That implies then that the test statistic for testing:

$$H_0:p_1=p_2$$ versus $$H_0:p_1 \neq p_2$$

is:

$$Z=\dfrac{(0.58-0.21)-0}{\sqrt{0.49(0.51)\left(\dfrac{1}{195}+\dfrac{1}{605}\right)}}=8.99$$

Errr.... that Z-value is off the charts, so to speak. Let's go through the formalities anyway making the decision first using the rejection region approach, and then using the P-value approach. Putting half of the rejection region in each tail, we have:

That is, we reject the null hypothesis $$H_0$$ if $$Z ≥ 1.96$$ or if $$Z ≤ −1.96$$. We clearly reject $$H_0$$, since 8.99 falls in the "red zone," that is, 8.99 is (much) greater than 1.96. There is sufficient evidence at the 0.05 level to conclude that the two populations differ with respect to their opinions concerning imposing a federal tax to help pay for health care reform.

Now for the P-value approach:

That is, the P-value is less than 0.0001. Because $$P < 0.0001 ≤ \alpha = 0.05$$, we reject the null hypothesis. Again, there is sufficient evidence at the 0.05 level to conclude that the two populations differ with respect to their opinions concerning imposing a federal tax to help pay for health care reform.

Thankfully, as should always be the case, the two approaches.... the critical value approach and the P-value approach... lead to the same conclusion

## Note! For testing $$H_0 \colon p_1 = p_2$$, some statisticians use the test statistic:

$$Z=\dfrac{(\hat{p}_1-\hat{p}_2)-0}{\sqrt{\dfrac{\hat{p}_1(1-\hat{p}_1)}{n_1}+\dfrac{\hat{p}_2(1-\hat{p}_2)}{n_2}}}$$

instead of the one we used:

$$Z=\dfrac{(\hat{p}_1-\hat{p}_2)-0}{\sqrt{\hat{p}(1-\hat{p})\left(\dfrac{1}{n_1}+\dfrac{1}{n_2}\right)}}$$

An advantage of doing so is again that the interpretation of the confidence interval — does it contain 0? — is always consistent with the hypothesis test decision.

  Link ↥ Has Tooltip/Popover Toggleable Visibility