18/25
Part 5 of 5 · Follow-upsLearn and do

With one θ, CUPED is regression adjustment, up to how θ is fitted

Regress yy on an intercept, the treatment flag and xx. That model is usually called ANCOVA. Its coefficient on the flag is exactly (yˉt−yˉc)−β^ (xˉt−xˉc)(\bar{y}_t - \bar{y}_c) - \hat\beta\,(\bar{x}_t - \bar{x}_c), where β^\hat\beta, the coefficient on xx, is the slope fitted within the arms.

That's CUPED with θ=β^\theta = \hat\beta. CUPED's pooled θ\theta is fitted on all users at once, so it also picks up the gap between the arms. In 200 simulated tests of 1,000 users the two estimates never differed by more than 0.004, about 3% of a standard error.

In the editor, write ancova_effect(y, x, t): that regression, to see it part ways with CUPED on the eight users.