Glossary

Difference-in-differences (DiD)

A causal method that compares the before-and-after change in a treated group against the before-and-after change in an untreated group.

Also called: diff-in-diff

Difference-in-differences estimates a treatment's causal effect by comparing how an outcome changed over time in a group that received the treatment against how it changed, over the same period, in a comparable group that did not. The effect estimate is the difference between those two differences, which is where the method's name comes from.

DiD is used when a proper randomized experiment isn't possible, such as when a policy, price change, or feature rollout affects one region, market, or cohort but not another. Its key assumption is "parallel trends": absent the treatment, the treated and untreated groups would have moved together over time. If that assumption fails, if the groups were already diverging for unrelated reasons, the estimate is biased, so analysts typically check pre-treatment trends for both groups before trusting the result.

DiD is common in geo experiments, marketing measurement, and public-policy evaluation, wherever a natural or arbitrary boundary creates a treated and untreated group. It is less precise than a randomized A/B test because the two groups were never guaranteed comparable to begin with, but it remains one of the most widely used tools in applied causal inference specifically because it needs no randomization to work.

Last reviewed September 22, 2026

In the index now

Related terms

Related guides