Derive the optimal CUPED coefficient theta and explain why it minimizes the variance of the adjusted estimator
Quick Overview
Asks you to derive the CUPED adjustment coefficient that minimizes the variance of an A/B test metric adjusted with pre-experiment data. Tests variance algebra, the second-order check, and how the correlation with the covariate sets the size of the variance reduction.
Derive the optimal CUPED coefficient theta and explain why it minimizes the variance of the adjusted estimator
Role: Data Scientist
Category: Analytics & Experimentation
Difficulty: medium
Interview Round: Other
Derive the optimal value for the coefficient $\theta$ in CUPED, and explain why this value minimizes the variance of the adjusted estimator.
In CUPED, each unit's experiment metric $Y$ is adjusted with a covariate $X$ measured on the same unit before the experiment started: $Y_{cv} = Y - \theta\,(X - E[X])$. The treatment effect is then estimated as the difference in mean $Y_{cv}$ between treatment and control.
```hint Write the variance as a function
Expand the variance of the adjusted outcome with the rule for the variance of a linear combination. What kind of function of $\theta$ do you get, and how do you find its minimum?
```
```hint Connect unit to estimator
You minimize a per-unit variance. Check how that quantity enters the variance of the difference in means, and confirm the adjustment does not move the expected difference between the groups.
```
### What a Strong Answer Covers
- The variance of the adjusted outcome written as a function of $\theta$
- The minimizing value of $\theta$ and a check that it is a minimum
- The variance at the optimum and how it depends on the correlation between $X$ and $Y$
- Why the adjusted difference in means stays unbiased, and how the per-unit variance maps to the variance of the treatment effect estimate
### Follow-up Questions
- Why must $X$ be measured before the experiment starts?
- How do you extend CUPED to several covariates, and what does $\theta$ become?
- $\theta$ is estimated from the same data as the effect. Does that bias the estimator, and does it matter at typical experiment sizes?
- What do you do for users who have no pre-experiment data?
Overview: Asks you to derive the CUPED adjustment coefficient that minimizes the variance of an A/B test metric adjusted with pre-experiment data. Tests variance algebra, the second-order check, and how the correlation with the covariate sets the size of the variance reduction.
Derive the optimal value for the coefficient θ in CUPED, and explain why this value minimizes the variance of the adjusted estimator.
In CUPED, each unit's experiment metric Y is adjusted with a covariate X measured on the same unit before the experiment started: Ycv=Y−θ(X−E[X]). The treatment effect is then estimated as the difference in mean Ycv between treatment and control.
What a Strong Answer Covers Guidance
The variance of the adjusted outcome written as a function of
θ
The minimizing value of
θ
and a check that it is a minimum
The variance at the optimum and how it depends on the correlation between
X
and
Y
Why the adjusted difference in means stays unbiased, and how the per-unit variance maps to the variance of the treatment effect estimate
Follow-up Questions Guidance
Why must
X
be measured before the experiment starts?
How do you extend CUPED to several covariates, and what does
θ
become?
θ
is estimated from the same data as the effect. Does that bias the estimator, and does it matter at typical experiment sizes?
What do you do for users who have no pre-experiment data?