MLCrack

    EXPERIMENTATION & A/B TESTING · INTERVIEW QUESTION

    What is CUPED and how does it reduce variance in A/B tests?

    🔴 advanced · Advanced Experimentation

    Hint: Using pre-experiment data as a control variate.

    Answer

    CUPED (Controlled-experiment Using Pre-Experiment Data) reduces metric variance by leveraging pre-experiment observations as control variates. Technique: Y_cv = Y - θ(X - E[X]) where Y is the metric, X is the pre-experiment covariate (e.g., pre-experiment revenue), and θ = Cov(X,Y)/Var(X). The adjusted metric Y_cv has lower variance: Var(Y_cv) = Var(Y)(1 - ρ²) where ρ is the correlation between X and Y.

    Interview reasoning

    Benefits:

    1. Can reduce variance by 50%+ (depending on correlation)
    2. Same statistical validity as standard A/B test
    3. Shorter experiments or detecting smaller effects. Requirements: pre-experiment data correlated with the metric. Widely used at Microsoft, Netflix, Uber. Similar techniques: CUPAC (Control Using Predictions As Covariates: adjustment using model predictions as control variates), regression adjustment, doubly robust estimators. This is one of the most impactful practical techniques for experiment platforms.

    Pretreatment covariates can explain outcome variation without removing treatment-caused change. In CUPED, subtract theta times centered X with theta=Cov(Y,X)/Var(X). Under the ideal linear setting, residual variance is original variance times (1-rho squared). Use common centering/fitting and explicit rules for absent history.

    Worked example. At correlation 0.8, residual variance can fall to 36% in the simplified model.

    Validation

    Check balance, availability and missing-history cohorts; compare adjusted/unadjusted estimates and A/A interval coverage.

    Common pitfalls

    Less estimator variance does not mean modifying away the treatment signal. Post-treatment adjustment or arm-specific arbitrary rules can bias the effect.