Your current click-through rate is 10%. How many users per arm does an A/B test need to detect an absolute increase to 11%, with a two-sided significance level of 5% and 80% power?
ML systems and evaluation, Online experiments
Level L3 Intermediate. Length Medium. Nature Mat Mathematical.
What's being asked
Whether you can turn a significance level, power and effect size into a sample size, and know what drives it.
Key idea
For two proportions, per arm. Here is the point below which a standard normal variable falls with probability : and .
Steps
- State the test: against , with (false-positive rate) and power at the minimum detectable effect .
- Explain the formula: the difference of the two sample proportions has standard error , and the gap must be standard errors wide.
- Variance term: .
- , so 14,730 users per arm, or about 29,500 in total.
- Interpret: , so detecting a 0.5-point lift needs about four times as many users. Fix the sample size in advance; stopping as soon as ("peeking") inflates the false-positive rate.
Common mistakes
- Using the relative lift (10%) instead of the absolute difference (0.01) in the denominator.
- Using , which is for a one-sided test.
- Randomising by page view but analysing by user (or the reverse), which breaks independence and understates the variance.
How long your answer should be
The formula and three lines of arithmetic; about 3 minutes.
Last checked on 4 December 2026.
Read this
Previous in ML systems and evaluation: How do accuracy, F1 score and ROC-AUC compare as evaluation metrics for a binary classifier, and when is each appropriate, considering threshold dependence, class imbalance and whether each measures ranking quality or decision quality (use a small confusion-matrix example)?
Next in ML systems and evaluation: A calibrated fraud model outputs . Missing a fraud costs ₹10,000 and flagging a legitimate transaction costs ₹1,000 in review effort. Derive the cost-minimising threshold. What would you do if the model were not calibrated?