Variance reduction in experiments using covariate adjustment techniques

Victor Bouzas, David Masip Bonet10 Jan 2023

Problem

As a metric gets optimized, each new test has to detect a smaller effect. The usual fixes are more users, which exposes people to a possibly worse variant, or longer runs, which mean fewer tests. Covariate adjustment lowers the variance of the effect estimate using data already in the warehouse. The catch is choosing the method and covariates: a covariate affected by the treatment biases the estimate, and an unrelated one gives nothing.

Example from the article: in a Glovo recommendation test on session-to-order conversion, a customer's historical conversion rate, hour of day and day of week explain part of the noise.

Solution in brief

Add pre-treatment covariates to the effect estimate. CUPED uses the pre-experiment outcome mean, CUPAC an ML prediction of the outcome, and doubly robust estimation fits one outcome model per arm with cross-fitting. In a simulation, only the ML-based methods stay efficient when the outcome depends non-linearly on covariates.

Questions this case answers
  • How to shrink the variance of a randomized-experiment effect estimate when the metric is noisy and more traffic or longer runs are not affordable
  • How to detect a smaller treatment effect in an A/B test without running it longer?
  • How to choose between regression adjustment, CUPED, CUPAC and doubly robust estimation?
  • How to pick covariates that cut variance without biasing the effect estimate?

Tools and methods

  • CUPED — adjusts the outcome by a pre-experiment covariate with a fitted slope; equals a linear regression.
  • Regression adjustment — regresses the outcome on treatment and covariates, optionally with an interaction.
  • CUPAC — CUPED where the covariate is a gradient-boosting prediction from pre-experiment data.
  • Doubly robust estimation — two outcome models (control, treatment) fitted with 2-fold cross-fitting.
  • scikit-learn and statsmodels — gradient-boosting regressor and OLS in the repository.
Continue reading — it's free

Google or a one-time email code. No password.