Data science · Experiments — the checks before the result

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.

26 min read Full lesson in the app Patterns: difference-in-differences, parallel-trends, synthetic-control, regression-discontinuity

What you'll be able to do

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 ChannelPulse

The first module of every track is free to read on the web — see what's open in Data science.