Learning Objectives
By the end of this chapter, you will be able to:
- Set up hypotheses for comparing two population proportions
- Calculate the pooled proportion and test statistic
- Perform hypothesis tests comparing two proportions
- Construct confidence intervals for difference in proportions
When to Use Two-Proportion Z-Test
Use this test when:
- Comparing two independent population proportions (p₁ vs p₂)
- Both samples are large enough:
- $n_1\hat{p}_1 \geq 10$ and $n_1(1-\hat{p}_1) \geq 10$
- $n_2\hat{p}_2 \geq 10$ and $n_2(1-\hat{p}_2) \geq 10$
- Samples are independent
flowchart TD
A[Comparing two proportions?]
B{Independent samples?}
C{Both samples large enough?}
D[Two-proportion Z-test]
E[Use other methods]
A --> B
B -->|Yes| C
B -->|No| E
C -->|Yes| D
C -->|No| E
Hypotheses for Two Proportions
| Type | H₀ | H₁ |
|---|---|---|
| Two-tailed | p₁ = p₂ | p₁ ≠ p₂ |
| Right-tailed | p₁ = p₂ | p₁ > p₂ |
| Left-tailed | p₁ = p₂ | p₁ < p₂ |
Alternative forms:
- H₀: p₁ - p₂ = 0
- H₁: p₁ - p₂ ≠ 0 (or > 0 or < 0)
Pooled Proportion
Under H₀ (p₁ = p₂), we assume a common population proportion:
\[\bar{p} = \frac{x_1 + x_2}{n_1 + n_2}\]Where:
- $x_1, x_2$ = number of successes in each sample
- $n_1, n_2$ = sample sizes
Test Statistic Formula
\[z = \frac{\hat{p}_1 - \hat{p}_2}{\sqrt{\bar{p}(1-\bar{p})\left(\frac{1}{n_1} + \frac{1}{n_2}\right)}}\]Where:
- $\hat{p}_1 = \frac{x_1}{n_1}$, $\hat{p}_2 = \frac{x_2}{n_2}$ = sample proportions
- $\bar{p}$ = pooled proportion
Standard Error (under H₀)
\[SE = \sqrt{\bar{p}(1-\bar{p})\left(\frac{1}{n_1} + \frac{1}{n_2}\right)}\]Step-by-Step Example 1: Two-Tailed Test
Problem: Compare satisfaction rates between two offices:
| Office A | Office B | |
|---|---|---|
| Sample size | 200 | 250 |
| Satisfied | 160 | 175 |
Test at α = 0.05 whether satisfaction rates differ.
Solution:
Step 1: State hypotheses
- $H_0: p_1 = p_2$ (same satisfaction rate)
- $H_1: p_1 \neq p_2$ (different rates)
Step 2: Calculate sample proportions \(\hat{p}_1 = \frac{160}{200} = 0.80\) \(\hat{p}_2 = \frac{175}{250} = 0.70\)
Step 3: Calculate pooled proportion \(\bar{p} = \frac{160 + 175}{200 + 250} = \frac{335}{450} = 0.744\)
Step 4: Calculate standard error \(SE = \sqrt{0.744 \times 0.256 \times \left(\frac{1}{200} + \frac{1}{250}\right)}\) \(= \sqrt{0.1905 \times (0.005 + 0.004)}\) \(= \sqrt{0.1905 \times 0.009} = \sqrt{0.00171} = 0.0414\)
Step 5: Calculate test statistic \(z = \frac{0.80 - 0.70}{0.0414} = \frac{0.10}{0.0414} = 2.42\)
Step 6: Find critical value
- Two-tailed, α = 0.05: z* = ±1.96
Step 7: Decision
- |z| = 2.42 > 1.96
- Reject H₀
Step 8: Conclusion At the 0.05 level of significance, there is sufficient evidence to conclude that the satisfaction rates differ between the two offices. Office A has a higher satisfaction rate.
Step-by-Step Example 2: Right-Tailed Test
Problem: A training program is tested:
| With Training | Without Training | |
|---|---|---|
| n | 150 | 180 |
| Passed | 120 | 126 |
Test at α = 0.05 if training improves pass rate.
Solution:
Step 1: State hypotheses
- $H_0: p_1 = p_2$
- $H_1: p_1 > p_2$ (trained has higher pass rate)
Step 2: Calculate sample proportions \(\hat{p}_1 = \frac{120}{150} = 0.80\) \(\hat{p}_2 = \frac{126}{180} = 0.70\)
Step 3: Calculate pooled proportion \(\bar{p} = \frac{120 + 126}{150 + 180} = \frac{246}{330} = 0.745\)
Step 4: Calculate standard error and test statistic \(SE = \sqrt{0.745 \times 0.255 \times \left(\frac{1}{150} + \frac{1}{180}\right)}\) \(= \sqrt{0.190 \times (0.00667 + 0.00556)}\) \(= \sqrt{0.190 \times 0.01222} = \sqrt{0.00232} = 0.0482\)
\[z = \frac{0.80 - 0.70}{0.0482} = \frac{0.10}{0.0482} = 2.07\]Step 5: Find critical value
- Right-tailed, α = 0.05: z* = 1.645
Step 6: Decision
- z = 2.07 > 1.645
- Reject H₀
Step 7: Conclusion At the 0.05 level of significance, there is sufficient evidence to conclude that the training program improves pass rates.
Step-by-Step Example 3: With p-Value
Problem: Compare voter preferences in two districts:
| District 1 | District 2 | |
|---|---|---|
| n | 400 | 500 |
| Favor Policy | 180 | 200 |
Test at α = 0.01 if proportions differ. Find p-value.
Solution:
Step 1: State hypotheses
- $H_0: p_1 = p_2$
- $H_1: p_1 \neq p_2$ (two-tailed)
Step 2: Calculate sample proportions \(\hat{p}_1 = \frac{180}{400} = 0.45\) \(\hat{p}_2 = \frac{200}{500} = 0.40\)
Step 3: Calculate pooled proportion \(\bar{p} = \frac{180 + 200}{400 + 500} = \frac{380}{900} = 0.422\)
Step 4: Calculate test statistic \(SE = \sqrt{0.422 \times 0.578 \times \left(\frac{1}{400} + \frac{1}{500}\right)}\) \(= \sqrt{0.244 \times 0.0045} = \sqrt{0.00110} = 0.0332\)
\[z = \frac{0.45 - 0.40}{0.0332} = \frac{0.05}{0.0332} = 1.51\]Step 5: Calculate p-value \(p\text{-value} = 2 \times P(Z > 1.51) = 2 \times (1 - 0.9345) = 2 \times 0.0655 = 0.131\)
Step 6: Decision
- p-value = 0.131 > α = 0.01
- Fail to Reject H₀
Step 7: Conclusion At the 0.01 level of significance, there is insufficient evidence to conclude that voter preferences differ between the two districts.
Confidence Interval for Difference in Proportions
For CI, we do NOT use pooled proportion:
\[(\hat{p}_1 - \hat{p}_2) \pm z^* \times \sqrt{\frac{\hat{p}_1(1-\hat{p}_1)}{n_1} + \frac{\hat{p}_2(1-\hat{p}_2)}{n_2}}\]Example 4: 95% CI for Difference
Using Example 1 data:
- $\hat{p}_1$ = 0.80, n₁ = 200
- $\hat{p}_2$ = 0.70, n₂ = 250
\(SE_{CI} = \sqrt{\frac{0.80 \times 0.20}{200} + \frac{0.70 \times 0.30}{250}}\) \(= \sqrt{0.0008 + 0.00084} = \sqrt{0.00164} = 0.0405\)
\(95\% \text{ CI} = (0.80 - 0.70) \pm 1.96 \times 0.0405\) \(= 0.10 \pm 0.079 = (0.021, 0.179)\)
Interpretation: We are 95% confident that Office A’s satisfaction rate is between 2.1 and 17.9 percentage points higher than Office B’s.
Since 0 is not in the interval, the difference is significant.
Key Difference: Test vs CI Standard Error
| Purpose | Standard Error Formula |
|---|---|
| Hypothesis Test | Uses pooled $\bar{p}$: $\sqrt{\bar{p}(1-\bar{p})\left(\frac{1}{n_1} + \frac{1}{n_2}\right)}$ |
| Confidence Interval | Uses individual $\hat{p}$s: $\sqrt{\frac{\hat{p}_1(1-\hat{p}_1)}{n_1} + \frac{\hat{p}_2(1-\hat{p}_2)}{n_2}}$ |
Summary Table
| Component | Formula |
|---|---|
| Pooled Proportion | $\bar{p} = \frac{x_1 + x_2}{n_1 + n_2}$ |
| Test Statistic | $z = \frac{\hat{p}_1 - \hat{p}_2}{\sqrt{\bar{p}(1-\bar{p})\left(\frac{1}{n_1} + \frac{1}{n_2}\right)}}$ |
| CI | $(\hat{p}1 - \hat{p}_2) \pm z^* \times SE{CI}$ |
Applications in Public Administration
| Scenario | What’s Being Compared |
|---|---|
| Policy support | Two regions/districts |
| Satisfaction rates | Before vs after change |
| Compliance rates | Two departments |
| Participation rates | Two programs |
| Success rates | Two methods/treatments |
Practice Problems
Problem 1
Compare success rates:
- Program A: n = 100, 75 successful
- Program B: n = 120, 80 successful
Test at α = 0.05 if rates differ.
Problem 2
Test if women have higher satisfaction than men:
- Women: n = 150, 105 satisfied
- Men: n = 200, 130 satisfied
Use α = 0.05.
Problem 3
For Problem 1, construct a 95% CI for the difference in success rates.
Problem 4
Survey results:
- Urban: n = 300, 195 favor policy
- Rural: n = 250, 150 favor policy
(a) Test at α = 0.01 if proportions differ (b) Find the p-value (c) Construct 99% CI for the difference
Problem 5
If z = 1.75 for a right-tailed test comparing two proportions, what is the p-value? What is the decision at α = 0.05?
Summary
| Aspect | Key Point |
|---|---|
| Purpose | Compare two independent population proportions |
| Key Formula | Pooled proportion for test, separate proportions for CI |
| H₀ | p₁ = p₂ (proportions are equal) |
| Decision | Same rules as other z-tests |
| Interpretation | Conclude about difference in population proportions |
Next Topic
In the next chapter, we will study Small Sample Tests - t-tests for when sample sizes are small (n < 30).

