Dove's LibraryDove's Library

3.10 - Constructing a Confidence Interval for the Difference Between Two Population Proportions

Overview

When you want to estimate how much two population proportions differ, the single number p^1−p^2\hat{p}_1 - \hat{p}_2 isn't enough, because it changes from sample to sample. A confidence interval gives a range of plausible values for the true difference p1−p2p_1 - p_2. This topic covers choosing the procedure, checking its conditions, and calculating the interval, its standard error, and its margin of error. Interpreting the interval and using it to support a claim come next, in Topic 3.11.

The procedure and the parameters

Based on sample data, a confidence interval can estimate the difference between two population proportions. The procedure is a two-sample zz-interval for a difference between population proportions.
The parameters must be defined in context. Name the difference in proportions, the response variable, and both populations. For example: "pR−pUp_R - p_U, where pRp_R is the true proportion of all rural adults in the state who have a library card and pUp_U is the true proportion of all urban adults in the state who have a library card."
The order you subtract in only changes the sign of the answer, so pick one order and use it everywhere.

Conditions

A two-sample zz-interval for p1−p2p_1 - p_2 requires three conditions:
  1. Randomization condition: the data should be collected using two independent random samples or a randomized experiment.
  1. 10% condition: when sampling without replacement, each sample size must be at most 10% of its population size: n1≤10%N1n_1 \leq 10\%N_1 and n2≤10%N2n_2 \leq 10\%N_2. This condition isn't needed when the data come from a randomized experiment.
  1. Normality condition: the numbers of observed successes, n1p^1n_1\hat{p}_1 and n2p^2n_2\hat{p}_2, and observed failures, n1(1−p^1)n_1(1 - \hat{p}_1) and n2(1−p^2)n_2(1 - \hat{p}_2), are all at least 10.
Why observed counts? To build an interval we don't know p1p_1 or p2p_2 (that's the point of estimating them), so we check the counts we actually saw in each sample. Compare this with Topic 3.9, where the true proportions were known.

Calculating the interval

The point estimate for p1−p2p_1 - p_2 is p^1−p^2\hat{p}_1 - \hat{p}_2. Like every interval in AP Statistics, the interval has the form
point estimate±margin of error\text{point estimate} \pm \text{margin of error}
For the difference between two population proportions, that's
(p^1−p^2)±z∗p^1(1−p^1)n1+p^2(1−p^2)n2(\hat{p}_1 - \hat{p}_2) \pm z^* \sqrt{\frac{\hat{p}_1(1 - \hat{p}_1)}{n_1} + \frac{\hat{p}_2(1 - \hat{p}_2)}{n_2}}
This matches the formula sheet's general form: statistic ±\pm (critical value)(standard error of statistic).

Standard error

The standard error of the difference is
SEp^1−p^2=p^1(1−p^1)n1+p^2(1−p^2)n2SE_{\hat{p}_1 - \hat{p}_2} = \sqrt{\frac{\hat{p}_1(1 - \hat{p}_1)}{n_1} + \frac{\hat{p}_2(1 - \hat{p}_2)}{n_2}}
It's the standard deviation from Topic 3.9 with the unknown p1p_1 and p2p_2 replaced by the sample proportions. It estimates how far p^1−p^2\hat{p}_1 - \hat{p}_2 typically is from the true difference p1−p2p_1 - p_2.

Margin of error

The margin of error (MOE) is the critical value z∗z^* times the standard error:
MOE=z∗p^1(1−p^1)n1+p^2(1−p^2)n2MOE = z^* \sqrt{\frac{\hat{p}_1(1 - \hat{p}_1)}{n_1} + \frac{\hat{p}_2(1 - \hat{p}_2)}{n_2}}
The critical value z∗z^* comes from the confidence level, the same way as in Topic 3.3:
Confidence level
90%
95%
99%
Critical value z∗z^*
1.6451.645
1.9601.960
2.5762.576
For any other level, use invNorm. For 95% confidence, the middle 95% leaves 0.0250.025 in each tail, so z∗=z^* = invNorm(0.975, 0, 1) =1.960= 1.960.
A higher confidence level means a larger z∗z^* and a wider interval. Larger samples mean a smaller standard error and a narrower interval.

Example 1: Library cards (AP-style)

A state library system wants to estimate the difference between the proportions of rural and urban adults in the state who have a library card. It selects a random sample of 300 rural adults and an independent random sample of 400 urban adults. In the samples, 141 rural adults and 236 urban adults have a library card. Construct a 95% confidence interval for the difference.
State: We want to estimate pR−pUp_R - p_U, where pRp_R is the true proportion of all rural adults in the state who have a library card and pUp_U is the true proportion of all urban adults in the state who have a library card, with 95% confidence.
Plan: Two-sample zz-interval for pR−pUp_R - p_U. Check the conditions:
  • Randomization: two independent random samples.
  • 10%: 300 is less than 10% of all rural adults in the state, and 400 is less than 10% of all urban adults in the state.
  • Normality: the counts 141141, 300−141=159300 - 141 = 159, 236236, and 400−236=164400 - 236 = 164 are all at least 10.
Do: The sample proportions are p^R=141300=0.47\hat{p}_R = \frac{141}{300} = 0.47 and p^U=236400=0.59\hat{p}_U = \frac{236}{400} = 0.59, so the point estimate is 0.47−0.59=−0.120.47 - 0.59 = -0.12.
SE=0.47(0.53)300+0.59(0.41)400=0.000830+0.000605≈0.0379SE = \sqrt{\frac{0.47(0.53)}{300} + \frac{0.59(0.41)}{400}} = \sqrt{0.000830 + 0.000605} \approx 0.0379MOE=1.96(0.0379)≈0.074MOE = 1.96(0.0379) \approx 0.074−0.12±0.074=(−0.194,−0.046)-0.12 \pm 0.074 = (-0.194, -0.046)
3.10 - Constructing a Confidence Interval for the Difference Between Two Population Proportions
Conclude: We are 95% confident that the interval from −0.194-0.194 to −0.046-0.046 captures the true difference in the proportions of rural and urban adults in this state who have a library card (rural minus urban). Put simply, the rural proportion is plausibly between 4.6 and 19.4 percentage points lower than the urban proportion.
Calculator check: STAT, TESTS, 2-PropZInt with x1=141x_1 = 141, n1=300n_1 = 300, x2=236x_2 = 236, n2=400n_2 = 400, and C-Level 0.950.95 gives (−0.1942,−0.0458)(-0.1942, -0.0458).
If you subtract the other way (urban minus rural), the interval becomes (0.046,0.194)(0.046, 0.194). Same information, opposite sign.

Example 2: Reminder emails (randomized experiment)

A dental clinic wants to know whether reminder emails get more patients to book a cleaning. It recruits 360 volunteers who are overdue for a cleaning and randomly assigns 240 of them to get a reminder email and the other 120 to get no reminder. Within 30 days, 108 patients in the email group and 36 in the no-reminder group booked a cleaning. Construct a 90% confidence interval for the difference in the proportions.
State: We want to estimate pE−pNp_E - p_N, where pEp_E is the true proportion of patients like these who would book a cleaning within 30 days if they got a reminder email and pNp_N is the true proportion who would book a cleaning within 30 days with no reminder, with 90% confidence.
Plan: Two-sample zz-interval for pE−pNp_E - p_N.
  • Randomization: patients were randomly assigned to the two groups (a randomized experiment).
  • 10%: not needed, because the data come from a randomized experiment, not from sampling a population.
  • Normality: the counts 108108, 240−108=132240 - 108 = 132, 3636, and 120−36=84120 - 36 = 84 are all at least 10.
Do: p^E=108240=0.45\hat{p}_E = \frac{108}{240} = 0.45 and p^N=36120=0.30\hat{p}_N = \frac{36}{120} = 0.30, so the point estimate is 0.45−0.30=0.150.45 - 0.30 = 0.15.
SE=0.45(0.55)240+0.30(0.70)120=0.001031+0.001750≈0.0527SE = \sqrt{\frac{0.45(0.55)}{240} + \frac{0.30(0.70)}{120}} = \sqrt{0.001031 + 0.001750} \approx 0.0527
The groups don't have to be the same size. Each term under the square root uses its own group's sample size.
MOE=1.645(0.0527)≈0.087MOE = 1.645(0.0527) \approx 0.0870.15±0.087=(0.063,0.237)0.15 \pm 0.087 = (0.063, 0.237)
Conclude: We are 90% confident that the interval from 0.0630.063 to 0.2370.237 captures the true difference in the proportions of patients like these who book a cleaning within 30 days (email minus no reminder). The volunteers weren't a random sample, so the results apply to patients like the ones in this study. Using an interval like this to back up a claim, such as "reminders work," is the focus of Topic 3.11.

Common mistakes

  • Defining the parameter as p^1−p^2\hat{p}_1 - \hat{p}_2. The parameter is the difference in the true population proportions, p1−p2p_1 - p_2, described in context.
  • Not saying which way you subtracted. A negative interval means nothing to a reader who doesn't know the order.
  • Checking normality with only one sample, or with proportions instead of counts. All four observed counts must be at least 10.
  • Requiring the 10% condition for an experiment, or calling volunteers a random sample.
  • Adding standard errors. Add the two variance terms under one square root.
  • Pooling the proportions. A confidence interval uses each sample's own p^\hat{p}. A combined (pooled) proportion is only used in the test for a difference (Topics 3.12 and 3.13).

AP® is a registered trademark of the College Board, which is not affiliated with Dove's Library and was not involved in the production of, and does not endorse, this website.

Providing free, high-quality AP notes to help students succeed, earn college credit, and reach their educational goals, ensuring everyone has access to the resources they need.

© 2026 Standard Learning Group, Inc., which operates Dove's Library. All rights reserved.