EasyDeepLearn

How do you compute sample size for A/B?

medium

Answer

  • n ≈ 16 × σ2  /  (MDE)2{\sigma}^{2}\; / \;(\mathrm{MDE})^{2} per arm for two-sided test at α=0.05 and 80% power.
  • Inputs: (1) baseline metric variance σ2{\sigma}^{2}.
  • (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 σ2  /  MDE2{\sigma}^{2}\; / \;\mathrm{MDE}^{2} 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σ²/MDE2\mathrm{MDE}^{2}; reduce via CUPED.

#experimentation

Practise MLOps & Data Quality

215 interview questions in this topic.

Related questions