Setting Up a Two-Proportion Test
| English | Chinese | Pinyin |
|---|---|---|
| combined (pooled) proportion | 合并比例 | hé bìng bǐ lì |
The two-proportion hypotheses
- To compare two proportions, test whether they're equal.
- Null: $H_0: p_1 = p_2$ (equivalently, $p_1 - p_2 = 0$).
- Alternative: $H_a: p_1 \ne p_2$, or a one-sided $p_1 > p_2$ / $p_1 < p_2$.
- The null says "no difference"; the alternative says the groups differ.
The pooled proportion
- Under $H_0$ the two proportions are equal, so combine the samples for a single estimate.
- The combined (pooled) proportion 合并比例 is:
-
$$\hat{p}_c = \frac{\text{total successes}}{\text{total sample size}} = \frac{x_1 + x_2}{n_1 + n_2}$$
- $\hat{p}_c$ is our best estimate of the common $p$ if $H_0$ were true.
Conditions for both samples
- Same three conditions, checked for both groups:
- Random, 10%, and large counts.
- For large counts in a test, use the pooled $\hat{p}_c$: $n_1\hat{p}_c,\ n_1(1-\hat{p}_c),\ n_2\hat{p}_c,\ n_2(1-\hat{p}_c) \ge 10$.
- All four expected counts must clear $10$.
Pooled standard error
- The test's standard error uses the pooled proportion in both terms:
-
$$SE = \sqrt{\hat{p}_c(1-\hat{p}_c)\left(\frac{1}{n_1} + \frac{1}{n_2}\right)}$$
- Because $H_0$ says the proportions are equal, we use one common $\hat{p}_c$.
- This is the key difference from the interval, which kept the two $\hat{p}$'s separate.
The two-proportion TEST pools; the interval does not. Under $H_0: p_1=p_2$, use the combined $\hat{p}_c=\frac{x_1+x_2}{n_1+n_2}$ in the standard error and the large-counts check. The interval (6.8) keeps each $\hat{p}$ separate because it assumes no null. Using the wrong SE is a classic two-proportion mistake.
Group $1$: $30$ of $100$. Group $2$: $20$ of $100$.
- $H_0: p_1 = p_2$, $H_a: p_1 \ne p_2$.
- Pooled: $\hat{p}_c = \dfrac{30 + 20}{100 + 100} = \dfrac{50}{200} = 0.25$.
- SE: $\sqrt{0.25(0.75)\left(\tfrac{1}{100} + \tfrac{1}{100}\right)} = \sqrt{0.1875 \times 0.02} \approx 0.061$.
A two-proportion test states $H_0: p_1 = p_2$ vs. a one- or two-sided $H_a$. Because $H_0$ assumes equality, use the combined (pooled) proportion $\hat{p}_c = \frac{x_1+x_2}{n_1+n_2}$ in the large counts check and the pooled standard error $\sqrt{\hat{p}_c(1-\hat{p}_c)(\frac{1}{n_1}+\frac{1}{n_2})}$.
The null model: p1 = p2
Under H0 the proportions are equal, so we pool to estimate the common p.
The null hypothesis for a two-proportion test is...
H0 says the two proportions are equal (no difference).
Group 1: 30 of 100. Group 2: 20 of 100. Find the pooled proportion (x1+x2)/(n1+n2).
(30+20)/(100+100) = 50/200 = 0.25.
The two-proportion TEST uses a pooled proportion, while the interval does not.
Under H0 the proportions are equal, so the test pools.
For the test's large counts check, the expected counts use...
Under H0, use p̂_c in all four expected counts.
Under H0 the two proportions are assumed ___ (one word).
H0: p1 = p2 means equal proportions.