5% baseline, 1pp effect, 95/80
- Baseline conversion rate
- 5%
- Minimum detectable effect (absolute, pp)
- 1%
- Confidence
- 95%
- Power
- 80%
Sample size per arm7,457
DRV-022: standard normal quantiles
Open this exampleSample size per arm for a two-proportion test. The inverse-square relationship is the insight: halving the detectable effect quadruples the sample you need.
Also called: how many users for an a b test, split test sample size.
7,457 per arm, 14,914 in total. Halving the effect you want to detect would quadruple this. Sample size scales with the inverse square of the effect, which is the real answer to "why does my test need so many visitors".
The formula balances two error rates. The chance of calling a difference that is not there, and the chance of missing one that is. At 95% confidence and 80% power the z-terms sum to 2.80, whose square is 7.849. Everything else is the variance of the baseline rate over the square of the effect you want to catch.
n = 2 * (z_alpha + z_beta)^2 * p*(1-p) / delta^2Full derivation: Why your A/B test needs so many visitors
Each of these is asserted on every build. If a change to the engine ever moved one of these answers, the build would fail before the page could print it.
Sample size per arm7,457
DRV-022: standard normal quantiles
Open this exampleSample size per arm29,826
DRV-022 inverse-square relationship; independently computed with Python NormalDist
Open this exampleSample size per arm0
degenerate case: an infinite sample, reported as 0 rather than Infinity
Open this example