Constructing a Confidence Interval for the Difference Between Two Population Proportions
groups can have different success rates. Use their sample results to estimate the population difference, then build an interval that shows the uncertainty in that estimate.
By the end of this lesson, you should be able to:
- Choose a two-sample -interval and define both population proportions in context.
- Check the random-sampling design, independent groups, both conditions and all observed counts.
- Calculate the sample difference and its unpooled standard error.
- Find a critical -value, margin of error and confidence-interval endpoints.
- Explain the difference in percentage points and keep the group order consistent.
- Describe how confidence level and sample sizes affect interval width.
Before you start: Review Topic 3.9’s sampling distribution for a difference and Topic 3.3’s one-proportion interval. You should know and the idea of .
First time learning this? Follow the school example through the conditions, standard error and five construction steps.
Here to revise? Use the interval checklist, then try the questions before opening hints or solutions.
The concept in 60 seconds
Imagine comparing the proportion of students who prefer digital study notes at schools. Surveying every student may be impractical, so take a random sample from each school.
The sample proportions give estimate of the difference. Because another pair of samples could give another estimate, report a confidence interval for the population difference rather than treating the observed difference as exact.
- : the observed sample-proportion difference.
- : an estimate of how much sample differences vary.
- : the multiplier for the chosen confidence level.
- : the margin of error on either side of the estimate.
The interval estimates . The population proportions are unknown. The sample proportions are known after collecting the data and are used to construct the interval.
This observed rate estimates the unknown population proportion who prefer digital notes.
This observed rate estimates the unknown population proportion with the same preference.
Build an interval for around this sample difference, allowing for uncertainty from both groups.
A success means “prefers digital notes” in both samples. The school results are fictional. The population proportions are unknown; the sample proportions are observed estimates.
Quick check: what is the interval trying to estimate?
The difference between the population success proportions, , in a stated order. It is not estimating the already observed sample difference.
Define the populations
All examples on this page are fictional teaching scenarios. For the main example, independent SRSs are selected without replacement: students from School A’s students and students from School B’s students. Both samples answer the same yes/no question about preferring digital notes.
Observed results: students in the School A sample and in the School B sample prefer digital notes. The true population proportions are unknown.
| Symbol | Meaning | School example |
|---|---|---|
| Proportion of all School A students who prefer digital notes | Unknown population proportion | |
| Proportion of all School B students who prefer digital notes | Unknown population proportion | |
| Target population difference, A minus B | Unknown parameter to estimate | |
| , | School A success count and sample size | and |
| , | School B success count and sample size | and |
| , | Separate sample proportions | and |
| Point estimate of the population difference | , or percentage points |
The observed preference proportion is percentage points higher at School A. This sample difference estimates the unknown population difference; it does not establish that the true difference is exactly .
Choose the procedure before using a formula
Use a two-sample -interval for a difference between population proportions when you want to estimate the difference in success rates for appropriately independent groups, with the conditions below satisfied.
- The response is categorical, coded as success or failure.
- There are groups, each with a success count and sample size.
- The goal is an interval estimate of .
If the response is a numerical measurement such as travel time, a proportion interval is not the right procedure. If the same people are measured times, the data are paired and the independent two-sample formula does not handle that dependence.
Keep one subtraction order
Let group 1 be School A and group 2 be School B throughout. A positive A-minus-B difference means A has the higher proportion; a negative difference means B has the higher proportion.
Quick check: is “the proportion in the sample from School A”?
No. is the proportion among all students at School A who prefer digital notes. The sample proportion is . Always identify the population and the success outcome when defining a parameter.
The standard error of the difference
Topic 3.9 used stated population proportions to calculate a theoretical sampling-distribution SD. Here, the population proportions are unknown, so we substitute each group’s own sample proportion to estimate that SD.
estimates the variance contribution from School A.
estimates the variance contribution from School B.
. Match each sample proportion to its own sample size.
The estimated variance terms add under the justified independent-group model. Their square root is the unpooled standard error in proportion-difference units, about percentage points.
School A contribution:
School B contribution:
This estimates a typical sampling fluctuation of about , or percentage points, in the sample-proportion difference around the true population difference. It is a measure of estimated spread, not the margin of error by itself.
Why do the terms add?
Variation from either sample can change the difference. For independent groups, their variance contributions add, even though the proportions subtract. Take the square root only after adding those contributions.
This interval uses an unpooled . Use for School A and for School B. Do not combine the counts into pooled proportion and substitute it into both terms.
Pooling can be relevant to a test that assumes equal population proportions. A confidence interval here estimates the difference without assuming equality. Subtracting separate one-proportion intervals is also not the construction rule for this interval.
The usual AP formula omits finite-population corrections when samples are selected without replacement. The separate checks justify the usual approximation.
Quick check: should you subtract the standard deviations?
No. Add the estimated variance contributions inside square root. Subtracting SDs could make uncertainty cancel incorrectly.
Check the conditions
1. Randomization and independent groups
For a sampling study, use independent random samples. The school example explicitly specifies independent SRSs. A voluntary poll does not become a random sample merely by having many responses.
For an appropriate two-group experiment, use random assignment of treatments to experimental units. Check that a suitable independent-group design is described. Observations from the same people before and after treatment are paired and need a method that accounts for that dependence.
2. Check separately when sampling without replacement
and .
School A: .
School B: .
Both pass. This supports treating responses within each sample as approximately independent for the usual formula. A combined sampling fraction across both populations cannot replace these checks.
The finite-population sampling check is not required merely because participants are randomly assigned to experimental groups. Random sampling and random assignment serve different purposes.
3. Check all observed counts
For this confidence interval, check observed successes and failures in each sample:
| Group | Successes | Failures | Large-count result |
|---|---|---|---|
| School A | Both | ||
| School B | Both |
For an interval, use observed successes and failures. Also justify the design and separate checks; a count table alone cannot establish those conditions.
All counts pass. Saying “both sample sizes exceed ” is not enough: a sample of with only successes fails this count criterion.
If a condition fails
- Nonrandom selection: increasing does not repair the sampling design or guarantee population generalization.
- Paired groups: do not apply the independent two-sample without addressing the dependence.
- A check fails: the usual uncorrected is not automatically justified.
- A success or failure count is below : this standard -interval is not justified by the AP large-count criterion. Do not present its endpoints as a supported interval.
Quick check: do you use a hypothesized for these count checks?
No. For this confidence interval, use each sample’s observed successes and failures. A hypothesized value belongs to a test setup, not these interval checks.
Build the confidence interval
For the main school example, construct a confidence interval for , the A-minus-B difference in population proportions preferring digital notes. The conditions have been justified above.
Step 1: calculate the point estimate
Step 2: calculate the unpooled
Step 3: choose the critical value
For a two-sided confidence level , place in the center of a standard normal curve. The remaining area, , splits equally between the tails. The positive boundary is .
. The negative boundary is about .
The chosen confidence level determines the central standard normal area.
The positive boundary is , with cumulative area to its left.
These cards show how a two-sided critical value is selected from the standard normal model. The is not a percentage of individual students within the interval.
| Confidence | Area in each tail | Cumulative area for | (rounded) |
|---|---|---|---|
For confidence, and each tail has area . The cumulative area to the left of the positive boundary is , so .
gives the standard normal boundary at the stated cumulative area.
For example, use if your calculator follows the cumulative-area, mean, SD input order. Using would give the wrong critical value for a two-sided interval.
Step 4: multiply to get the margin of error
Using rounded factors: .
The margin of error is about percentage points. It is the distance from the estimate to either endpoint. The full interval width is times the margin of error.
Step 5: subtract and add the margin of error
Lower endpoint: .
Upper endpoint: .
confidence interval for : .