A/B Testing & Online Experimentation
Q: How do you know your new model is better?
- Randomize units (users, not requests, to avoid inconsistent experiences); choose primary metric + guardrails (latency, crashes, revenue).
- Power analysis up front: sample size
n ≈ 16σ²/δ²per arm for 80% power at α = 0.05 (δ = minimum detectable effect). - Run for full weekly cycles; avoid peeking (or use sequential testing); correct for multiple comparisons.
- Variance reduction: CUPED (use pre-experiment covariates).
- Pitfalls: novelty/primacy effects, network effects/interference (use cluster or switchback randomization), sample ratio mismatch (SRM — check it!), Simpson's paradox.
- Faster alternatives for ranking: interleaving; for exploration: multi-armed bandits.