Interpreting A/B Test Results That Reverse When Aggregated
Statistics & ExperimentsModel answerLast updated
An experiment shows treatment winning in each segment but losing overall; diagnose the cause and determine the correct launch decision.
You're reviewing results from an online experiment that ran across two separate geographic regions. When you analyze each region independently, the treatment variant outperforms the control in both. However, when you combine the data and look at the overall metrics, the control appears to perform better than the treatment.
Your task is to:
- Explain what could cause this contradiction and walk through the underlying mechanism
- Determine which result—the per-region or the aggregate—should inform your decision
- Outline what additional diagnostics you would run before making a launch recommendation
- State your final recommendation with clear reasoning
Be specific about the statistical methods you would use and the potential experiment quality issues this pattern suggests.
Hints
Hint 1
Consider how different sample sizes across segments and variants can create misleading aggregates
Hint 2
A properly executed randomized experiment should maintain consistent treatment assignment rates across segments
Hint 3
Think about whether the aggregate metric is actually comparing the variants or comparing the segment compositions
Model answer
Medium Try it yourself first — then compare your approach, complexity and edge cases.
Core Issue: Simpson's Paradox and Confounding
This is a classic manifestation of Simpson's paradox, where an association reverses when data is aggregated. The mechanism is that region acts as a confounder—it correlates with both treatment assignment and the outcome metric.
Concrete Example
Consider this scenario with conversion rate as the metric:
| Region | Group | Sample Size | Conversions | Rate |
|---|---|---|---|---|
| North | Treatment | 200 | 80 | 40% |
| North | Control | 1,800 | 648 | 36% |
| South | Treatment | 1,800 | 360 | 20% |
| South | Control | 200 | 36 | 18% |
| Combined | Treatment | 2,000 | 440 | 22% |
| Combined | Control | 2,000 | 684 | 34.2% |
Treatment beats control by 4 percentage points in the North and 2 points in the South. Yet when pooled, control appears to win by 12 points.
The issue: treatment users are 90% from the low-converting South region, while control users are 90% from the high-converting North. The overall comparison mostly reflects where users came from, not which variant performed better.
Mathematically, the pooled rate is a weighted average where the weights differ by arm:
- Treatment pooled: 0.1 × 40% + 0.9 × 20% = 22%
- Control pooled: 0.9 × 36% + 0.1 × 18% = 34.2%
Red Flag: This Shouldn't Happen in a Clean Experiment
With proper randomization at a fixed ratio (e.g., 50/50) applied uniformly, both arms should have identical regional composition. If treatment truly improves outcomes in both regions, the aggregate should also favor treatment (modulo sampling noise).
A reversal signals one of these problems:
Allocation imbalance across strata:
- Different randomization rates per region (e.g., 10/90 in North, 90/10 in South)
- Time-varying ramp schedules coinciding with shifts in regional traffic
- Bucketing or hash function bugs causing non-uniform assignment
- Variant-specific eligibility filters or crashes
Insufficient statistical power:
- The within-region "wins" may be noise rather than real effects
- Small cell counts lead to wide confidence intervals
Both scenarios require investigation before any launch decision.
Correct Statistical Approach
The right estimator compares variants within each stratum, then aggregates using weights that reflect the target rollout population:
Stratified estimate: $$\hat{\Delta} = \sum_{r} w_r \cdot (\hat{p}{\text{treatment},r} - \hat{p}{\text{control},r})$$
where $w_r$ is region $r$'s share of future production traffic, not its share in either experimental arm.
Variance: $$\text{Var}(\hat{\Delta}) = \sum_{r} w_r^2 \left(\frac{p_{\text{treatment},r}(1-p_{\text{treatment},r})}{n_{\text{treatment},r}} + \frac{p_{\text{control},r}(1-p_{\text{control},r})}{n_{\text{control},r}}\right)$$
Alternative methods:
- Mantel-Haenszel test for stratified comparisons
- Regression:
outcome ~ treatment + region + treatment:region - The interaction term tests for heterogeneous treatment effects
Applying to the example (assuming equal target traffic per region):
- North: Δ = +4pp, SE ≈ 1.5pp → z ≈ 2.67 (significant)
- South: Δ = +2pp, SE ≈ 1.0pp → z ≈ 2.0 (marginal)
- Stratified: Δ = 0.5(4) + 0.5(2) = +3pp, SE ≈ 0.9pp → z ≈ 3.33 (significant)
The corrected analysis favors treatment with reasonable statistical confidence. The imbalance artificially inflated control's pooled rate and also reduced statistical power by creating tiny cells.
Pre-Launch Diagnostic Checklist
1. Sample Ratio Mismatch (SRM)
- Chi-square test: observed vs. intended allocation, overall and per region per day
- Failed SRM invalidates the comparison; root causes include config errors, logging bugs, bot filtering differences, or variant-induced crashes
2. Temporal confounding
- Plot assignment rates and outcomes over time
- Check whether ramp changes aligned with seasonality, holidays, or region-specific events
- If so, add time period as a stratification dimension
3. Treatment effect heterogeneity
- Test the
treatment × regioninteraction formally - Are the regional effects consistent in direction with different magnitudes, or is one effectively zero?
- Explore other moderators: user tenure, device type, subscription tier
4. Statistical significance and power
- Compute minimum detectable effects given actual sample sizes per region
- Report 95% confidence intervals, not just point estimates
- If testing multiple segments, apply multiple testing corrections (Bonferroni or FDR control)
5. Metric integrity
- Verify conversion definitions, attribution windows, and logging are identical across arms and regions
- Check for delayed conversions or truncated observation windows that differ by variant
6. Guardrail metrics
- Examine retention, engagement quality, latency, error rates, and user complaints
- Watch for novelty effects in short-term metrics that don't persist
7. External validity
- Confirm the two regions represent the broader target population
- If the rollout geography differs, reweight accordingly
- Large heterogeneity limits generalization confidence
Launch Recommendation
Do not launch control. Its aggregate advantage is a composition artifact, not a real performance gain.
Do not launch treatment yet either. While the stratified analysis favors treatment, the experiment has quality issues:
Immediate actions:
- Diagnose the allocation imbalance root cause—fix the randomization logic
- Check for SRM and investigate any failures
- Verify metric definitions and logging consistency
Rerun the experiment:
- Use stratified randomization (block by region) at a fixed 50/50 ratio
- Size to detect the minimum business-relevant effect with 80%+ power per region
- Pre-specify the stratified estimator and all guardrail metrics
- Run for the full user lifecycle to capture delayed effects
If the rerun confirms treatment's advantage with clean guardrails:
- Launch treatment with a gradual rollout (e.g., 5% → 25% → 50% → 100%)
- Maintain a holdback group for long-term monitoring
If regional effects differ substantially and significantly:
- Consider region-specific launches only if interaction is robust and operational complexity is justified
- Most often, a single global decision is preferable unless effects truly oppose
Common Pitfalls
- Trusting the aggregate because it has more data: Larger confounded samples remain biased
- Naming Simpson's paradox without explaining the mechanism: The label doesn't demonstrate understanding
- Missing the implication for experiment quality: Reversals in randomized tests indicate bugs
- Using arm-specific weights to combine regional effects: This reproduces the original bias
- Making decisions on point estimates without uncertainty quantification
- Over-slicing until finding significance, then launching per-segment variants based on noise
- Ignoring network effects: On social platforms, treatment spillover across users can bias individual-level comparisons
Summary
The reversal indicates confounding by region due to imbalanced allocation. The stratified estimate—which properly controls for region—should guide decisions, but the presence of this pattern suggests experiment quality issues that must be resolved. The disciplined path is to diagnose the imbalance, fix it, and rerun with proper stratification before launching anything.