Q&A-1Explain why randomisation is the point and how it changes a production decision.
Answer
The short version. Randomisation is the point because it is the only thing that makes assignment independent of the outcome you are measuring. Bigger samples, better dashboards and regression controls reduce noise or adjust for what you already measured. Randomisation removes the confounding you never measured.
With potential outcomes (Y(1) if a user gets the feature, Y(0) if not) the naive difference in means decomposes as:
E[Y|T=1] - E[Y|T=0] = E[Y(1) - Y(0)] + ( E[Y(0)|T=1] - E[Y(0)|T=0] )
\___ effect ___/ \_______ selection bias _______/Random assignment makes T independent of (Y(0), Y(1)), so the bias term is zero in expectation and the difference estimates the average treatment effect. It also gives you a known sampling variance, which is what lets you size the test before you run it.
How it changes the production decision. Without randomisation the decision is "the metric moved, ship it": you cannot bound your error rate. With it, you commit to a rule before seeing the data: ship if the 95% CI on the primary metric excludes zero and guardrails (p99 latency, error rate) do not regress past a set threshold. You can also price the test in advance. Baseline conversion 4%, you want to detect a 10% relative lift (0.4pp), 80% power, α = 0.05 two-sided:
n per arm ≈ 16 · p(1-p) / δ² = 16 · 0.04 · 0.96 / 0.004² ≈ 38,000So ~77k users. At 5k eligible users/day that is a 15-day 50/50 split: 15 days where half your users do not get the feature. That number, not the p-value, is usually what reshapes the launch.
Alternatives, and when not to randomise.
| Design | What it buys | What it costs |
|---|---|---|
| User-level A/B | Unbiased ATE, known variance | Needs traffic; cannot test network effects |
| Pre/post | No split needed | Confounded by seasonality and other launches; 5-10% week-over-week swings are normal |
| Matched / propensity score | Works when you cannot withhold | Balances only observed covariates; unconfoundedness is untestable |
| Switchback / geo | Handles interference | Fewer units, wider CI; carryover between windows |
Do not randomise when you cannot withhold the treatment (a security patch), when spillover between arms is large (marketplace inventory, social features), or when the decision is cheap and reversible, then ship and watch.
Failure modes and how you catch them.
- Sample ratio mismatch: you asked for 50/50 and got 49.2/50.8 on 100k users (χ² p < 0.001). Almost always a logging or bot-filter bug applied after assignment. Check assignment counts daily.
- Peeking: stopping the first day p < 0.05 pushes the false-positive rate from 5% toward 20-30% over ~20 looks. Pre-register the duration or use a sequential test.
- Novelty effect: week-one lift decays. Plot effect by days-since-exposure.
- Differential attrition: users drop out differently by arm. Compare pre-assignment covariates and post-assignment logging rates.
The senior move is to randomise at assignment and analyse by assigned group regardless of what users did afterwards: that is what preserves the independence you paid for.
Curated: · Written: · Reviewed:
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.