KatInterview

Simpson's Paradox: Algebra, Causality, and When to Stratify

Statistics & ExperimentsModel answer
MediumModel answerStatistics & Experimentssimpson's paradoxconfoundingcausal inference

Last updated

Build a numeric reversal from scratch, derive the bias formula, connect it to causal graphs, and explain when the aggregate is the right answer versus when you must condition.

Aggregate vs. Subgroup: A Statistical Reversal

You are analyzing the results of a medical trial. A colleague hands you a summary table and says: "The new drug looks worse overall, but somehow it outperforms the control in every patient subgroup. How is that possible, and which number should we trust?"

Your task

  1. Define the phenomenon. Explain in plain terms how a trend can hold in every subgroup yet reverse in the pooled data. State the two conditions a third variable must satisfy for this to happen.

  2. Build a concrete numeric example. Construct a 2×2×2 table (two subgroups, two arms) where:

    • The treatment arm has a higher success rate than control in both subgroups.
    • The pooled treatment rate is lower than the pooled control rate. Use realistic numbers; round percentages are fine.
  3. Derive the algebra. Write the pooled difference as a sum of a within-stratum term and a composition-bias term. Show what the bias term is a product of, and explain why the reversal happens when the bias term overwhelms and opposes the within-stratum effect.

  4. Connect to causal structure. Using a directed acyclic graph (DAG), explain how the answer changes depending on whether the third variable is a confounder, a mediator, or a collider.

  5. Describe practical remedies for the confounder case: stratification, direct standardization (g-formula), regression adjustment, and inverse propensity weighting. Note a key pitfall of odds ratios.

  6. State when the aggregate is correct and when you must condition. Give at least one product/analytics example alongside the medical one.

What a strong answer looks like: concrete numbers, the algebraic decomposition written out, a clear causal argument for which estimand to report, and at least one common mistake called out explicitly.

Hints

Hint 1

Start by noticing that a pooled rate is a *weighted* average of stratum rates. The weights differ across arms when subgroup sizes are unequal — that's the engine of the reversal. Write the weights down before anything else.

Hint 2

The bias term is a product of two quantities: how unequally the subgroups are distributed across arms, and how strongly the subgroup predicts the outcome on its own. Ask yourself: what makes each factor zero, and why does randomization set one of them to zero?

Hint 3

The hardest part of the question is step 4. The same table is consistent with confounder, mediator, and collider graphs. The data cannot tell you which one applies — you need a subject-matter assumption. Name the graph structure first, then pick your estimand.