CUPED Variance Reduction
Calculate A/B test variance reduction with CUPED. Enter values for instant results with step-by-step formulas.
Formula
Variance Reduction = r²; Adjusted Y = Y - θ(X - X̄); where θ = Cov(X,Y)/Var(X)
CUPED's variance reduction equals the squared Pearson correlation (r²) between pre-experiment (X) and experiment-period (Y) metrics. The adjustment formula subtracts each user's expected deviation based on their pre-experiment behavior. The coefficient θ is the regression coefficient that minimizes variance of the adjusted metric. This works because we're removing the predictable component of each user's outcome, leaving only unpredictable variation plus the true treatment effect. The squared relationship explains why correlation improvements have diminishing returns: going from 0.7 to 0.8 correlation (0.49→0.64 r²) adds only 15 percentage points of variance reduction.
Worked Examples
Example 1: E-commerce Revenue Experiment
Problem:An e-commerce site runs a checkout flow A/B test. Revenue per user has high variance (σ²=2500). Pre-experiment revenue correlation is 0.65. Current sample: 50,000 per variant.
Solution:CUPED Analysis: Correlation (r) = 0.65 Baseline variance = 2500 Sample size = 50,000 per variant Variance Reduction: r² = 0.65² = 0.4225 Reduction = 42.25% New Variance: 2500 × (1 - 0.4225) = 1444 Standard Error Impact: Baseline SE = √(2500/50000) = 0.224 CUPED SE = √(1444/50000) = 0.170 SE reduction = 24% MDE Impact (80% power, 95% CI): Baseline MDE = 2.8 × √2 × 0.224 = $0.89 CUPED MDE = 2.8 × √2 × 0.170 = $0.67 Can now detect 25% smaller effects! Runtime Equivalent: 50,000 with CUPED ≈ 87,000 without Saves 37,000 users worth of time
Result:42% variance reduction | 25% smaller MDE | Equivalent to 87,000 users/variant
Example 2: Engagement Metric Optimization
Problem:A social app tests a new feed algorithm. Sessions per user is the metric. Pre-experiment correlation is only 0.4. Is CUPED worth implementing?
Solution:Correlation Analysis: r = 0.4 r² = 0.16 Variance reduction = 16% Runtime Impact: Runtime reduction ≈ 1 - √(1-0.16) = 1 - 0.917 = 8.3% A/B test running 4 weeks: 4 weeks × 8.3% = 0.33 weeks = 2.3 days saved Implementation Trade-off: - Engineering effort: ~1-2 weeks - Runtime savings: 2 days per test - Break-even: ~5-7 experiments Improving Correlation: - Use 2-week pre-period instead of 1-week - Combine multiple pre-period metrics - Segment by user tenure (new vs returning) If improved to r=0.55: r² = 0.30 Runtime reduction ≈ 16% Saves ~4.5 days on 4-week test Much better ROI
Result:16% variance reduction (r=0.4) | 8% faster | Consider improving covariate first
Example 3: Netflix-Style CUPED Implementation
Problem:A streaming service runs 100+ A/B tests annually on watch time. Pre-experiment watch time correlation is 0.75. Calculate the platform-wide value of implementing CUPED.
Solution:Single Experiment Analysis: r = 0.75 r² = 0.5625 Variance reduction = 56% Runtime reduction = 34% Typical experiment: 2 weeks With CUPED: 2 × (1-0.34) = 1.32 weeks Savings per test: 4.8 days Platform-Wide Impact: 100 experiments/year × 4.8 days = 480 days = 16 experiment-months saved Alternative view - throughput increase: Previously: 100 tests in 52 weeks With CUPED: Can run 152 tests in same time 52% more experiments! Power Improvement: If experiments were 80% powered: Same sample now = 95%+ power Or: detect 25% smaller effects Business Value: Faster learning → faster shipping 52% more tests → faster iteration Higher power → fewer false negatives Competitive advantage: significant
Result:56% variance reduction | 52% more tests annually | 480 experiment-days saved/year
Frequently Asked Questions
What is CUPED?
CUPED (Controlled-experiment Using Pre-Experiment Data) is a variance reduction technique that uses pre-experiment user behavior to reduce noise in A/B test metrics. By controlling for pre-existing differences, CUPED increases statistical power without needing more users.
How does CUPED reduce variance?
CUPED adjusts each user's metric by their pre-experiment behavior. If a user historically has high engagement, we expect high engagement during the experiment. Subtracting this expected value removes predictable variation, leaving only the experiment's true effect plus random noise.
What correlation do I need for CUPED to work?
Variance reduction equals correlation squared (r²). A 0.5 correlation gives 25% variance reduction; 0.7 gives 49%; 0.8 gives 64%. Correlations below 0.3 provide minimal benefit (<9%). Most web metrics achieve 0.4-0.7 correlation with pre-period data.
Does CUPED change my experiment results?
CUPED doesn't bias results - it reduces variance without changing the expected treatment effect. The adjusted metric has the same mean difference between variants but less noise. This means higher confidence in whatever effect you observe.
Can CUPED make my experiment faster?
Yes! Variance reduction translates to faster experiments. With 50% variance reduction, you reach the same statistical power in roughly 50% of the time. Many companies report 30-50% experiment runtime reductions with CUPED.
What's the formula for CUPED adjustment?
Y_adjusted = Y - θ(X - X̄), where Y is the experiment metric, X is the pre-experiment covariate, and θ = Cov(X,Y)/Var(X). This regression-based adjustment removes the portion of Y variance explained by X.
What are CUPED's limitations?
CUPED requires pre-experiment data (can't use for new users), assumes linear relationship (may miss non-linear patterns), and needs sufficient sample size for accurate θ estimation. It also doesn't help if pre-experiment behavior doesn't predict experiment behavior.
How does CUPED compare to stratification?
Stratification (bucketing users by attributes) is simpler but often less effective. CUPED uses continuous covariates optimally through regression. They can be combined - stratify by major factors, CUPED for within-stratum variance.
Who invented CUPED?
CUPED was developed by Alex Deng and colleagues at Microsoft and published in 2013. It's now widely used at tech companies including Microsoft, Netflix, Uber, and many others. The paper 'Improving the Sensitivity of Online Controlled Experiments' is the primary reference.
Background & Theory
History
References
- Deng et al.: CUPED Original Paper (Microsoft)
- Netflix: CUPED Implementation Details
- Uber: Variance Reduction in A/B Testing
- Microsoft ExP Platform: Variance Reduction
- Booking.com: CUPED Practical Guide
- Statsig: CUPED Implementation
- Eppo: Variance Reduction Guide
- Kohavi et al.: Trustworthy Online Controlled Experiments