
Size matters: How to plan test duration when using CUPED
CUPED is a powerful technique that not only enhances the sensitivity of your tests but also helps in resource optimization by reducing the number of subjects needed for experiments.

CUPED is a variance reduction technique that uses each user's pre-experiment behaviour to remove predictable variation from the outcome. The treatment effect is unchanged and the noise around it shrinks, so the same experiment detects smaller effects with the same traffic.
Most of the variation in an experiment metric has nothing to do with the experiment. Heavy users were heavy users last month; low-spend accounts were low-spend accounts. That variation is noise as far as the comparison is concerned, and it is what makes the standard error large and the sample size enormous. CUPED — Controlled experiments Using Pre-Existing Data — subtracts the predictable part out, using each user's own history as the predictor.
The mechanism is a regression adjustment. For each user you take the outcome Y during the experiment and a covariate X measured *before* it started — most often the same metric over the preceding weeks — and analyse Y − θX instead of Y, where θ is chosen to minimise variance. Because X was fixed before assignment, it cannot have been affected by the treatment, so subtracting it removes noise without touching the effect. The adjusted estimate is unbiased for exactly the same quantity the unadjusted one estimates.
How much it saves depends entirely on how well the pre-period predicts the experiment period. The variance falls by a factor of 1 − ρ², so a correlation of 0.5 removes 25% of the variance and a correlation of 0.7 removes about half. In practice: revenue and engagement metrics on logged-in users with history often reach 0.5-0.7, which is a 25-50% reduction in required traffic. Conversion on first-time visitors has no pre-period at all and CUPED does nothing. Knowing which of those you have is a five-minute correlation check that should precede any variance-reduction project.
Two conditions have to hold and both are easy to break. The covariate must be measured strictly before assignment — using any data from during the experiment lets the treatment leak into the adjustment and biases the result, which is the one genuinely dangerous mistake here. And θ should be estimated from the pooled data across arms rather than separately per arm, which keeps the adjustment from absorbing part of the effect you are trying to measure.
It changes test planning as well as analysis. Because the variance is lower, the minimum detectable effect for a given duration falls, or the duration for a given MDE falls — and the sample-size calculation has to use the *adjusted* variance or it will demand traffic you no longer need. We work through the planning side in how to plan test duration when using CUPED. New-user experiments, anonymous traffic and cold-start products remain outside its reach, and for those the levers are triggering at exposure and choosing a denser metric.
One adjustment and one variance identity. Everything about how much CUPED is worth follows from the correlation between the covariate and the outcome.
Y_cuped = Y − θ·( X − X̄ )X is the pre-experiment covariate, X̄ its overall mean. Centring keeps the adjusted metric on the same scale as the original.
θ = Cov(Y, X) / Var(X)The least-squares slope of Y on X. Estimate it on the pooled data across arms, not within each arm, so the adjustment cannot absorb the treatment effect.
Var(Y_cuped) = Var(Y) · (1 − ρ²)ρ = 0.3 removes 9% of the variance; 0.5 removes 25%; 0.7 removes 51%. Sample size falls by the same proportion — see the two-sample t-test calculator.
MDE_cuped = MDE · √(1 − ρ²)At ρ = 0.7 the detectable effect shrinks by 29% for the same traffic, or the duration halves for the same MDE.
A subscription product wants to test a new billing page on revenue per user. Unadjusted, the metric has a standard deviation of £42 against a mean of £31, and the required sample for a 3% MDE at 80% power is 143,000 per arm — about nine weeks. Each user's revenue over the four weeks before the test correlates with their revenue during it at ρ = 0.62.
The same experiment, at the same power and the same 3% MDE, runs in five and a half weeks instead of nine. The estimate itself is unchanged.
Three and a half weeks recovered for the cost of joining one pre-period table, which is why this is usually the highest-return change a mature experimentation platform can make. Two details decide whether it holds up. The 81% coverage matters: users without a pre-period get θ·(X − X̄) = 0 and simply carry their unadjusted value, so the realised saving is a little below the headline — plan against the blended figure, not the 38.4%. And the correlation has to be computed on a *past* experiment or a holdout, not on this one, because measuring ρ on live experiment data and then using it to adjust that same data is how the treatment effect quietly leaks into the covariate.

CUPED is a powerful technique that not only enhances the sensitivity of your tests but also helps in resource optimization by reducing the number of subjects needed for experiments.


In A/B testing, you often have to balance statistical power and how long the test takes. Learn how Allocation, Effect Size, CUPED & Binarization can help you.

Applying it to a live measurement problem is the part that goes wrong. If you are designing an experiment, reading a result you do not trust, or trying to work out what your marketing actually caused, that is the work we do.