01 / 20
\(\hat{p}_1\)
\(\hat{p}_2\)

Confidence Intervals
Difference of Two Proportions

Learn how to construct and interpret confidence intervals for \(\hat{p}_1 - \hat{p}_2\), comparing proportions from two independent groups.

AP Statistics

What Are We Comparing?

In many real-world scenarios, we want to compare proportions from two different populations. For example: does a new drug have a higher success rate than a placebo? Do men and women differ in their support for a policy?

Population 1
True proportion \(p_1\), estimated by sample proportion \(\hat{p}_1 = \frac{x_1}{n_1}\)
Population 2
True proportion \(p_2\), estimated by sample proportion \(\hat{p}_2 = \frac{x_2}{n_2}\)

Why a Confidence Interval?

A single point estimate \(\hat{p}_1 - \hat{p}_2\) tells us our best guess, but it doesn't capture the uncertainty in our estimate. A confidence interval gives us a range of plausible values for \(p_1 - p_2\).

\(\hat{p}_1 - \hat{p}_2\)
Lower Upper
Confidence Interval for \(p_1 - p_2\)

The Sampling Distribution

When both samples are large enough, the sampling distribution of \(\hat{p}_1 - \hat{p}_2\) is approximately normal by the Central Limit Theorem.

\(p_1 - p_2\)
Approximately Normal

The Core Formula

$$(\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}}$$
\(\hat{p}_1 - \hat{p}_2\)
Point estimate: the observed difference in sample proportions
\(z^*\)
Critical value based on confidence level (e.g., 1.96 for 95%)
SE
Standard error: measures variability of the difference

Conditions to Check

1
Random: Both samples must be randomly selected or come from randomized experiments.
2
Independent: The two samples are independent of each other, and each sample is < 10% of its population (10% condition).
3
Normal (Large Counts): \(n_1\hat{p}_1 \geq 10\), \(n_1(1-\hat{p}_1) \geq 10\), \(n_2\hat{p}_2 \geq 10\), and \(n_2(1-\hat{p}_2) \geq 10\).

One Proportion vs. Two Proportions

One Proportion CI Two Proportion CI
Parameter \(p\) \(p_1 - p_2\)
Point Estimate \(\hat{p}\) \(\hat{p}_1 - \hat{p}_2\)
Standard Error \(\sqrt{\frac{\hat{p}(1-\hat{p})}{n}}\) \(\sqrt{\frac{\hat{p}_1(1-\hat{p}_1)}{n_1}+\frac{\hat{p}_2(1-\hat{p}_2)}{n_2}}\)
Large Counts 2 checks 4 checks
Interpretation Plausible values for \(p\) Plausible values for \(p_1 - p_2\)

Common Critical Values \(z^*\)

Confidence Level \(z^*\) Tail Area \(\alpha/2\)
90%1.6450.05
95%1.9600.025
99%2.5760.005

How to Apply It

1
State: Identify the parameter \(p_1 - p_2\) and the confidence level.
2
Plan: Name the procedure (two-proportion \(z\)-interval) and check all three conditions.
3
Do: Calculate \(\hat{p}_1 - \hat{p}_2\), compute SE, find \(z^*\), and build the interval.
4
Conclude: Interpret in context: "We are C% confident that the true difference \(p_1 - p_2\) is between (lower, upper)."

Example 1: Drug Trial

A clinical trial randomly assigns 200 patients to a new drug and 200 to a placebo. In the drug group, 120 out of 200 improved. In the placebo group, 90 out of 200 improved. Construct a 95% confidence interval for the difference in improvement rates.

Drug Group
\(n_1 = 200\), \(x_1 = 120\)
\(\hat{p}_1 = 0.60\)
Placebo Group
\(n_2 = 200\), \(x_2 = 90\)
\(\hat{p}_2 = 0.45\)

Example 1: Conditions and Calculation

✓
Random: Patients were randomly assigned to groups.
✓
Independent: Groups are independent (random assignment). Each is < 10% of all such patients.
✓
Large Counts: \(120, 80, 90, 110\) are all \(\geq 10\). ✓
$$SE = \sqrt{\frac{0.60 \cdot 0.40}{200} + \frac{0.45 \cdot 0.55}{200}} = \sqrt{0.0012 + 0.0012375} \approx 0.0494$$

Example 1: Interpretation

-0.1 0 0.1 0.2 0.3 0.053 0.247 0.15 0

The entire interval lies above 0, so we have convincing evidence that the drug group has a higher improvement rate.

Example 2: Voter Preferences

A pollster surveys 500 women and 400 men about support for a policy. 280 of 500 women support it, and 220 of 400 men support it. Build a 99% confidence interval for the difference in support rates.

Women
\(\hat{p}_1 = \frac{280}{500} = 0.56\)
Men
\(\hat{p}_2 = \frac{220}{400} = 0.55\)
$$SE = \sqrt{\frac{0.56 \cdot 0.44}{500} + \frac{0.55 \cdot 0.45}{400}} = \sqrt{0.0004928 + 0.00061875} \approx 0.0334$$

What Affects the Width?

Confidence Level
Higher confidence → larger \(z^*\) → wider interval
Sample Sizes
Larger \(n_1\) and \(n_2\) → smaller SE → narrower interval
Proportions
Proportions near 0.5 produce the largest SE; near 0 or 1 produce the smallest

Common Mistakes

✕ Using Pooled Proportion
Pooled \(\hat{p}\) is for hypothesis tests (under \(H_0: p_1 = p_2\)), not for confidence intervals. Use individual \(\hat{p}_1\) and \(\hat{p}_2\) in the SE formula.
✕ Forgetting Conditions
On the AP exam, failing to check Random, Independent, or Normal conditions costs significant points.
✕ Poor Interpretation
Saying "95% probability the true difference is in the interval" is wrong. Say "95% confident" and name the parameter in context.
✕ Subtracting SEs
We add the variances (fractions under the radical), never subtract. Independence means variances add.

Question 1 of 5

In a two-proportion \(z\)-interval, the standard error formula uses:

Question 2 of 5

A 95% confidence interval for \(p_1 - p_2\) is \((-0.08, 0.12)\). What can we conclude?

Question 3 of 5

Which of the following is NOT a required condition for a two-proportion \(z\)-interval?

Question 4 of 5

If \(\hat{p}_1 = 0.72\), \(n_1 = 300\), \(\hat{p}_2 = 0.65\), and \(n_2 = 250\), what is the standard error (rounded to four decimal places)?

Question 5 of 5

Which action will make a confidence interval for \(p_1 - p_2\) narrower?