Two Proportions
To test whether two percentages really differ, like sign-up rates on two versions of a page, compare the two sample proportions. For the standard error, pretend is true and the groups share one rate, and estimate that rate from both groups pooled together.
What the symbols mean
- Successes in group 1
The count, not the proportion.
- Group 1 proportion
x₁ divided by n₁.
- Pooled proportion
All successes over all trials: the common p if H₀ is true.
Explanation
A two-proportion test is simply a check of whether two groups have different rates of something, like the share of visitors who sign up on page A versus page B. The formula has two parts. First, (the pooled rate: all the sign-ups from both groups over all the visitors). Then , with (the gap between the two rates) on top and a standard error built from the pooled rate on the bottom. It's the one-proportion test from before, stretched to cover two groups.
Hypotheses: . Under the groups share one proportion, best estimated by pooling them.
Why pool? The test works out how surprising your gap would be if were true. If it is, both groups have the same rate, and the best estimate of that one rate uses all the data at once. That's the same logic as using in the one-proportion test: the standard error comes from the world describes. The part is variances adding again, one term for each group.
Conditions: at least 10 successes and 10 failures in each group, and independent random samples.
A common mistake. It's tempting to watch an A/B test as data come in and stop the moment crosses 1.96. That inflates false alarms: random wobbles cross the line now and then, and stopping at the first crossing catches them. Decide the sample size in advance, then test once.
See it
Worked examples
Version A of a web page: 120 sign-ups from 1,000 visitors. Version B: 150 from 1,000. Test .
- 1
The sample rates are and . Pooling all 270 sign-ups over 2,000 visitors gives .
Practice
Type your answer and check it. Solve them all to complete the lesson.
A: 120 of 1,000; B: 150 of 1,000. Find the pooled proportion.
Find the standard error of .
Find the statistic.
Find the two-tailed p-value.
Why pool the proportions?
In an A/B test, 200 of 4,000 visitors clicked ad A and 260 of 4,000 clicked ad B. Find the pooled proportion.
Find the statistic for that test.
The hardest one here. Get it, and you've got this lesson.
With the same click rates (5% and 6.5%), what is the smallest number of visitors per ad for which the difference reaches ?
Where it's used
A/B tests of sign-up rates, vaccine trials comparing infection rates, and polls comparing support between groups.