Skip to content
Research1 min read

CUPED Benchmarking DGPs

Three scenarios for testing variance reduction:

CUPED Benchmarking DGPs

Three scenarios for testing variance reduction:

  1. Continuous outcome, moderate correlation (R20.25R^2 \approx 0.25)
  2. Binary outcome (harder to gain variance reduction)
  3. Continuous outcome, high correlation (R20.81R^2 \approx 0.81)

1. Normal Outcome, Moderate Correlation (Target ρ0.5\rho \approx 0.5)

Result

Scenario 1 (Normal, Mod): Correlation = 0.5010 Analysis for Scenario 1 (Normal, Mod): True Effect: 0.2000 Naive ATE: 0.1880 (SE: 0.009563) CUPED ATE: 0.1923 (SE: 0.008285) Var Reduction: 24.95%

2. Binary Outcome (Target ρ0.30.5\rho \approx 0.3-0.5)

Binary outcomes naturally limit the max correlation achievable with a continuous covariate.

Result

Scenario 2 (Binary): Correlation = 0.2286 Analysis for Scenario 2 (Binary): True Effect: 0.0227 Naive ATE: 0.0168 (SE: 0.002289) CUPED ATE: 0.0173 (SE: 0.002228) Var Reduction: 5.32%

3. Normal Outcome, High Correlation (Target ρ0.9\rho \approx 0.9)

Result

Scenario 3 (Normal, High): Correlation = 0.7492 Analysis for Scenario 3 (Normal, High): True Effect: 0.2000 Naive ATE: 0.1880 (SE: 0.009563) CUPED ATE: 0.1961 (SE: 0.006326) Var Reduction: 56.24%

Result

Index(['user_id', 'y', 'd', 'x1', 'x2', 'x3', 'x4', 'x5', 'm', 'm_obs', 'tau_link', 'g0', 'g1', 'cate', 'propensity', 'propensity_obs', 'mu0', 'mu1', 'y_pre', 'age', 'cnt_trans', 'platform_Android', 'platform_iOS', 'invited_friend'], dtype='object')

Result

{'n_rows': 100000, 'n_columns': 8}

Result

png

Result
mean_t_0mean_t_1abs_diffsmdksks_pvalue
confounders
age35.06480635.1404800.0756740.0089840.0064060.255385
y_pre0.004032-0.0040420.008074-0.0071230.0061820.293687
platform_iOS0.5949020.5923750.002527-0.0051440.0025270.997139
platform_Android0.4050980.4076250.0025270.0051440.0025270.997139
invited_friend0.0843040.0850770.0007730.0027770.0007731.000000
cnt_trans1.7504051.7475320.002872-0.0019710.0051510.519128
Result

CupedEffect(ate=0.19611881007038967, se=0.006325868042696929, t_stat=31.002671688165293, p_value=4.948015380616318e-210, ci_low=0.183720186456712, ci_high=0.20851743368406733, alpha=0.05, nobs=100000, cov_type='HC3', use_t=True, adjustment='ancova', ate_naive=0.18802555650105562, se_naive=0.009562868317249035, variance_reduction_pct=56.24135095196503, covariates=['y_pre', 'age', 'cnt_trans', 'platform_Android', 'platform_iOS', 'invited_friend'], beta_covariates=array([ 1.00041861e+00, 3.40287808e-05, 7.90351161e-04, -3.29664881e-03, 3.29664881e-03, 3.59560414e-04]), gamma_interactions=array([], dtype=float64))