Arte SheetsLearn. Try. Understand.

Causal Inference & Sensitivity Analysis

Rosenbaum Sensitivity Bounds (Gamma) for Matched-Pair Studies

Calculate Rosenbaum hidden-bias probability bounds p_plus = Gamma / (1 + Gamma) and worst-case McNemar discordant-pair Z-scores to find the exact confounding odds Gamma that tips significance.

Stress-test propensity-matched pairs against unobserved confounding odds Gamma

Propensity-score matching balances observed covariates, yet two matched subjects i and j can still differ in unobserved treatment odds by factor Gamma >= 1 (Rosenbaum, 2002). Among n_disc discordant outcome pairs, naive randomization assumes p_0 = 0.50; under hidden confounding up to Gamma, the worst-case upper null probability that the treated member wins rises to p_plus = Gamma / (1 + Gamma) (and the lower bound drops to p_minus = 1 / (1 + Gamma)).

Start with a hand-verifiable table before asking any assistant: across n_disc = 64 discordant pairs (B2) where t_wins = 44 favor treatment (B3), Gamma = 1.00 gives p_plus = 0.5000, mean 32, SD 4, and Z = (44 - 32) / 4 = 3.0000. At Gamma = 1.25, p_plus = 0.5556 and worst-case Z_min = 2.1243 (still above the one-sided 5% critical cutoff 1.6449). Raise Gamma to 1.50 (B4) and p_plus reaches 0.6000, mean rises to 38.4000, SD becomes SQRT(15.36) = 3.9192, and Z_min drops to 1.4289 — tipping statistical significance!

Hidden Bias Factor GammaUpper Null Prob p_plusWorst-Case Z_min (n=64, T=44)
Gamma = 1.00 (No Hidden Bias)0.50003.0000 (Significant at 5%)
Gamma = 1.25 (Moderate Bias)0.55562.1243 (Robust >= 1.6449)
Gamma = 1.50 (Tipping Threshold)0.60001.4289 (Fragile < 1.6449)

Rosenbaum Upper-Bound Null Probability and Worst-Case Z_min Formula

Compute p_plus = Gamma / (1 + Gamma), worst-case expectation n_disc * p_plus, and binomial standard deviation SQRT(n_disc * p_plus * (1 - p_plus)) inside LET. If a collaborator in Suggest mode proposes adding a 0.5 continuity subtraction to the numerator, inspect the cell suggestion side-by-side and test Gamma = 1.00 before accepting or rejecting.

=LET(n_d, B2, t_w, B3, gam_b, B4, IF(OR(n_d <= 0, t_w < 0, t_w > n_d, gam_b < 1), "Invalid Sensitivity Input", LET(p_up, gam_b / (1 + gam_b), mu_up, n_d * p_up, sd_up, SQRT(n_d * p_up * (1 - p_up)), ROUND((t_w - mu_up) / sd_up, 4))))

One-Sided 5% Tipping Verdict Gate (Z_min >= 1.6449) Formula

Classify immediately whether the observed treatment advantage survives hidden confounding of magnitude Gamma at the one-sided alpha = 0.05 threshold (Z_crit = 1.6449).

=LET(z_min, E4, IF(ISTEXT(z_min), z_min, IF(z_min >= 1.6449, "Robust at Gamma", "Tips to Non-Significant")))

Try the example

Use the original values or change them to test your understanding.

Further reading