Two Proportions
=
(
+
)²
·
Tap a term to see what it means, or .
Calculate
Example: a candidate polls at 38%, and the campaign wants to know whether an ad takes that number to 41%. How many people must be heard in each group, with and without the ad, to detect the difference with 80% power at 5% significance? The same goes for a conversion A/B test. Leave the design effect blank for simple random samples. Change the values to work out your own case.
Step by step
What each term means
- Size of Each Group (n)
- How many people to hear in each of the two equal-sized groups for the z-test to detect the difference with the requested power. The total is twice that.
- Threshold under H₀
- The critical value zα/2 times the spread of the difference when H₀ holds and both groups have the average proportion p̄ = (p₁ + p₂)/2. For α = 5%, zα/2 ≈ 1.96. It is how far the observed difference can go by chance.
- Slack under H₁
- The power quantile zβ times the spread of the difference when each group has its own proportion. For 80% power, zβ ≈ 0.84. It is the margin that makes the real difference clear the threshold in most samples.
- Squared Difference
- The difference you want to detect, as a proportion (0.03 for 3 points). Because it is squared, halving the difference quadruples n: detecting 3 points costs four times as much as detecting 6.
- Design Effect (deff)
- How much the survey design inflates the variance compared with a simple random sample: clusters usually give 1.5 to 3, and strata can give less than 1. It multiplies n. Left blank, it equals 1. The poll simulator shows where it comes from.