- In Regression we describe how to construct regression estimates of the treatment effect and control mean for each cell (i.e. dimension level).
- In Cell Moments we describe how to construct cell-specific estimates of absolute treatment effects and control means using cell-specific summary statistics.
- In Combining Cell Estimates we describe how to combine estimates across cells to estimate population effects and population control means.
- Finally, in Delta Method we transform the combined estimates into estimates of lift, ratio parameters, etc.
Regression
Below we describe regression models for each cell, or dimension level. The regression output will be used in the next section to construct the joint sampling distribution of effect estimates and control means within a stratification cell. We do this for ratio metrics, and discuss along the way the simpler case of count metrics.- Define () as the numerator (denominator) outcome for the user,
- Define () as the pre-exposure numerator (denominator) variable for the user.
- Define as the binary treatment assignment for the user.
- Define the covariate vector .
- Define the design matrix whose row equals .
- Define the design matrix .
- Define the length vector .
- Define the regression coefficients as .
- Define as the matrix of residuals, whose first column corresponds to the residuals for the numerator and the second column is the residuals for the denominator.
- Define the covariance of as .
Cell moments
In this section we describe how to use the regression output from the previous section to construct the joint sampling distribution of effect estimates and control means within a stratification cell. In the cell, our inferential focus is the vector , which has four elements:- numerator absolute effect estimate for the cell
- numerator control mean for the cell
- denominator absolute effect estimate for the cell
- denominator control mean for the cell
- Define () as the sample mean pre-exposure numerator (denominator) variable.
- Define and as their population counterparts.
- Define the contrast matrix where
Combining cell estimates
At a high level, for each cell we now have estimates of population means (e.g., the control mean and the absolute effect), and uncertainty about those estimates. In this section we describe how to combine these estimates across cells to estimate population absolute effects and control means. This algorithm can be used for count or ratio metrics, unadjusted or adjusted (e.g., CUPED), and absolute or relative inference. Define the population (sample) proportion for the strata cell as (. Under stratified sampling, the are deterministic, and we could define and . However, we do not conduct stratified sampling in GrowthBook. Under simple random sampling the are multinomial random variables, and we could define . Define the matrix as the matrix whose row is . Our point estimate is the expected value of , which is Below we derive its covariance. Define the collection of as . The naive covariance is . Alternatively, we can use Equation 15 in (Xie and Aurriset 2016) to define Both approaches assume the population cell proportions are known. For GrowthBook experiments, the are random variables, and this assumption is not met. There is dependence between the (or equivalently, between the ) that is not accounted for when estimating the variance. We show below in the Section Derivation of conditional covariance that is: Note that is a multinomial random variable divided by , so its covariance matrix has diagonal element equal to and off-diagonal element element equal to .Delta method
To recapitulate, we now have an estimate of the joint sampling distribution of the vector , which has four elements:- numerator absolute effect estimate
- numerator control mean
- denominator absolute effect estimate
- denominator control mean.
Delta method for ratio metrics
By the central limit theorem Define . Define Define .Define the vector of partials of length . If then set equal to , where If then define equal to , where By the delta method,
. In summary, the steps for the algorithm are:
- Compute the point estimate .
- Compute the estimated variance .
- Return .
Delta method for count metrics
Define as the vector with the control sample mean and the numerator effect estimate. Define as the covariance of . By the central limit theorem Define . Define Define . Define the vector of partials of length . If then set equal to , where If then define equal to , where By the delta method,. In summary, the steps for the algorithm are:
- Compute the point estimate .
- Compute the estimated variance .
- Return .

