Causal Inference
Correlation, intervention and the do-calculus.
In a well-known kidney-stone study, open surgery succeeded more often than a newer keyhole procedure for small stones and for large stones, yet less often overall. Which should a patient choose? The data alone cannot say; the answer depends on how the data were generated. Causal inference makes that dependence precise: graphs encode the assumptions, the do-operator defines interventions, and a handful of theorems say exactly when observational data can stand in for an experiment.
What you’ll learn
- Define structural causal models and interventions, and derive the truncated factorization of .
- Resolve Simpson's paradox with the backdoor criterion, and apply the front-door formula when the confounder is unobserved.
- State the three rules of the do-calculus, derive the backdoor formula from them, and state the completeness theorem for identification.
- Prove that randomization identifies the average treatment effect, and use propensity scores under ignorability.
Structural causal models and the do-operator
Simpson's paradox and the backdoor criterion
| Stones | Open surgery | Percutaneous |
|---|---|---|
| Small | 93% (81/87) | 87% (234/270) |
| Large | 73% (192/263) | 69% (55/80) |
| All | 78% (273/350) | 83% (289/350) |
Stone size affects both the choice of treatment and the outcome, so it is a confounder: in the graph , , , the path carries association that is not causation. The general condition for removing such paths is graphical.
Stone size satisfies the backdoor criterion, and 357 of the 700 patients (51%) had small stones. Using the stratum success rates of open surgery, 93.1% and 73.0%, what is ?
Show the answer
83 %
. The same adjustment for the keyhole procedure gives , so open surgery is better by about 5 points, reversing the pooled comparison (78% against 83%). Conditioning weights the strata by : 25% small stones among open-surgery patients but 77% among keyhole patients.
The table never decides by itself. If the third variable were a mediator, caused by the treatment and affecting the outcome (say, blood pressure measured after the operation), adjusting for it would remove part of the very effect being estimated; if it were a collider, adjusting would create bias. Identical numbers can call for opposite analyses, which is Pearl's resolution of the paradox: the graph, not the data, says which comparison answers the causal question.
When the confounder is unobserved, a mediator can still rescue identification. If intercepts every directed path from to , nothing confounds and , and blocks every backdoor path from to , the front-door formula holds (the textbook case is smoking, tar deposits and cancer, with an unobserved genotype):
The do-calculus and identifiability
Write for the graph with the arrows into deleted and for the graph with the arrows out of deleted. An effect is identifiable if it is determined by the observational distribution in every model compatible with the graph, latent confounders included (drawn as bidirected edges).
Condition on inside the interventional distribution:
Rule 2: in every remaining path from to starts with an arrow into , and blocks them all, so holds there and the action becomes an observation:
Rule 3: contains no descendant of , and in the node has no parents, so there and the intervention does not change . ∎
Some effects are not identifiable at all. With and a latent common cause of and , two models can share every observational probability yet disagree on ; only an experiment, or further assumptions, can settle it. Pearl's ladder of causation orders the questions: association , intervention , and counterfactuals such as "would this patient have recovered without the drug?". Bareinboim, Correa, Ibeling and Icard (2022) proved that, in a precise measure-theoretic sense, the rungs almost never collapse: without causal assumptions, observational data almost never determine interventional answers.
Experiments, potential outcomes and the frontier
In the potential outcomes framework (Neyman, 1923; Rubin, 1974), each unit has outcomes and under treatment and control, and the average treatment effect is . Only one is ever observed, . The two languages agree: is in the model modified by , so .
Assume ignorability given covariates, (the backdoor criterion with ), and positivity, for the propensity score . Rosenbaum and Rubin proved that the scalar then suffices for adjustment:
Inverse-propensity weighting recovers each mean. Condition on , and use consistency () and ignorability:
Weights explode when nears 0 or 1, which is positivity failing in practice. Doubly robust estimators combine outcome regression with weighting and stay consistent if either model is right; double/debiased machine learning (Chernozhukov et al., 2018) fits both with flexible models and cross-fitting while keeping -rate confidence intervals.
In a randomized trial, treatment lowers blood pressure , measured afterwards, and both and affect the outcome . To estimate the total effect of on , should you adjust for ?
- Yes: adjusting for more variables always reduces bias
- Yes, because is correlated with both and
- No: is a mediator, so adjusting for it removes part of the effect being estimated
- Only if is binary
Show the answer
C. No: is a mediator, so adjusting for it removes part of the effect being estimated
Randomization already identifies the total effect by the plain difference in means. Conditioning on a mediator blocks the path , and if shares an unobserved cause with , it also opens a collider path and introduces bias.
Key takeaways
- An intervention replaces a mechanism. In Markovian models is the truncated factorization, and seeing differs from doing: observing the sprinkler lowers P(Rain) to 30%, switching it on leaves 50%.
- Simpson's paradox is resolved by the causal graph. Adjust for confounders with (open surgery: 83% against 78% for the keyhole procedure), never for mediators or colliders; the front-door formula handles some unobserved confounders.
- The do-calculus has three rules and is complete for identification; some effects, such as the bow graph's, are not identifiable without experiments.
- Randomization identifies the average treatment effect. Under ignorability and positivity, propensity scores and inverse weighting do too, and doubly robust and double machine-learning estimators add flexibility with valid inference.
Check yourself
In the interactive lesson these are scored with your confidence, and what you miss comes back for review.
In the sprinkler network (Cloudy causes both Sprinkler and Rain, with ), what is ?
- 30%
- 50%
- 80%
- 71%
Show the answer
B. 50%
The intervention cuts Cloudy → Sprinkler and leaves every other mechanism alone, so Rain keeps its marginal, 50%. Observing the sprinkler on gives 30%, because it is evidence of a clear day.
The graph has , , and . Which adjustment set satisfies the backdoor criterion for the effect of on ?
- The empty set
Show the answer
D.
The only backdoor path is , which blocks, and is not a descendant of . is a descendant of (a mediator), so it may not be in the set.
causes , and an unobserved variable causes both. Nothing else is measured. Is identifiable from ?
- Yes, it equals
- No: models with the same can disagree on it
- Yes, by the front-door formula
- Yes, if the sample is large enough
Show the answer
B. No: models with the same can disagree on it
This "bow" graph is the canonical non-identifiable case: the latent confounder can produce any observed association, so an experiment or extra structure, such as a front-door mediator or an instrument, is needed.
Why is the difference in mean outcomes between treated and control groups an unbiased estimate of the average treatment effect in a randomized trial?
- Because randomization makes treatment independent of the potential outcomes, so
- Because randomization removes all variance from the outcomes
- Because trials always use large samples
- Because the treated and control groups have identical members
Show the answer
A. Because randomization makes treatment independent of the potential outcomes, so
Consistency gives , and independence removes the conditioning. Randomization balances confounders, measured or not, in expectation.
Further reading
- J. Pearl, Causality: Models, Reasoning, and Inference, 2nd ed. (Cambridge University Press, 2009).
- J. Pearl, "Causal diagrams for empirical research," Biometrika 82(4), 669–688 (1995).
- I. Shpitser & J. Pearl, "Identification of joint interventional distributions in recursive semi-Markovian causal models," AAAI (2006).
- P. R. Rosenbaum & D. B. Rubin, "The central role of the propensity score in observational studies for causal effects," Biometrika 70(1), 41–55 (1983).
- M. A. Hernán & J. M. Robins, Causal Inference: What If (Chapman & Hall/CRC, 2020).