How do you compute sample size for A/B?
mediumAnswer
- n ≈ 16 × per arm for two-sided test at α=0.05 and 80% power.
- Inputs: (1) baseline metric variance .
- (2) minimum detectable effect MDE.
- (3) significance α.
- (4) power (1 - β).
- Typical: 5% relative lift on a 10% baseline metric with p=0.05, 80% power needs 10K-100K users.
- Reduce sample via CUPED / stratification.
- Longer runs help capture weekly patterns but don't reduce sample requirement below noise.
Check yourself — multiple choice
- Random
- n ≈ 16 per arm for α=0.05, power=0.8; inputs: variance / MDE / α / β; typical 10K-100K for 5% lift; reduce via CUPED / stratification; longer runs = coverage not sample
- Just guess
- Not real
Power analysis: n ≈ 16σ²/; reduce via CUPED.
#experimentation
Practise MLOps & Data Quality
215 interview questions in this topic.