Causal inference when you cannot run a test
Sometimes randomising is impossible — the feature shipped everywhere, the policy is legally required, the change is a price. This lesson works difference-in-differences by hand, shows the pre-trend check that decides whether the estimate means anything, and lays out matching, synthetic control, instrumental variables, and regression discontinuity with the assumption each one buys.
What you'll be able to do
- Explain why a before/after comparison and a treated-vs-control comparison are both biased, and how differencing removes each bias
- Compute a difference-in-differences estimate and test the parallel-trends assumption on the pre-period
- Choose between matching, synthetic control, instrumental variables, and regression discontinuity based on which assumption is defensible
- State the confounders and threats to validity for an observational estimate before presenting the number
Before this: peeking-novelty-and-interference
The rest of this lesson is in the app
Sometimes randomising is impossible — the feature shipped everywhere, the policy is legally required, the change is a price. This lesson works difference-in-differences by hand, shows the pre-trend check that decides whether the estimate means anything, and lays out matching, synthetic control, instrumental variables, and regression discontinuity with the assumption each one buys. This walkthrough runs about 26 minutes, with runnable code you can edit and re-run as you read.
Continue in ChannelPulseThe first module of every track is free to read on the web — see what's open in Data science.