You launch something in six markets and sales rise 8%. The naive reading treats zero as the counterfactual, which is almost never right — sales might have risen 5% anyway on seasonality alone. Difference-in-differences fixes that by borrowing a comparison: look at markets that received nothing, measure how much *they* changed over the same window, and subtract. What remains is the change specific to the treated group, and it is a much better estimate of the effect than either single difference.
The name is literal. The first difference is before-versus-after within the treated group, which removes everything permanently distinctive about those markets — their size, their baseline conversion, their customer mix. The second difference is the same before-versus-after in the untreated group, which captures everything that happened to everyone over that period: the season, the economy, a site-wide change, a competitor's promotion. Subtracting the second from the first removes both classes of nuisance at once, which is why the design is so widely used with observational data.
Everything rests on one assumption, and it is worth stating in its exact form: in the absence of treatment, the two groups would have moved in parallel. Not that they were at the same level — the design explicitly allows different baselines — but that their *trends* would have matched. This cannot be verified, because it is a claim about a period that did not happen. What you can do is check whether the trends were parallel before the intervention, over as long a pre-period as you have, which is evidence for the assumption rather than proof of it.
Two failures break it in practice. Selection into treatment: if the six markets were chosen because they were underperforming, or because a regional manager pushed for them, they were already on a different trajectory and the parallel trends assumption is false in a direction you cannot see. And anticipation: if anyone changed behaviour before the official start date — a pre-launch push, retailers stocking up — the pre-period is contaminated and the effect is understated. When treatment assignment is non-random in a way you cannot argue away, synthetic control is usually the better tool, because it builds a comparison group weighted to match the treated unit's history rather than assuming an existing group will do.
Two technical points that bite. Inference on repeated observations of the same units is not standard: outcomes within a market are correlated over time, so ordinary standard errors are badly understated and the errors must be clustered at the treated unit. And with units treated at different times, the classic two-way fixed-effects regression can be biased — sometimes even carrying the wrong sign — because it uses already-treated units as controls for later-treated ones. Modern estimators from the staggered-adoption literature fix this and should be the default whenever the rollout was phased.
The estimator is four averages, and it is identical to one coefficient in a regression — which is the form to use in practice, because it gives you standard errors and covariates.
A four-week out-of-home campaign runs in eight metro areas. Twelve comparable metros receive nothing. Weekly revenue per 100,000 population is measured for twelve weeks before and four weeks during.
- Treated metros, pre-period
- £4,120 per 100k / week
- Treated metros, campaign period
- £4,655
- Control metros, pre-period
- £3,880
- Control metros, campaign period
- £4,190
- Treated change
- +£535 (+13.0%)
- Control change
- +£310 (+8.0%)
DiD estimate = £535 − £310 = £225 per 100k per week, about a 5.5% lift. Clustered 95% CI: £84 to £366.
The naive 13% would have credited the campaign with the whole seasonal rise that lifted every metro; the honest figure is roughly 5.5%. Before believing it, plot the twelve pre-period weeks for both groups: if the treated metros were already pulling away, the assumption is broken and the estimate is inflated by whatever the divergence was. Two further checks earn their keep. The interval is built on clustered standard errors, and with only eight treated clusters it is wide — unclustered errors here would have been perhaps a third of the width and badly overconfident. And a placebo test, running the same estimator on a period before the campaign, should return an effect indistinguishable from zero; if it does not, the design is picking up something other than the campaign.
- דThe pre-period trends look parallel, so the assumption is satisfied.”
- Parallel pre-trends are evidence, not proof — the assumption concerns the post-period, which is unobservable by construction. A shock coinciding with the treatment can break parallelism after a decade of it holding. Treat the pre-trend check as necessary and never sufficient, and pair it with a placebo test on an earlier period.
- דDifference-in-differences needs the two groups to be similar.”
- It needs their trends to be similar, not their levels — that is exactly what the first difference removes. A large market and a small one can support a valid DiD provided they move together proportionally. Insisting on matched levels while ignoring trends gets the requirement precisely backwards.
- דWe can run the standard regression even though markets went live in different weeks.”
- Two-way fixed effects with staggered adoption uses already-treated units as controls for later-treated ones, and can produce a biased estimate — occasionally with the wrong sign — when effects vary over time. Use an estimator built for staggered adoption instead; the difference is often large enough to reverse a conclusion.