CUPED, short for Controlled-experiment using pre-experiment data, is a variance reduction technique for randomized online experiments that adjusts each user’s outcome metric with a covariate measured before the experiment started. In experimentation, it lets a team reach the same statistical power with a smaller sample or a shorter test, without changing what the experiment estimates.
The method was introduced for large-scale web A/B testing in 2013 and has since become a standard feature of experimentation platforms. Its core insight is simple: much of the noise in a metric such as revenue per user is explained by how users behaved before the test, and that pre-period behavior cannot have been influenced by the treatment.
How CUPED adjusts the outcome metric
CUPED replaces the observed metric Y with an adjusted metric Y_cuped = Y - θ(X - mean(X)), where X is the pre-experiment covariate for the same user. The coefficient θ equals cov(X, Y) / var(X), the slope of an ordinary least squares regression of Y on X, estimated on pooled data from all experiment groups.
Because X is measured before randomization, its expected value is identical in the control group and the treatment group. Subtracting a centered X therefore leaves the treatment effect estimate unbiased while removing the portion of variance that X explains. The variance of the adjusted metric equals var(Y)(1 – ρ²), where ρ is the correlation between X and Y.
The following table shows how the correlation between covariate and metric translates into variance reduction and sample savings.
| Correlation ρ | Remaining variance | Sample needed for equal power |
|---|---|---|
| 0.3 | 91 percent | About 91 percent |
| 0.5 | 75 percent | About 75 percent |
| 0.7 | 51 percent | About half |
| 0.9 | 19 percent | About one fifth |
Since required sample size is proportional to variance, a correlation of 0.7 roughly halves the users or days needed to detect the same minimum detectable effect.
Choosing a good pre-experiment covariate
The quality of CUPED depends almost entirely on the choice of covariate. The best covariate is usually the same metric measured over a pre-period, for example sessions per user in the two weeks before the test when the outcome is sessions per user during the test.
| Covariate | Typical correlation | Main limitation |
|---|---|---|
| Same metric, pre-period | High for engaged users | Missing for new users |
| Related metric, pre-period | Moderate | Weaker reduction |
| User attributes such as tenure | Low to moderate | Explains little short-term variance |
| Model prediction of the outcome | Often highest | More complex to build and validate |
The covariate must be unaffected by the treatment. Any variable collected after exposure, even a few minutes later, can absorb part of the true effect and bias the estimate. A pre-period of one to four weeks is typical; longer windows add stability but may describe user behavior that has since changed.
New users without history are a frequent complication. A common practice sets their covariate to a constant, often zero, and includes an indicator for missing history, which keeps them in the analysis while letting returning users contribute most of the reduction.
CUPED compared with other variance reduction methods
CUPED is one member of a broader family of regression adjustment methods. It is mathematically close to analysis of covariance, and with a single covariate the two give essentially the same estimate.
| Method | Core idea | Strength | Weakness |
|---|---|---|---|
| CUPED | Subtract scaled pre-period covariate | Simple and unbiased | Needs user history |
| Stratification | Analyze within pre-defined segments | Intuitive | Coarse use of information |
| ANCOVA regression | Include covariates and treatment in a model | Handles several covariates | Requires model diagnostics |
| CUPAC | Use a machine learning prediction as covariate | Higher correlation | Pipeline complexity |
| Difference-in-differences | Compare pre and post changes | Useful without randomization | Relies on parallel trends |
Unlike difference-in-differences, CUPED requires proper randomization and does not attempt to correct for confounding. It is a precision tool, not a substitute for a valid experimental design.
Applying CUPED in an experimentation workflow
In practice, CUPED is applied at analysis time, so it does not change randomization, assignment or traffic allocation. Teams should still plan sample size with the expected reduction in mind, because underestimating the correlation leads to tests that run longer than necessary.
- Define the outcome metric and the pre-period window before the experiment starts.
- Compute X for every assigned user, including a rule for users without history.
- Estimate θ on pooled data from all groups, not separately per group.
- Calculate adjusted metrics and run the usual t-test or confidence interval on them.
- Report both raw and adjusted estimates to confirm they point in the same direction.
For ratio metrics such as click-through rate, the adjustment is combined with the delta method so that the variance estimate stays correct when the analysis unit differs from the randomization unit.
Limitations and common mistakes
CUPED is robust when applied correctly, but several errors appear repeatedly in production experimentation platforms. The table below lists the most frequent ones with their causes and fixes.
| Symptom | Likely cause | Fix |
|---|---|---|
| Biased effect estimate | Covariate measured after exposure | Use only pre-assignment data |
| Little or no reduction | Weak correlation or short history | Use the same metric over a longer window |
| Inflated false positives | θ estimated separately per group | Estimate θ on pooled data |
| Distorted ratio metrics | Naive per-user adjustment | Apply the delta method |
CUPED also cannot fix sample ratio mismatch, novelty effects or peeking. It reduces random noise, but it does not repair a flawed design, and adjusted results should never be selected after comparing them with raw results to obtain significance.
A non-technical view
When a company tests a new website design, user behavior is naturally very uneven: some people buy often and some rarely. That unevenness hides small improvements. CUPED uses what each person did before the test to account for those natural differences.
Imagine comparing two fertilizers on plants that started at different heights. Measuring growth instead of final height makes the comparison much clearer. CUPED works the same way, so the company can reach a reliable answer faster and with fewer visitors.
A concrete example
An online grocery service wants to test a redesigned checkout page and measures orders per user over 14 days. Without adjustment, the power analysis says the test needs about 400,000 users to detect a 1 percent lift, which would take nearly four weeks of traffic.
The analysts use each user’s order count from the 28 days before assignment as the covariate. The correlation with the in-test metric is about 0.65, which removes roughly 42 percent of the variance. The same lift becomes detectable with around 230,000 users, so the test finishes in about two weeks and the team ships the winning checkout two weeks earlier.