Variance Reduction
variance_reduction
Variance reduction algorithms, focusing on continuous and ratio-level CUPED.
This module provides high-performance variance reduction utilities. Reducing metric variance is mathematically equivalent to increasing the signal-to-noise ratio, enabling massive gains in statistical power and substantial reductions in required sample size (and therefore runtime).
| FUNCTION | DESCRIPTION |
|---|---|
apply_cuped |
Applies Controlled-experiments Using Pre-Experiment Data (CUPED) on a series. |
apply_cuped
Applies Controlled-experiments Using Pre-Experiment Data (CUPED) on a series.
CUPED (Deng et al., 2013) is the standard variance reduction method in modern online experimentation. It uses pre-experiment covariate data to remove pre-existing user-level variation, leaving a highly concentrated treatment signal.
| PARAMETER | DESCRIPTION |
|---|---|
df
|
The dataset containing both target and pre-period columns.
TYPE:
|
target_col
|
Column name representing the post-experiment metric of interest (\(Y\)).
TYPE:
|
pre_col
|
Column name representing the pre-period covariate (\(X\)).
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Series
|
pd.Series: A pandas Series containing the CUPED-adjusted values. |