Confidence Intervals for Two Proportions

Construct and interpret confidence intervals for the difference between two independent population proportions using sample proportions and the standard normal critical value.

Step 1 of 119%

Tutorial

The Two-Proportion Confidence Interval

Suppose we have two independent samples and we want to estimate the difference p1p2p_1 - p_2 between two population proportions. Let p^1=x1/n1\hat{p}_1 = x_1/n_1 and p^2=x2/n2\hat{p}_2 = x_2/n_2 be the sample proportions, where xix_i is the number of successes in sample ii.

A confidence interval for the difference of two proportions p1p2p_1 - p_2 is given by

(p^1p^2)±zp^1(1p^1)n1+p^2(1p^2)n2,(\hat{p}_1 - \hat{p}_2) \pm z^* \sqrt{\dfrac{\hat{p}_1(1-\hat{p}_1)}{n_1} + \dfrac{\hat{p}_2(1-\hat{p}_2)}{n_2}},

where zz^* is the standard normal critical value for the chosen confidence level. The three values you will use most often are

z90%=1.645,z95%=1.96,z99%=2.576.z^*_{90\%} = 1.645, \qquad z^*_{95\%} = 1.96, \qquad z^*_{99\%} = 2.576.

The quantity under the square root is the standard error of p^1p^2,\hat{p}_1 - \hat{p}_2, and the product zSEz^* \cdot SE is the margin of error.

For example, with p^1=0.4,\hat{p}_1 = 0.4, n1=100,n_1 = 100, p^2=0.3,\hat{p}_2 = 0.3, and n2=150,n_2 = 150,

SE=0.4(0.6)100+0.3(0.7)150=0.0024+0.00140.0616.SE = \sqrt{\dfrac{0.4(0.6)}{100} + \dfrac{0.3(0.7)}{150}} = \sqrt{0.0024 + 0.0014} \approx 0.0616.

A 95% CI is then (0.40.3)±1.96(0.0616)0.10±0.121=(0.021, 0.221).(0.4 - 0.3) \pm 1.96(0.0616) \approx 0.10 \pm 0.121 = (-0.021,\ 0.221).

This formula assumes the two samples are independent and each sample contains at least 10 successes and 10 failures.

navigate · Enter open · Esc close · ⌘K/Ctrl K toggle