An online A/B test configured for a 50/50 split logs 50,800 users in control and 49,200 in treatment out of 100,000 total. What does a χ2 goodness-of-fit test at α=0.01 (critical value χ1,0.992=6.635) show about sample ratio mismatch (SRM), and why must metric analysis stop if SRM fails?

ML systems and evaluation, Online experiments
Level L2 Elementary. Length Medium. Nature Mat Mathematical.

What's being asked

Whether you can run the standard SRM diagnostic test and understand why an unbalanced split invalidates causal inference.

Key idea

Under a valid 50/50 split of N users, expected counts are EC=ET=N/2, and χ2=∑(Oi−Ei)2Ei tests whether observed counts Oi deviate beyond random chance; a failed SRM test signals selection or logging bias that ruins treatment comparability.

Steps

  1. State the null hypothesis H0:pC=pT=0.5 (where pC and pT are the control and treatment assignment probabilities) on N=100,000 users, giving expected counts EC=ET=50,000.
  2. Compute the test statistic: χ2=(50,800−50,000)250,000+(49,200−50,000)250,000=8002+(−800)250,000=1,280,00050,000=25.6.
  3. Compare with the critical value: 25.6>6.635 (in fact p<10−6), so reject H0 and declare a sample ratio mismatch.
  4. Explain why to halt analysis: an 800-user deficit in treatment is rarely benign—it often happens when treatment crashes or adds latency so users drop off before logging, leaving a biased subset of survivors whose metrics cannot be trusted.

Common mistakes

How long your answer should be

Three lines of arithmetic and two sentences on why SRM invalidates the test; 3 minutes.

Last checked on 4 December 2026.

Read this

Previous in ML systems and evaluation: You are training a pneumonia detector on 5,000 chest X-rays collected from 500 patients (10 scans per patient). Why does standard or stratified k-fold cross-validation overestimate test accuracy, and how does group k-fold fix it?
Next in ML systems and evaluation: What is the difference between unstructured magnitude pruning and structured pruning, and why does 80% unstructured sparsity often give little wall-clock speedup on standard GPUs?