In plain English
Plain randomization balances everything in expectation and nothing in particular on any given run. Split 4,000 users evenly and you can easily end up with 8% more mobile traffic in one arm — not because anything is broken, but because that is what random variation does at that scale. If mobile users behave differently, that imbalance sits inside your result and cannot be distinguished from the treatment effect.
Stratified randomization removes the possibility for characteristics you name in advance. Divide users into strata — mobile and desktop, or new and returning, or by country — and run a separate balanced assignment within each. Both arms then contain exactly the same proportion of each stratum by construction. Blocking is the same idea under a different name, more common in clinical trials and in geo experiments, where markets are grouped into blocks of similar size before assignment.
The benefit shows up in two ways. Balance on the stratifying variable is guaranteed rather than probable, which removes a source of confounding that plain randomisation only makes unlikely. And when the variable predicts the outcome, variance falls, because the between-stratum differences no longer contribute noise to the comparison — the same logic that makes a paired t-test more sensitive than an unpaired one, applied at group level rather than individual level.
How much it buys depends almost entirely on scale, and this is the part most often misstated. At a few thousand users, imbalance is a genuine risk and stratifying is valuable. At a million users per arm, plain randomisation already balances every characteristic to within a fraction of a per cent, and the variance reduction from stratifying is typically under 2% — real, but not worth a pipeline. Its home is small experiments, geo tests with a few dozen markets, and any situation where one stratum is both small and very different from the rest.
There is a cheaper alternative for large experiments that captures most of the same benefit: analyse with regression adjustment rather than stratifying at assignment time. Including the covariate in the model at analysis removes its contribution to the variance without needing anything special in the assignment layer, and it can be added retrospectively. Stratification's advantage over that is guaranteed balance, which matters when the sample is small enough for imbalance to be plausible.
The formula
The variance decomposition is what explains both the benefit and why it fades at scale. Everything else is assignment bookkeeping.
- Variance decomposition
Var_total = Var_within strata + Var_between strataStratifying removes the second term from the comparison. If strata differ little, that term was small and so is the gain.
- The reduction
Var_stratified = Var_total · ( 1 − η² )η² is the share of variance explained by the stratifying variable — the same form CUPED's (1 − ρ²) takes.
- Expected imbalance under plain randomisation
SD of arm difference in a proportion ≈ √( p(1−p) / n )At n = 4,000 that is about 0.8 percentage points; at n = 1,000,000 it is 0.05. The case for stratifying scales with this.
- The analysis-side alternative
Y = β₀ + β₁·treated + β₂·stratumRegression adjustment gets most of the variance benefit with no change to assignment — see the ANOVA calculator.
Worked example
A B2B product tests a pricing page change with 3,200 accounts, which is all the traffic available in a month. Account size varies enormously — 74% are small, 21% mid-market, 5% enterprise — and enterprise accounts convert at eight times the small-account rate. The team compares plain and stratified assignment by simulation before choosing.
- Accounts available
- 3,200 (1,600 per arm)
- Enterprise accounts
- 160 total, 5% of the base
- Conversion: small / mid / enterprise
- 2.1% / 6.8% / 17.2%
- Plain randomisation: SD of enterprise split
- ±1.4 percentage points of the arm
- Simulated runs with >20% enterprise imbalance
- 18 of 100
- Variance reduction from stratifying
- 31%
Stratifying by account size cuts the variance by 31% and eliminates an 18% chance of a materially unbalanced enterprise split.
Both numbers matter and the second is the more important one. A 31% variance reduction is a useful efficiency gain, equivalent to roughly 45% more traffic. But the 18-in-100 chance of a badly skewed enterprise split is the real risk: with 160 enterprise accounts converting at eight times the base rate, an arm receiving 20% more of them gains an apparent lift that has nothing to do with the pricing page. That is a confounded result that looks exactly like a successful test, and no amount of correct analysis afterwards can separate it from the treatment. This is the regime stratification is for. Worth stating the contrast plainly: at 3.2 million accounts rather than 3,200, the same simulation would show essentially zero chance of meaningful imbalance and a variance reduction of well under 2%, and the sensible answer would be plain randomisation with the covariate handled at analysis.
Common misconceptions
- דStratified randomization is more random than plain randomization.”
- It is more constrained. Assignment is still random within each stratum, but the overall allocation is restricted to those that balance the strata. That restriction is the point — it removes outcomes that plain randomisation would have permitted and you would not have wanted, at the cost of a slightly more complex assignment layer.
- דYou should stratify on every variable you have.”
- Each stratifying variable multiplies the number of strata, and with too many you end up with cells containing a handful of users, where balance becomes impossible and the whole exercise adds complexity for nothing. Pick the one or two variables that most strongly predict the outcome, and handle the rest at analysis if needed.
- דStratification fixes imbalance in variables you did not stratify on.”
- It guarantees balance only on the variables used, and leaves everything else to chance exactly as before. That is the fundamental limit compared with what randomisation gives you in expectation across all variables, including unmeasured ones. Stratification strengthens a few specific guarantees; it does not create new ones.