Skip to content

CUPED & ratio metrics

Not a calculator. Two things that go wrong once your metric stops being a simple conversion rate, and one technique that is worth more than most of the experiments you will run this quarter.

1. Variance reduction: buying traffic you do not have

Every calculator in this suite tells you the same depressing thing: you need more users than you have. There is one honest way around it that does not involve lowering your standards, and it is that a great deal of the variation you are fighting was already there before the experiment started. Heavy users were heavy users last month too. If you know that, you can subtract it.

That is CUPED. Take a covariate X measured before the experiment, and analyse an adjusted metric instead of the raw one:

Y_cv = Y − θ(X − E[X])   where   θ = cov(Y, X) / var(X)

The variance of the adjusted metric is var(Y) × (1 − ρ²), where ρ is the correlation between the covariate and the metric. Drag it:

Simulation
0.60
-- of the variance removed
  1. rho--
  2. traffic--
  3. days--
Each point is a user: their pre-period value against their value during the experiment. The line is θ: how much of today the past already explains.
What that does to the thing you care about: the spread of the measured difference between your two arms. Narrower means you can see smaller effects with the same traffic.

Slider positions live in the URL.

Where this stops being free. Three conditions, and violating the last one is how people get burned. The covariate has to exist, which rules out users who are new. It has to be correlated, and how strongly is a property of your metric that you do not get to choose. And it must be measured before randomisation. Use an in-experiment covariate and the whole argument collapses, because the treatment can move it. The original paper reports exactly that: a covariate measured during the experiment reversed the sign of a known-positive effect and reported the reversal with a tight confidence interval.

What it is worth, on real metrics

The numbers people quote for CUPED come from Bing, in the paper that introduced it, and they are worth knowing because they are so uneven:

MetricVariance reductionWorth
Queries per user, two-week pre-period~50%Doubles your traffic
Revenue per userunder 5%Practically nothing

Revenue is the metric people most want to rescue and the one CUPED helps least, because what someone spent last month predicts what they spend this month far more weakly than you would hope. If a vendor tells you CUPED will fix your revenue test, ask them for the correlation.

2. Ratio metrics: when your standard error is quietly wrong

Here is the trap, and it is not the one people expect. It is not that revenue is skewed. It is that you randomised users and then measured sessions.

Conversion rate per session, revenue per order, click-through per pageview: all of these are ratios whose denominator is not the thing you randomised. Sessions from one user are not independent of each other: a user who converts once tends to convert again. The textbook standard error assumes every session is a fresh, independent draw. It is not, so the standard error comes out too small, and you get confident about effects that are not there.

The fix is the delta method: write the metric as a ratio of per-user averages, so the unit of analysis is the unit you randomised, and propagate the variance through the ratio.

Simulation
1.00
6
  1. naiveNaive standard error, sessions treated as independent: —
  2. deltaDelta method, users as the unit: —
  3. truthThe truth, from re-running the experiment 300 times: —

Simulating…

What people get wrong

  • "Revenue per user needs the delta method." Usually not. If you randomised users and you are measuring a per-user average, every observation is one user and they are independent: an ordinary t-test is structurally correct. The delta method is about the analysis unit differing from the randomisation unit, not about the metric being money.
  • "Revenue is too skewed for a t-test." The central limit theorem still applies to the mean of skewed data, just slowly. The usual rule of thumb asks for roughly 355 × (skewness)² observations per arm before the normal approximation is comfortable. Winsorising the tail helps the variance and biases the estimate toward zero, and your outliers are often your best customers, so think before you trim them.
  • "CUPED is regression adjustment magic." It is regression adjustment, and there is no magic in it: the gain is exactly ρ² and nothing else. It is equivalent to ANCOVA on the pre-period covariate.
  • "Estimate θ separately for each arm." No. Pool it. A per-arm θ is fitted partly to the treatment effect itself, which biases the result.
Sources, and what this page does not cover

Not covered: multi-covariate regression adjustment, variance reduction applied to ratio metrics, stratification as an alternative, bootstrap standard errors, and how to handle users with no pre-period at all beyond noting that an indicator variable is the usual answer.

Both simulations are checked against theory (the variance reduction against 1 − ρ², the delta-method standard error against a Monte Carlo of the same experiment) in the published comparison.

Part of a small suite of experimentation calculators. Every result comes with the caveat that would invalidate it, and every formula is checked against a reference implementation.

Built by Igor Lima. MIT License.

Three of your ads read, free, when we launch.

Launch date to be announced.

Join the list