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

Confidence Interval for
Difference of Proportions

Learn to construct and interpret confidence intervals for \(p_1 - p_2\), comparing proportions from two independent populations.

AP Statistics

What is a Sample Proportion?

A sample proportion \(\hat{p}\) measures the fraction of successes in a sample. If you survey \(n\) people and \(x\) say "yes," then:

$$\hat{p} = \frac{x}{n}$$

Why Compare Two Proportions?

Many real-world questions involve comparing groups. We want to estimate how much one group's proportion differs from another's.

Medicine
Does Drug A have a higher cure rate than Drug B?
Marketing
Does Ad Design 1 yield more clicks than Design 2?
Policy
Do urban and rural voters differ on an issue?

The Big Picture: Point Estimate to Interval

\(\hat{p}_1 - \hat{p}_2\) Lower Upper Margin of Error Confidence Interval \(\text{(point estimate)} \pm \text{(margin of error)}\)

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 from the standard normal distribution for your confidence level
SE
Standard error: measures variability of the sampling distribution

Understanding the Standard Error

Because the two samples are independent, the variance of the difference equals the sum of the individual variances:

$$SE = \sqrt{\frac{\hat{p}_1(1-\hat{p}_1)}{n_1} + \frac{\hat{p}_2(1-\hat{p}_2)}{n_2}}$$

Common \(z^*\) Critical Values

Confidence Level \(z^*\) Value \(\alpha\)
90%1.6450.10
95%1.9600.05
99%2.5760.01

Conditions to Check First

1
Random: Both samples must be randomly selected or come from randomized experiments.
2
Independent: The two samples must be independent of each other. If sampling without replacement, each sample must be < 10% of its population.
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. Difference of Proportions

Feature One Proportion CI Difference of Proportions 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
Samples 1 2 (independent)

Step-by-Step Procedure

1
Identify: State the parameter \(p_1 - p_2\) and the confidence level.
2
Check conditions: Random, Independent (10% rule), Normal (large counts).
3
Calculate: Compute \(\hat{p}_1\), \(\hat{p}_2\), \(SE\), and the interval \((\hat{p}_1 - \hat{p}_2) \pm z^* \cdot SE\).
4
Interpret: "We are C% confident that the true difference \(p_1 - p_2\) is between (lower, upper)."

Example 1: Drug Trial

Problem: In a clinical trial, 120 of 200 patients on Drug A improved, while 95 of 200 on Drug B improved. Construct a 95% CI for \(p_A - p_B\).

Drug A
\(\hat{p}_1 = \frac{120}{200} = 0.60\)
\(n_1 = 200\)
Drug B
\(\hat{p}_2 = \frac{95}{200} = 0.475\)
\(n_2 = 200\)

Example 1: Calculation

1
Check large counts: \(200(0.60) = 120 \geq 10\) ✓, \(200(0.40) = 80 \geq 10\) ✓, \(200(0.475) = 95 \geq 10\) ✓, \(200(0.525) = 105 \geq 10\) ✓
2
Standard error: \(SE = \sqrt{\frac{0.60 \cdot 0.40}{200} + \frac{0.475 \cdot 0.525}{200}} = \sqrt{0.0012 + 0.001247} \approx 0.04946\)
3
Margin of error: \(1.96 \times 0.04946 \approx 0.0969\)
$$0.125 \pm 0.0969 = (0.028,\; 0.222)$$

Example 2: Voter Survey

Problem: A pollster surveys two cities. In City 1, 312 of 500 support a measure. In City 2, 288 of 500 support it. Build a 99% CI for \(p_1 - p_2\).

1
\(\hat{p}_1 = 0.624\), \(\hat{p}_2 = 0.576\), difference \(= 0.048\)
2
\(SE = \sqrt{\frac{0.624 \cdot 0.376}{500} + \frac{0.576 \cdot 0.424}{500}} = \sqrt{0.000469 + 0.000488} \approx 0.03094\)
3
At 99%: \(z^* = 2.576\). ME \(= 2.576 \times 0.03094 \approx 0.0797\)
$$0.048 \pm 0.0797 = (-0.032,\; 0.128)$$

Interpreting the Interval

0 Entirely positive \(p_1 > p_2\) Contains zero No evidence Entirely negative \(p_1 < p_2\)

Common Mistakes to Avoid

✕ Using Pooled \(\hat{p}\)
Pooling proportions is for hypothesis tests (under \(H_0: p_1 = p_2\)). For CIs, use each sample's own \(\hat{p}\).
✕ Subtracting SEs
Standard errors do not subtract. You add variances, then take the square root: \(\sqrt{SE_1^2 + SE_2^2}\).
✕ Wrong Interpretation
Never say "95% probability" that the true difference is in the interval. Say "95% confident."

Summary Table

Component Formula / Rule
Point Estimate \(\hat{p}_1 - \hat{p}_2\)
Standard Error \(\sqrt{\frac{\hat{p}_1(1-\hat{p}_1)}{n_1} + \frac{\hat{p}_2(1-\hat{p}_2)}{n_2}}\)
Margin of Error \(z^* \times SE\)
Interval \((\hat{p}_1 - \hat{p}_2) \pm z^* \cdot SE\)
Conditions Random, Independent (10%), Normal (4 large counts)
Contains 0? No evidence of difference at that level

Question 1 of 5

What is the point estimate for a confidence interval for the difference of proportions?

Question 2 of 5

Which \(z^*\) value is used for a 95% confidence interval?

Question 3 of 5

A 95% CI for \(p_1 - p_2\) is \((0.03, 0.15)\). What can you conclude?

Question 4 of 5

When computing the standard error for a CI for \(p_1 - p_2\), why do we add the two variance terms?

Question 5 of 5

Given \(\hat{p}_1 = 0.45\), \(n_1 = 300\), \(\hat{p}_2 = 0.38\), \(n_2 = 250\). Which large counts check fails?