AP Statistics · Topic 3.10 · Reading guide, about 4 min

Building a two-proportion z-interval

Define both parameters, check conditions and build a z-interval that estimates how far apart two proportions are.

In one minute

The two-proportion z-interval estimates how far apart two population or treatment proportions are. It answers questions like how much more of one group does something than another.

The interval has the familiar form of statistic plus or minus margin of error. What is new is the standard error, which combines both samples, and the care needed to define the parameters and the order of subtraction.

Key terms

Two-sample z-interval for p1 - p2
The procedure that turns two samples into a range of plausible values for the gap between two population or treatment proportions.
Parameter p1 - p2
The true difference in proportions. Define p1p_1 and p2p_2 in context and say which is subtracted from which.
Point estimate
The single best guess for the parameter, here p^1−p^2\hat{p}_1-\hat{p}_2.
Standard error
p^1(1−p^1)n1+p^2(1−p^2)n2\sqrt{\dfrac{\hat{p}_1(1-\hat{p}_1)}{n_1}+\dfrac{\hat{p}_2(1-\hat{p}_2)}{n_2}}, the estimated standard deviation of the difference.
Critical value
The value z∗z^* from the standard normal curve that leaves the chosen confidence level in the middle, such as 1.96 for 95%.
Margin of error
The critical value times the standard error. It is the distance from the estimate to each end of the interval.
Unpooled
Using each group's own sample proportion in the standard error. Intervals are always unpooled.
Successes and failures
The counts in each group who did and did not have the outcome of interest. Each of the four counts should be at least 10.

Define the parameters first

Begin every interval by saying what the parameters are. For example, let p1p_1 be the true proportion of all students at school A who bike to school, and p2p_2 the true proportion for school B. The parameter is p1−p2p_1-p_2, the difference between them, found by subtracting school B from school A.

The order you choose controls the sign of the answer and the way you must interpret it later. Pick an order that matches the question, and then never switch.

Conditions

Randomization: the data come from independent random samples of the two populations, or from a randomized experiment with two treatments. 10% condition: when sampling without replacement, each sample should be less than 10% of its population; a randomized experiment does not need this check. Normality: each group needs at least 10 observed successes and at least 10 observed failures.

These counts use the observed values, which differs from the test in 3.12, where pooled expected counts are used. The reason is that an interval has no null hypothesis, so we estimate from the data.

Building the interval, step by step
StepWhat to doFormula
1. NameTwo-sample z-interval for p1 - p2; define parameters and orderp1 - p2
2. CheckRandomization, 10% condition, successes and failures at least 10 in each groupCounts: 4 values
3. ComputeFind the estimate, standard error and margin of error(p-hat1 - p-hat2) +/- z* x SE
4. ConcludeInterpret the interval in context (see 3.11)Say who is subtracted from whom

Worked example

A school district wants to compare bike use at two schools. Invented data: a random sample of n1=150n_1=150 students at school A has 90 who bike, and a random sample of n2=200n_2=200 at school B has 100 who bike. Find a 95% confidence interval for p1−p2p_1-p_2, where p1p_1 and p2p_2 are the true proportions of all students at schools A and B who bike.

Conditions: both are random samples; each is less than 10% of its school (assume large schools); the successes and failures are 9090 and 6060 for school A, and 100100 and 100100 for school B, all at least 10.

Estimates: p^1=90/150=0.6000\hat{p}_1=90/150=0.6000 and p^2=100/200=0.5000\hat{p}_2=100/200=0.5000, so the point estimate is 0.6000−0.5000=0.10000.6000-0.5000=0.1000.

Standard error: 0.60(0.40)150+0.50(0.50)200=0.0016+0.00125=0.00285=0.0534\sqrt{\dfrac{0.60(0.40)}{150}+\dfrac{0.50(0.50)}{200}}=\sqrt{0.0016+0.00125}=\sqrt{0.00285}=0.0534 (rounded from 0.053385). With z∗=1.96z^*=1.96, the margin of error is 1.96(0.053385)=0.10461.96(0.053385)=0.1046.

Interval: 0.1000±0.10460.1000\pm0.1046, which is (−0.0046, 0.2046)(-0.0046,\ 0.2046). We are 95% confident that the true proportion at school A minus the true proportion at school B is between −0.0046-0.0046 and 0.20460.2046. Because the interval includes 0, it does not give convincing evidence of a difference.

Why no pooling here

Pooling combines the two samples into one overall proportion. It is justified only when you assume the two population proportions are equal, which is exactly what a null hypothesis claims. An interval makes no such assumption; it estimates the real difference, so each group keeps its own p^\hat{p}. Pooling in an interval would replace each group's own proportion in the standard error with a single combined value, which assumes the very equality the interval is meant to measure, so the margin of error would not reflect the actual variability of the difference.

How it connects

  • Back to 3.3: this is the two-group version of the one-proportion z-interval, with the same z-critical value logic.
  • Back to 3.9: the standard error is the estimated version of the standard deviation of p^1−p^2\hat{p}_1-\hat{p}_2.
  • Forward to 3.11: interpreting the interval, including what it says about 0.
  • Forward to 3.13: the test pools; the interval does not.

Common mistakes

  • Pooling in an interval. Intervals always use the separate p^1\hat{p}_1 and p^2\hat{p}_2.
  • Forgetting the order of subtraction. Define p1−p2p_1-p_2 in words, and keep the same order in the estimate and in the interpretation.
  • Checking only one group's counts. All four of successes and failures need to be at least 10.
  • Mismatching sample sizes. The nn values go under the matching proportion: n1n_1 with p^1\hat{p}_1, n2n_2 with p^2\hat{p}_2.

How it shows up on the exam

  • A scenario with two sample counts asks for a complete interval: parameters, conditions, calculation and conclusion.
  • A short prompt gives a margin of error or a standard error and asks you to complete or interpret an interval.
  • A multiple-choice item asks which procedure or which formula applies.

Check yourself

  1. Why does an interval use observed successes and failures rather than pooled expected counts?
  2. What would the interval look like if you reversed the order of subtraction?
  3. What happens to the margin of error if both sample sizes are four times as large?

Practice this topic. AP Practice questions on exactly what this lesson covers, with an explanation for every answer.