# 9.1.1 - Confidence Intervals

Given that $$np \ge 10$$ and $$n(1-p) \ge 10$$ for both groups, in other words at least 10 "successes" and at least 10 "failures" in each group, the sampling distribution can be approximated using the normal distribution with a mean of $$\widehat p_1 - \widehat p_2$$ and a standard error of $$\sqrt{\frac{p_1(1-p_1)}{n_1}+\frac{p_2(1-p_2)}{n_2}}$$.

Recall from the general form of a confidence interval:

General Form of a Confidence Interval
$$sample\ statistic\pm(multiplier)\ (standard\ error)$$

Here, the sample statistic is the difference between the two proportions ($$\widehat p_1 - \widehat p_2$$) and the standard error is computed using the formula $$\sqrt{\frac{p_1(1-p_1)}{n_1}+\frac{p_2(1-p_2)}{n_2}}$$. Putting this information together, we can derive the formula for a confidence interval for the difference between two proportions.

Confidence Interval for the Difference Between Two Proportions
$$(\widehat{p}_1-\widehat{p}_2) \pm z^\ast {\sqrt{\frac{\widehat{p}_1 (1-\widehat{p}_1)}{n_1}+\frac{\widehat{p}_2 (1-\widehat{p}_2)}{n_2}}}$$

## Example: Confidence Interval for the Difference Between the Proportion of Women and Men in Favor of Legal Same Sex Marriage Section

A survey was given to a sample of college students. They were asked whether they think same sex marriage should be legal. Of the 251 women in the sample, 185 said "yes." Of the 199 men in the sample, 107 said "yes." Let’s construct a 95% confidence interval for the difference of the proportion of women and men who responded “yes.” We can apply the 95% Rule and use a multiplier of $$z^\ast$$ = 2

• For women: $$np=185$$ and $$n(1-p) = 251-185=66$$
• For men: $$np=107$$ and $$n(1-p)=199-107=92$$

These counts are all at least 10 so the sampling distribution can be approximated using a normal distribution.

$$\widehat{p}_{w}=\frac{185}{251}=0.737$$

$$\widehat{p}_{m}=\frac{107}{199}=0.538$$

$$(0.737-0.538) \pm 2 {\sqrt{\frac{0.737 (1-0.737)}{251}+\frac{0.538 (1-0.538)}{199}}}$$

$$0.199 \pm 2 ( 0.045)$$

$$.199 \pm .090=[.110, .288]$$

We are 95% confident that in the population the difference between the proportion of women and men who are in favor of same sex marriage legalization is between 0.110 and 0.288.

This confidence interval does not contain 0. Therefore it is not likely that the difference between women and men is 0. We can conclude that there is a difference between the proportion of women and men in the population who would respond “yes" to this question.