Control variates and hypothesis testing
I haven’t looked at this in a while, so thought I would revise a bit.
To start with, I have a variable, say,
The estimator we all know and use. It’s unbiased, but it may have large variance, which means that for a fixed N, most random sums could fall away from
One idea is to introduce a new variable,
where
What is the variance of this new estimator?
Now the first two terms are non-negative. However, the last one can be negative as long as
which is the best possible variance. Realistically, we are back to where we started if we set
In hypothesis testing
Why would all this be useful for hypothesis testing?
To conduct it, we first split the population to two groups, traditionally called the “treatment” and “control”. We have intervened on the treatment group in some way, say via a variable
Suppose that the difference is indeed due to
We are now thinking about the “power “ of a hypothesis test, and there are at least three ways to improve our situation from here:
- Give up on the small effect size and go for a larger one.
- Get more
data for the estimator, i.e., make the groups larger. - Use other covariates,
, to reduce the variance of the ATE estimator. Only covariates that are independent of the way the groups are split can be used, for example pre-experiment data.
Now we can discuss two ways to increase the power of the test by using 3.
CUPED and CUPAC
You can find implementations of CUPED and CUPAC in this notebook.
CUPED stands for “Controlled-Experiment using Pre-experiment data”; see Deng, Xu, Kohavi, Walker, 2013.
At its core, CUPED is a proposal for how to use pre-experiment data with control variates to reduce the variance of the ATE estimator. The authors propose using any covariates that we have before the experiment took place,
Then, we can use the linear model to get predictions for the
CUPAC, aka., Control Using Predictions As Covariates, introduced by DoorDash’s engineering, Li, Tang, and Bauman, takes this one step further: there’s nothing special about using a linear model. One can use a more expressive ML model, get a closer fit to
Enjoy Reading This Article?
Here are some more articles you might like to read next: