Causal Inference
Prediction answers "what will happen?"; causal inference answers "what happens if we act?". Start from Simpson's paradox and potential outcomes, learn to read causal graphs and the do-operator, estimate effects from experiments and from observational data, and use causal ideas in machine learning: heterogeneous effects, double ML, counterfactuals, causal discovery and models that survive distribution shift.
For students, engineers and researchers who know basic probability (conditional probability, expectation, regression) and some machine learning, and who want to answer causal questions with data: A/B tests, policy and treatment effects, uplift, fairness and robust models. Every lesson has a simulation with a known true effect, so you can check each method against the truth.
Quick recap
The key takeaways of all lessons on one page
All interactive figures
Every figure of the track on one page
Videos and books
The best free courses
Glossary
Every technical term of the track with a short definition
Concept map
How the lessons of this track connect to each other and to other tracks.
Keeps every lesson page and figure of this track in this browser, so you can read it without internet.
Start here: causal questions and experiments
Why correlation is not causation, Simpson's paradox, potential outcomes, and why randomized experiments answer causal questions.
-
01
Correlation, causation and Simpson's paradoxWhy an association in data is not a causal effect. The five sources of association, confounding, Simpson's paradox with the kidney-stone data, and Pearl's ladder of causation.
70 min
4 figures
Beginner -
02
Potential outcomes, the fundamental problem and randomized experimentsCausal effects defined with potential outcomes, why half of the data is always missing, why the naive comparison is biased, and why a randomized experiment answers the causal question. Neyman's and Fisher's inference, blocking and A/B tests.
85 min
3 figures
Beginner
Causal graphs and the do-operator
Draw the assumptions as a graph, read independences with d-separation, and decide which effects the data can identify.
-
03
Causal graphs: structural causal models, d-separation, confounders and collidersA causal graph draws the assumptions of a structural causal model. Read the independences it implies with d-separation, recognise confounders, mediators and colliders, and see why selecting or conditioning on a common effect creates bias.
90 min
5 figures
Intermediate -
04
Interventions and identification: the do-operator, backdoor and frontdoor adjustment, do-calculusAn intervention cuts the arrows into the treatment. With a causal graph you can decide whether an effect can be computed from observational data, which variables to adjust for (backdoor criterion), what to do when the confounder is hidden (frontdoor), and when no method can work (do-calculus).
90 min
5 figures
Advanced
Estimating causal effects
Adjust for observed confounders with regression, matching and weighting; use instruments, cutoffs and before-after comparisons when confounders are hidden.
-
05
Adjustment, matching, propensity scores and inverse probability weightingEstimate a causal effect from observational data when all confounders are measured. Outcome regression, matching, the propensity score, inverse probability weighting, the doubly robust AIPW estimator, balance and overlap checks, and sensitivity analysis for a hidden confounder.
95 min
5 figures
Intermediate -
06
Instrumental variables: noncompliance, 2SLS and the local average treatment effectWhen a hidden confounder blocks every adjustment, a variable that moves the treatment and touches the outcome only through it can still identify an effect. The Wald ratio, compliance types and the LATE, two-stage least squares, and weak instruments.
85 min
3 figures
Advanced -
07
Regression discontinuity, difference-in-differences and synthetic controlThree designs that find a fair comparison when confounders are hidden. A sharp rule at a cutoff (regression discontinuity), a change over time compared with an untreated group (difference-in-differences, event studies, staggered adoption), and a weighted mix of control units (synthetic control).
85 min
4 figures
Intermediate
Causal ML, counterfactuals and discovery
Effects that differ between people, machine learning inside causal estimators, questions about single cases, and learning the graph from data.
-
08
Heterogeneous effects and causal ML: meta-learners, double ML and causal forestsUse machine learning inside causal estimators. Estimate how an effect changes from person to person (the CATE) with S-, T-, X- and DR-learners and causal forests, estimate one effect with double machine learning, and evaluate an uplift model without ever seeing an individual effect.
110 min
5 figures
Advanced -
09
Counterfactuals and mediation: questions about single cases and causal pathsAnswer "what would have happened to this person if…?" with the three steps of abduction, action and prediction; compute the probability of necessity behind "but for" reasoning; and split a total effect into a direct and an indirect part with natural direct and indirect effects.
90 min
4 figures
Advanced -
10
Causal discovery: learning the graph from dataLearn which causal graphs fit a dataset. Markov equivalence says what observational data can and cannot decide; the PC algorithm finds the equivalence class with independence tests; score-based methods and NOTEARS search over graphs; non-Gaussian noise and interventions orient the remaining edges.
90 min
5 figures
Advanced
Causality in machine learning practice
Why models learn spurious features, which distribution shifts a causal model survives, and how to evaluate a new policy from logged data.