Confidence Interval for
Difference of Proportions
Learn to construct and interpret confidence intervals for \(p_1 - p_2\), comparing proportions from two independent populations.
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:
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.
The Big Picture: Point Estimate to Interval
The Core Formula
Understanding the Standard Error
Because the two samples are independent, the variance of the difference equals the sum of the individual variances:
Common \(z^*\) Critical Values
| Confidence Level | \(z^*\) Value | \(\alpha\) |
|---|---|---|
| 90% | 1.645 | 0.10 |
| 95% | 1.960 | 0.05 |
| 99% | 2.576 | 0.01 |
Conditions to Check First
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
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\).
\(n_1 = 200\)
\(n_2 = 200\)
Example 1: Calculation
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\).
Interpreting the Interval
Common Mistakes to Avoid
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?