Problem
A team has to measure how much extra revenue a costly recommender system brings. Finance wants an answer fast, and the business does not want a large control group that goes without recommendations. Revenue per user is noisy, so the required sample is large and the experiment runs long. Even with random assignment, the two groups differ by chance before treatment, and that skews the readout.
Example from the article: a simulated online retailer with 10,000 users, a control group without recommendations and a treatment group with them. A 5% revenue uplift needs 1,645 users by plain power analysis.
Solution in brief
CUPED regresses the target metric on covariates measured before the experiment and keeps only the residual, which removes the predictable part of the variance. Confidence intervals get narrower and the required sample gets smaller.
Questions this case answers
- How to detect a small effect on a noisy continuous metric in a randomized experiment when the sample is too expensive or too slow to grow
- How to reduce the variance of a treatment effect estimate using covariates measured before randomization
- How to shrink the sample size and duration of an A/B test on a revenue metric?
- How to correct the chance imbalance between control and treatment groups before reading the result?
Tools and methods
- CUPED — variance reduction with pre-experiment covariates.
- Power analysis — minimum sample size for a given effect, significance level and power.
- Bootstrap — confidence interval for the difference in means.
- Double machine learning — treatment effect estimate; its outcome model mirrors CUPED.
- statsmodels, SciPy, EconML — power analysis, bootstrap and
LinearDML.
Google or a one-time email code. No password.