Causal Inference
A causal effect is a contrast between two potential outcomes of the same unit — if treated, if not — and the fundamental obstacle is that you only ever observe one of them; the other is a missing counterfactual. So causal inference is a missing-data problem, and every method is an identification strategy: an assumption about how treatment was assigned that turns the causal estimand into a function of the observable data. The strategies line up by how much they assume — randomization (assume nothing; you control assignment) → ignorability (as-good-as-random given measured ) → instruments / discontinuities / panels (levers for when confounding is unobserved). The gold standard is the experiment; every observational method is a way to reconstruct one. Throughout, a running example: does job-training program raise earnings , when motivated people self-select into it? Prerequisites cashed in: estimators/bias/variance, CLT, hypothesis testing (track 3); conditional expectation and the tower rule (track 1); OLS as projection (track 4); propensity-as-logistic and shrinkage (track 6); permutation/rejection-sampling intuition (track 7).
Each method gets a fixed four-line ledger — Assume / Identify / On whom / Fails when — so the catalog stays comparable.
1. The fundamental problem and potential outcomes
- Potential outcomes. For binary treatment, every unit carries two numbers: (outcome if treated) and (if not). The individual causal effect is . You only ever see one, selected by the treatment through the switching equation (a.k.a. consistency):
- The science table is the full set of potential outcomes — one row per unit, two columns. Picture to hold: a table where exactly one cell per row is filled and the other is
?. Causal inference is imputing the?s, and the “fundamental problem” is that within one world the missing column is unrecoverable from that unit alone. - SUTVA makes the two-column table well-defined: (i) no interference — unit ‘s outcome doesn’t depend on others’ treatments, ; (ii) no hidden versions of the treatment. Without it each unit has up to potential outcomes (§ interference in track-12 territory), not two.
- Estimands (functions of the science table, not of the assignment):
- ATE ;
- ATT (on the treated) ; ATU (on the untreated) symmetrically; ATE , ;
- CATE — the effect for a subgroup (track 6’s heterogeneity, here causal).
- No causation without manipulation. A causal question must name a manipulable intervention. “Effect of BMI on heart risk” is ill-posed (force-feeding vs amputation both raise BMI); “effect of diet X for 3 days” is well-posed. The treatment must be something that could be assigned.
Implications
- The estimand is a property of the science table alone — the assignment mechanism is the instrument for learning it, kept conceptually separate. This separation is the whole game: methods differ in their assignment-mechanism assumptions, not in what they target.
- Because is never observed, no method estimates individual effects without modeling; the achievable targets are averages (ATE/ATT/CATE).
Core competency set
- Write the switching equation and the science table; explain the fundamental problem as missing data.
- State both halves of SUTVA and what breaks without it.
- Define ATE/ATT/ATU/CATE and the ATE identity.
2. Why the naive comparison fails
- The tempting estimator is the simple difference in observed means (SDO), . It is generally biased for the ATE. Derive the bias. Start from the SDO and insert (the treated group’s untreated counterfactual):
Then convert ATT to ATE with the heterogeneity identity :
- Selection bias is the killer term: do the treated and control differ in their baseline ? In the running example, motivated people both enroll in training and would have earned more anyway — — so the SDO overstates the effect. (HRT: healthier women both took hormones and had lower heart risk regardless — Simpson’s-paradox-grade confounding.)
- The fix in principle. If assignment were independent of the potential outcomes, , both bias terms vanish: and ATT ATU, leaving . Independence of assignment is exactly what kills selection bias. Every method below is a way to buy that independence — outright (randomize) or conditionally (given ).
Implications
- The entire field is organized by how you get (unconditionally, conditionally, locally, or in differences). Hold the SDO decomposition and you know what each method is repairing.
- Selection bias is about (baseline differences), heterogeneity bias about differing effects — two distinct failures the naive estimator conflates.
Core competency set
- Derive the SDO decomposition into ATE + selection bias + heterogeneity bias.
- Show that zeroes both bias terms.
- Tell the running-example selection story in one sentence.
3. Randomized experiments I — Neyman
Randomization makes true by design — a coin flip can’t depend on outcomes you haven’t measured. In the randomization-based view the science table is fixed and the only randomness is ; there is no model, no iid sampling. An assignment mechanism is a randomized experiment if it is probabilistic (), known, individualistic, and unconfounded (). Canonical design: the completely randomized design CRD() — ” names from a hat,” so .
- The DIM is unbiased — derive it. Estimator . The one trick: by the switching equation (since , ). So
Under CRD, , so each weight becomes :
No model, no assumption beyond SUTVA, true for every science table nature could hand you.
- Variance. , where is the variance of and the variance of the unit effects . Balanced groups minimize it when .
- Conservative CI. have unbiased plug-in estimates, but — the variance of the unobservable — cannot be estimated. Since , drop it: the Neyman variance overestimates, so the CI is valid (over-covers): .
- Horvitz–Thompson generalizes the DIM to any design via inverse-probability weighting: , ; unbiased for any randomized design (same tower-style proof). Under CRD it is the DIM.
Ledger. Assume: randomized assignment (+ SUTVA). · Identify: ATE exactly. · On whom: the whole sample. · Fails when: nothing to fail — but needs large for the normal-approx CI, and only covers who you enrolled (external validity).
Implications
- Randomization buys identification by design, not by assumption — “assumptions play no role in randomization tests of the null of no effect” (Rosenbaum). This is why the RCT is the reference every observational method imitates.
- The conservative-variance move (bound the unidentifiable term) recurs throughout causal inference: when you can’t estimate something, bound it in the safe direction.
Core competency set
- List the four conditions defining a randomized experiment.
- Derive DIM unbiasedness via the switching-equation trick and .
- Explain why forces a conservative variance, and write the HT estimator.
4. Randomized experiments II — Fisher
Neyman needs a CLT; Fisher needs nothing — exact inference from the randomization itself, for any design and any sample size.
- Sharp null. for every — no effect on anyone (stronger than Neyman’s ). Under it the science table is fully known: each missing
?equals the observed value, so you can recompute the test statistic under any alternative assignment. - The permutation test is stochastic proof by contradiction. Pick a statistic (e.g. the DIM). Under , re-draw assignments ; because the table is known, each gives a recomputed . These trace the exact null distribution. The p-value is the tail fraction:
Valid for any and any design — the choice of affects only power, never validity. (This is a rejection-sampling computation, same machinery as track 7’s MCMC.)
- Choice of → power. The DIM is sensitive to outliers under skew; the Wilcoxon rank-sum (ranks ) is robust — no outliers survive ranking. Validity is automatic; power is the reason to choose well.
- Confidence intervals by inversion. Test the family of sharp nulls (constant additive effect — still fills the table, shifting observed treated outcomes by ). The CI is the set of not rejected: . The Hodges–Lehmann point estimate is the making the observed data most central; for the DIM statistic it returns .
Ledger. Assume: randomization + SUTVA only. · Identify: tests/CIs for the sharp null (constant effects). · On whom: the whole sample. · Fails when: you need average-effect inference under heterogeneity (use Neyman), or the sharp null is implausibly strong.
Implications
- Fisher vs Neyman is the field’s first fork: exact, finite-sample, sharp null vs asymptotic, average effect. Fisher implies Neyman (no effect on anyone ⟹ zero average), not conversely.
- “If your data are consistent with no effect on anyone, your analysis ends here” — the FRT is the honest floor.
Core competency set
- State Fisher’s sharp null and why it makes the science table recoverable.
- Run the permutation-test algorithm; explain why validity is -free but power is not.
- Build a CI by inverting ; name the Hodges–Lehmann estimate.
5. Covariate adjustment — design beats analysis
When a covariate predicts the outcome, an unlucky assignment (all the high- units land in treatment) inflates the variance of — not its bias (over all assignments it averages out), but you only run one. Two cures, and the lesson that design beats analysis.
- Design — block (stratify) before randomizing. Run a separate CRD within each stratum of (a stratified CRD). Estimator , a weighted average of within-stratum DIMs. Unbiased (each is, and the weights are the strata sizes), and lower-variance when is associated with — you compare like-with-like instead of across clumps. No assumption about how relates to is needed; stratify if you can. For continuous , rerandomize: redraw until covariate balance clears a threshold (a rejection sampler on assignments).
- Analysis — Lin’s regression. Regress on , centered , and their interaction: , report . Read “agnostically” — forget the model, treat as just another estimator of the ATE. Then : with centering + interactions + robust (Huber–White) SEs, regression adjustment is never worse asymptotically than the raw DIM, regardless of whether relates to — and much better if it does. (Plain uninteracted regression can do worse — the interactions matter.)
Ledger. Assume: randomization (adjustment adds nothing for bias). · Identify: ATE. · On whom: whole sample. · Fails when — it doesn’t; worst case it ties the DIM. Caveat: too many strata / tiny cells hurt.
Implications
- Bias is handled by the design (randomization); covariates buy variance. Get the design right and the analysis is easy — design trumps analysis.
- “Regression adjustment is justified without a linear model” reconciles the econometric reflex (run OLS) with the randomization view (track 4’s OLS, now as a variance-reducing causal estimator).
Core competency set
- Explain the apples-vs-melons variance problem and why it’s variance, not bias.
- State the stratified estimator and that it needs no – assumption.
- Write Lin’s regression (centered + interacted, robust SEs) and the “never worse than DIM” guarantee.
6. Observational studies and ignorability
No randomization: assignment can depend on anything, including the potential outcomes. The only tool left is an assumption. The central one — the most used and abused in the field:
- Strong ignorability / selection on observables. and (overlap). “Within levels of the measured , treatment is as-good-as-random.” (It is a randomized experiment minus the “known mechanism” requirement, asserted rather than designed.) The conditional-independence assumption (CIA) holds iff conditioning on closes every backdoor (§7).
- Identification under ignorability — derive it. Target . By the tower rule over and ,
Ignorability removes the dependence on inside: . And on the treated, the switching equation makes observable: . Chaining,
Every term is observable (overlap guarantees occurs at each ). Symmetrically for , giving the ATE. This integral — average the within- treated-minus-control gap over the marginal of — is the backdoor adjustment formula, met here from the potential-outcomes side.
- The propensity score is the dimension-reducing magic. It is a balancing score: — conditioning on one scalar removes all the covariate-driven assignment dependence. And under ignorability, — you only need to adjust for the scalar , not all of (estimate it by logistic regression, track 6).
- Three ways to use it, all reconstructing the experiment:
- Matching: pair treated and control units with near-equal (or ); within a matched pair, who got treated is “as if a coin flip,” recovering a paired randomized design. Mahalanobis distance handles scale + correlation (track 6).
- Subclassification: stratify on , average within-stratum DIMs — an SCRD, exactly §5’s estimator.
- IPW: . Unbiased under ignorability — derive the treated term. By consistency,
Tower over , then ignorability splits the inner expectation:
Now cancels the weight:
(Hájek/self-normalized weights stabilize it; small blows the variance up — keep propensities away from 0/1.)
- Sensitivity analysis. Ignorability is untestable (it’s about counterfactuals). So ask: how strong a hidden confounder would overturn the conclusion? Parametrize departures by an odds-ratio bound on the within-pair treatment odds ( is ignorability), recompute the worst-case p-value , and report . “A hidden confounder would have to make one matched unit more likely to be treated to kill significance.” Every observational study is sensitive as ; the question is whether a plausible confounder reaches .
Ledger. Assume: ignorability + overlap (untestable). · Identify: ATE/ATT. · On whom: the overlap region. · Fails when: an unmeasured confounder (selection on unobservables) — quantified by sensitivity analysis.
Implications
- Matching/subclassification are design steps — do them blind to outcomes, then analyze as an experiment. This restores the design-beats-analysis discipline to observational work.
- The propensity score collapses a high-dimensional balancing problem to one logistic regression — the single most useful trick in observational causal inference.
- Ignorability is one assumption away from a randomized experiment, and exactly that one assumption (unobserved confounding) is what sensitivity analysis stress-tests.
Core competency set
- State strong ignorability + overlap; derive ATE identification via tower + ignorability.
- State the propensity score as a balancing score and the “adjust for alone” theorem; derive IPW unbiasedness.
- Explain matching/subclassification/IPW as experiment-reconstruction; describe sensitivity analysis.
7. DAGs — the language of confounding
DAGs are the grammar for which to condition on — they make ignorability checkable from a causal model rather than asserted.
- Structural causal model (SCM). Root variables are independent; each non-root is a deterministic function of its parents plus an independent noise, . An SCM induces a joint and a unique DAG ( iff is a direct cause). is a cause of if it’s an ancestor.
- The three building blocks (with independent noises):
- Chain : — conditioning on the middle blocks the flow.
- Fork : but — the common cause induces dependence; conditioning on it blocks. (This is confounding.)
- Collider : but — conditioning creates dependence. Don’t condition on colliders. Picture: a college admits star musicians or top-GPA students; among admitted, knowing someone can’t play predicts high GPA — a spurious correlation manufactured by conditioning.
- d-separation generalizes: blocks a path if it contains a non-collider in , or a collider not in (and with no descendant in ). If blocks every path between and , they are d-separated, and d-separation . Intuition: dependence is water in pipes; conditioning on chains/forks shuts a valve, conditioning on a collider opens one.
- Conditioning ≠ intervening. (who happened to be treated) differs from (everyone forced to treatment). The do-operator deletes the arrows into (the “mutilated graph”) — exactly what randomization does physically. Note , the potential-outcome mean.
- Backdoor criterion. identifies the effect of on if no node in is a descendant of , and blocks every path into (every “backdoor”). Then
— the same adjustment formula as §6, now read off the graph: the backdoor criterion is the graphical statement of ignorability, and it tells you precisely which covariates to include (confounders) and which to exclude (colliders, mediators).
- Collider bias, concretely. Conditioning on a mediator or collider can create the bias you were trying to remove — controlling for occupation when studying gender pay can zero out a real effect that runs through occupational sorting. More covariates is not safer.
Ledger. Assume: the DAG is correct (a causal model, from domain knowledge). · Identify: any do-effect with an admissible adjustment set. · On whom: population. · Fails when: the graph is wrong, or no set satisfies the backdoor criterion (unblockable path through an unobserved node → need §8–9).
Implications
- The DAG converts “which controls?” from guesswork into a graphical check — and shows that “adjust for everything” is wrong (colliders, mediators).
- Markov-equivalent DAGs (same d-separations, e.g. vs ) are indistinguishable from data alone — causal discovery recovers only the equivalence class; direction needs assumptions.
Core competency set
- Define the SCM and the chain/fork/collider (in)dependencies; state d-separation.
- Distinguish conditioning from via the mutilated graph; write the backdoor adjustment.
- Explain collider bias and why more controls can hurt.
8. Instrumental variables — when ignorability fails
Now an unobserved confounder drives both and (): no measured closes the backdoor, so §6–7 are dead. The IV lever: a variable that pushes but reaches only through . Running example: a randomized offer of training , where take-up is the actual treatment and motivation confounds –. (Canonical: the Vietnam draft lottery for military service on earnings .)
-
The DAG: , , with . Then is identified ( has no backdoor), but is not (backdoor through ). IV uses the randomized to get at the effect without ignorability.
-
Principal strata. Classify units by — treatment taken under no-offer vs offer:
- compliers — take it iff offered; always-takers ; never-takers ; defiers .
- Comparing units by received is biased: mixes compliers + always-takers, mixes compliers + never-takers — different populations.
-
The assumptions (beyond SUTVA): (1) randomized; (2) exclusion restriction — affects only through , ; (3) relevance — actually moves ; (4) monotonicity — no defiers, .
-
LATE = the ratio — derive it. Intent-to-treat effects (both identified, since is randomized): and . Decompose over strata, , and prune:
- Exclusion ⟹ for always-/never-takers doesn’t change with , so doesn’t either: .
- Monotonicity ⟹ (no defiers).
- For compliers, the offer flips from 0 to 1, so their ITT is the treatment effect: .
Hence . The same pruning on gives (compliers move by 1, others by 0). Divide:
You can’t say who the compliers are, but you identify their average effect. (With covariates this is 2SLS: regress on , then on — only the -driven, exogenous part of is used.) Numbers: the offer raises take-up by (half the offered actually train) and raises earnings by dollars; then dollars for compliers — the per-offer effect, scaled up by dividing out the fraction who comply.
- Weak instruments. If barely moves ( small), the denominator is tiny: variance explodes, and any small violation of exclusion is divided by and blows up the bias. Weak instruments make IV fragile.
Ledger. Assume: randomized + exclusion + relevance + monotonicity. · Identify: LATE . · On whom: compliers only (not the population). · Fails when: exclusion is violated (untestable, the usual suspect) or the instrument is weak.
Implications
- IV trades population for weaker assumptions: you drop ignorability but only learn the complier effect — a different estimand, not a different estimator of the ATE.
- Under homogeneous effects LATE ATE; under heterogeneity they genuinely differ, which is why “what population?” must always be asked.
- Exclusion is a theory, not a test — a good instrument feels unrelated to except through (that’s what makes it convincing and unsettling).
Core competency set
- Draw the IV DAG and say why isn’t identified but is.
- Name the four strata and the four assumptions; derive by strata pruning.
- Explain LATE-on-compliers and the weak-instrument failure.
9. Discontinuities and panels — more as-good-as-random levers
Three more identification strategies, each manufacturing local randomness or differencing confounders away.
- Regression discontinuity (RDD). Treatment switches at a threshold of a running variable : . Units just above and just below are as-good-as-random (no one finely controls which side they land on), so compare limits across the cutoff. Sharp RDD: jumps 0→1 (Medicare at 65); fuzzy: probability of jumps (an IV at the cutoff). Identifying assumption: continuity — and are continuous at , so any jump in observed is the effect. Fit locally; is the LATE at the cutoff. Validity checks: McCrary density test (no bunching of units just past → no manipulation), covariate-balance and placebo-cutoff tests.
- Ledger. Assume: continuity at , no manipulation. · Identify: LATE at the cutoff. · On whom: units near . · Fails when: agents sort around the threshold.
- Difference-in-differences (DiD). Treated and control groups, before and after. The double difference cancels confounders — model (state effect + time effect + treatment), then
The first difference kills the time-invariant state effect ; the second difference kills the common time effect , leaving . Numbers: treated group goes (), control (); the is the common time trend, so . Identifying assumption: parallel trends — absent treatment, both groups would have moved in parallel (untestable post-treatment; supported by parallel pre-trends). Canonical: Card–Krueger NJ/PA minimum wage. Inference: cluster or block-bootstrap SEs (serial correlation).
- Ledger. Assume: parallel trends. · Identify: ATT on the treated group. · On whom: the treated units. · Fails when: differential trends (e.g. mean reversion when treatment targets the worst-off).
- Fixed effects / panel. With repeated observations, time-demean : subtracting each unit’s own mean deletes every time-invariant confounder — observed or not — so from on is consistent. (DiD is the two-period special case.) Cannot fix time-varying unobserved confounders or reverse causality.
- Synthetic control. When one unit is treated and you have many donor units, build a weighted average of donors (, ) matching the treated unit’s pre-treatment path; the post-treatment gap is the effect. A data-driven, extrapolation-free generalization of DiD; inference by placebo permutation (re-run pretending each donor was treated, rank the real gap).
Implications
- RDD/DiD/FE/synthetic all engineer locally or in differences — the same goal as randomization, reached by exploiting a threshold, a parallel trend, or within-unit variation.
- Each buys identification with a different untestable assumption (continuity / parallel trends / time-invariant confounding) — the art is arguing the assumption from context, and the placebo/falsification tests are how you build that case.
Core competency set
- State RDD’s continuity assumption, sharp vs fuzzy, the LATE-at-cutoff, and the McCrary test.
- Derive the DiD double difference cancelling and ; state parallel trends.
- Explain fixed-effects demeaning (kills time-invariant ) and synthetic control.
10. Modern threads
Where causal inference meets machine learning and sequential decisions (overlaps tracks 6, 7, 12).
- Bandits turn experimentation into a decision: don’t just estimate and stop — minimize regret by balancing explore vs exploit. UCB: pick the arm with the highest upper confidence bound (optimism — a high mean or a wide interval earns a pull), achieving regret. Thompson sampling: pick arm with probability it is best — sample from each posterior (Beta–Bernoulli conjugacy, track 7) and play the argmax; near-optimal and trivially online.
- Contextual bandits add a feature vector before each decision (personalized assignment). Naively, adaptively-collected data biases the outcome model (early non-uniform assignment confounds), so balance with IPW on the assignment propensities — exactly the causal-inference fix, imported into online learning. Doubly-robust and balanced LinUCB/LinTS reduce this bias.
- Recommendations as treatments. Showing a user an item is an intervention; observed ratings are a confounded, non-randomly-exposed sample. Reweight by exposure propensities (IPW again) to debias evaluation; the deconfounded recommender fits an exposure model to construct a substitute for unobserved confounders before fitting ratings.
- ML for causal estimation. Prediction in service of identification: the IV first stage, propensity estimation, and flexible confounder control are all prediction problems where ML helps — but with the firewall principle (no data used to fit the predictor may be used to evaluate it; CV the whole pipeline, track 6 §6) and honest SEs that account for model selection (post-lasso inference is subtle — correlated predictors make “which variable matters” unanswerable even when predictions agree).
Core competency set
- Define regret; contrast UCB (optimism) and Thompson sampling (probability matching).
- Explain why adaptively-collected bandit data needs IPW balancing.
- State recommendations-as-treatments and the firewall principle for ML-in-causal.
11. Memorize cold
- Potential outcomes ; switching equation ; fundamental problem = one column observed; SUTVA (no interference, no hidden versions).
- ATE ; ATE .
- SDO ATE selection bias heterogeneity bias; kills both.
- Randomized experiment probabilistic + known + individualistic + unconfounded; DIM unbiased via and .
- Neyman variance is conservative (drop unidentifiable ); HT .
- Fisher sharp null → exact permutation p-value ; valid for any , power depends on .
- Ignorability + overlap; identification (tower + ignorability + consistency).
- Propensity is a balancing score (); adjust for alone; IPW .
- Sensitivity: odds-ratio bound , report .
- DAG: chain/fork block on conditioning, collider opens on conditioning (don’t condition on colliders/mediators); d-sep cond. indep.; (backdoor).
- IV: strata C/AT/NT/D; assumptions randomization + exclusion + relevance + monotonicity; = reduced-form/first-stage; compliers only; weak-instrument fragility.
- RDD: , continuity, LATE at cutoff, McCrary test. DiD: double difference cancels (1st diff) and (2nd diff), parallel trends, ATT. FE: demean kills time-invariant . Synthetic control: weighted donor counterfactual.
- Bandits: regret; UCB optimism; Thompson probability-matching. Firewall principle for ML-in-causal.
Named moves (cross-track glossary): impute-the-missing-counterfactual (the whole subject); decompose-the-naive-estimator (SDO); randomize-to-buy-independence; condition-to-buy-it-given-X (ignorability); tower-rule-then-split (identification + IPW unbiasedness — track 1); bound-the-unidentifiable (conservative variance); permute-under-the-sharp-null (Fisher — rejection sampling, track 7); reconstruct-the-experiment (matching/propensity); read-the-adjustment-set-off-the-graph (backdoor); don’t-condition-on-colliders; ratio-of-ITTs (LATE); difference-out-the-confounder (DiD/FE); local-as-good-as-random (RDD); explore-vs-exploit (bandits); reweight-by-propensity (IPW, recs, contextual bandits).