Two-Proportion z-Interval and z-Test
Construct and interpret a two-proportion z-interval for p₁ − p₂. Perform a two-proportion z-test using the pooled proportion p̂_c under H₀: p₁ = p₂. Apply to compare two groups in observational and experimental settings.
A lesson of AP Statistics, in Inference for Categorical Data: Proportions, about 10 minutes.
Two-Proportion z Procedures
By the end of this lesson, you will be able to construct a two-proportion z confidence interval and conduct a two-proportion z test to compare two population proportions.
When to Use Two-Proportion Procedures
Use two-proportion procedures when you want to compare proportions from two independent groups.
Parameter: $p_1 - p_2$ (difference in population proportions)
Statistic: $\hat{p}_1 - \hat{p}_2$ (difference in sample proportions)
Two-Proportion z Confidence Interval
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}}$$
Conditions:
- Random: Both samples randomly selected (or randomly assigned)
- Large Counts: $n_1\hat{p}_1 \geq 10$, $n_1(1-\hat{p}_1) \geq 10$, $n_2\hat{p}_2 \geq 10$, $n_2(1-\hat{p}_2) \geq 10$ (four checks)
- Independent: 10% condition for each group; groups are independent of each other
Interpretation: "We are C% confident that the true proportion of [Group 1] who [characteristic] is [direction] the true proportion of [Group 2] by between |L| and |U|."
If the interval contains 0, the data is consistent with $p_1 = p_2$ (no difference).
Two-Proportion z Significance Test
Hypotheses:
- $H_0: p_1 = p_2$ (or $p_1 - p_2 = 0$)
- $H_a: p_1 \neq p_2$, $p_1 > p_2$, or $p_1 < p_2$
Test statistic uses the pooled proportion:
$$\hat{p}_c = \frac{X_1 + X_2}{n_1 + n_2}$$
$$z = \frac{(\hat{p}_1 - \hat{p}_2) - 0}{\sqrt{\hat{p}_c(1-\hat{p}_c)\left(\frac{1}{n_1} + \frac{1}{n_2}\right)}}$$
Why pool? Under $H_0$, both groups have the same true proportion p. Pooling gives the best estimate of this common p.
Conditions for the test: same as the CI, but use $\hat{p}_c$ instead of $\hat{p}_1$ and $\hat{p}_2$ in the Large Counts check: $n_1\hat{p}_c \geq 10$, $n_1(1-\hat{p}_c) \geq 10$, etc.
Worked Example
A manufacturer tests whether a new process reduces defect rates. Old process: 45 defects in 500 items ($\hat{p}_1 = 0.090$). New process: 28 defects in 500 items ($\hat{p}_2 = 0.056$). Test at α = 0.05 whether the new process has a lower defect rate.