What is sample size?
Sample size is the number of visitors per variant required to reliably detect a chosen effect at a chosen confidence and power. Plan it before launching, not after.
The sample size formula.
n = 2 × (z₁₋α/₂ + z₁₋β)² × p(1−p) / Δ², with p the baseline conversion rate, Δ the absolute lift you want to detect, and z values from your confidence and power.
A worked example.
Baseline 4%, MDE 20% relative, 95% confidence, 80% power. Δ = 0.04 × 0.20 = 0.008. n is roughly 9,400 per variant.
How to choose MDE.
Pick the smallest lift worth shipping. Detecting smaller effects costs disproportionately more data; detecting nothing is the worst outcome.
When sample is out of reach.
Test a bigger swing, lower confidence and treat the result as directional, or batch multiple changes into one stronger variant. Do not run a test you cannot power.
