Type at least 2 letters. Enter opens the first result, Esc closes.

    11 lessons · about 16 hours · 47 figures

    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.

    0 / 11
    lessons marked as done
    Part 1

    Start here: causal questions and experiments

    Why correlation is not causation, Simpson's paradox, potential outcomes, and why randomized experiments answer causal questions.

    1. 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
    2. 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
    Part 2

    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.

    1. 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
    2. 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
    Part 3

    Estimating causal effects

    Adjust for observed confounders with regression, matching and weighting; use instruments, cutoffs and before-after comparisons when confounders are hidden.

    1. 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
    2. 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
    3. 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
    Part 4

    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.

    1. 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
    2. 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
    3. 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
    Part 5

    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.

    1. 11 Causality in ML practice: spurious features, distribution shift and off-policy evaluationUse causal thinking where machine learning meets the real world. See why models learn spurious features, which conditional distribution stays stable under which shift, how invariance across environments points to causal features, and how to evaluate a new policy from logged data with IPS, SNIPS and doubly robust estimators. 80 min
      4 figures
      Intermediate