The estimate stays unbiased when x comes from before assignment
Less variance is only worth having if the estimate still centers on the truth.
Predict
Treatment's users were already 2 sessions heavier before the test, and θ = 0.75. How much of the raw 3-session gap does CUPED take back?
Treatment's mean minus control's, in sessions
0123 sessions
x, the week before
2.0
y, the test week
3.0
y, in two parts
1.5
1.5
the gap in xthe raw gap in ythe head start, 0.75 × 2.0left for the change
A test has two arms, control and treatment: the two groups of the A/B test. On the eight users, treatment's four were already 2 sessions heavier in the week before the test. At θ=0.75, that head start is worth 0.75×2=1.5 sessions in the test week. CUPED takes it back from the raw gap of 3.0 and credits the change with the other 1.5.
In general the test compares arm means. With one θ shared by both arms, the CUPED difference is
Δ^cv=(Yˉt−Yˉc)−θ(Xˉt−Xˉc)
In words: the raw difference between treatment (t) and control (c), minus θ times the gap in their mean X.
The first term is the plain difference, unbiased already. The second has expected value zero, because X was fixed before anyone was assigned. Randomization then gives both arms the same distribution of X, so E[Xˉt−Xˉc]=0 whatever θ is. The paper names this as the reason to use pre-experiment data: it "is guaranteed to be independent of the experiment's effect, which is crucial to avoid biased results."
In any one test the gap isn't zero, and that's the point. Randomization balances X only on average. When treatment happens to draw heavier users, the raw difference overstates the effect, and CUPED takes back θ times the head start. When treatment draws lighter users, it gives the difference back.
In the editor, write head_start(y, x, t, theta): the raw difference, the gap in x, and what's left for the change.
Pick an answer above to see the rest
Instructions
1
Write head_start(y, x, t, theta): the raw difference in y, the gap in x, and the CUPED difference, all treatment minus control, as a tuple.
2
t is True for treated users, so y[t] picks theirs and y[~t] the rest.