KatInterview

Resolving Subgroup Reversals and Aggregation Bias in Experiments

Statistics & ExperimentsModel answer
MediumModel answerStatistics & ExperimentsA/B TestingStratificationSimpson's Paradox

Last updated

Detect composition shift and Simpson's paradox in A/B tests, build stratified estimators, and establish decision rules for heterogeneous subgroup effects.

During an A/B test analysis, the overall metrics indicate a +1.2 percentage point (pp) gain in conversion rate. However, a broken-down subgroup analysis yields the following contrasting lifts:

  • First-time Visitors: −0.5 pp
  • Returning Visitors: +2.0 pp

Address the following three system and statistical requirements:

  1. Composition Shifts & Aggregation Bias: Explain how unequal segment distributions between arms lead to Simpson's paradox. Provide numerical examples showing (a) distorted effect sizes and (b) a full directional reversal (where both subgroup effects are negative, but aggregate lift is positive). Detail why randomized trials can still suffer from imbalanced segment distributions across arms.
  2. Stratified & Longitudinal Estimators: Construct a pre-registered post-stratified estimator to correct for composition shift. Show the exact variance formula and detail how to formulate this within an interacted linear regression (Lin's estimator) and longitudinal framework (MMRM / GEE).
  3. Heterogeneity Testing & Deployment Protocol: Formulate a hypothesis test to confirm whether subgroup treatment variations are statistically distinct on an absolute scale. Lay out a formal, pre-registered decision ruleset mapping test outputs to deployment actions (e.g., universal release, targeted release, or complete holdout).

Hints

Hint 1

Evaluate whether the reported overall conversion (+1.2 pp) sits within the range bounded by the subgroup impacts [-0.5 pp, +2.0 pp], and calculate the implicit weights required for both arms.

Hint 2

Consider how post-treatment conditioning, asymmetric feature exposure, and non-uniform ramp-up rates across time distort arm composition.

Hint 3

Ensure your post-stratification weighting scheme uses fixed target weights (such as pooled traffic shares) rather than variant-specific proportions.