Statistical & Mathematical Formulas
Mantel-Haenszel Pooled Odds Ratio: Defeating Simpson’s Paradox
Calculate the confounder-stratified Cochran-Mantel-Haenszel pooled Odds Ratio OR_MH = Σ(a_k * d_k / N_k) / Σ(b_k * c_k / N_k) across multi-center or acuity strata and contrast against biased crude pooled OR.
Watch Simpson’s Paradox make a life-saving drug look harmful—until Mantel-Haenszel stratifies!
Suppose a new hospital therapy cuts mortality in BOTH Outpatient Clinic patients (4/100 = 4.0% vs Control 16/200 = 8.0%; stratum OR_1 = 0.4792) AND Critical ICU patients (50/200 = 25.0% vs Control 36/100 = 36.0%; stratum OR_2 = 0.5926). Yet if you lazily sum both tables together, Treatment mortality looks HIGHER (54/300 = 18.0% vs Control 52/300 = 17.3%; Crude OR = 1.0469 > 1.00!) solely because sicker ICU patients received the new drug twice as often—classic Simpson’s Paradox!
Nathan Mantel and William Haenszel (JNCI, 1959) solved confounding across K 2×2 strata (each with total N_k = a_k + b_k + c_k + d_k) via the sample-size-weighted pooled estimator: OR_MH = Σ(a_k * d_k / N_k) / Σ(b_k * c_k / N_k)—which remains consistent even when individual strata are sparse! On our two-stratum hospital dataset, OR_MH = 0.5675 (a 43% adjusted odds reduction!), overturning the false 1.0469 crude illusion!
| Clinical Acuity Stratum (N_k = 300 Each) | Treatment Events / Survivors (a, b) | Control Events / Survivors (c, d) | Odds Ratio Estimate |
|---|---|---|---|
| Stratum 1: Outpatient Low-Risk | a1 = 4, b1 = 96 (4.0%) | c1 = 16, d1 = 184 (8.0%) | Stratum OR1 = 0.4792 |
| Stratum 2: Inpatient ICU Severe | a2 = 50, b2 = 150 (25.0%) | c2 = 36, d2 = 64 (36.0%) | Stratum OR2 = 0.5926 |
| Crude Collapse vs Mantel-Haenszel | Crude 54 / 246 (18.0%) | Crude 52 / 248 (17.3%) | Crude 1.0469 (Biased!) vs MH 0.5675! |
Mantel-Haenszel Stratified Pooled Odds Ratio OR_MH
Divides Σ(a_k * d_k / N_k) in F2:F3 by Σ(b_k * c_k / N_k) in G2:G3 across all confounder strata.
=IF(SUM(G2:G3) <= 0, "Undefined MH Denominator", ROUND(SUM(F2:F3) / SUM(G2:G3), 4))Unadjusted Crude Collapsed Odds Ratio (Simpson’s Paradox Check)
Computes (SUM(B2:B3) * SUM(E2:E3)) / (SUM(C2:C3) * SUM(D2:D3)) to reveal confounding bias whenever Crude OR diverges >10% from OR_MH.
=IF(OR(SUM(C2:C3) <= 0, SUM(D2:D3) <= 0), "Undefined Crude OR", ROUND((SUM(B2:B3) * SUM(E2:E3)) / (SUM(C2:C3) * SUM(D2:D3)), 4))Try the example
Use the original values or change them to test your understanding.