A city introduces a new minimum wage. Six months later, employment in that city has dropped slightly. Did the policy cause it?

Not necessarily. Maybe the whole region was slowing down anyway. Simply comparing “before” and “after” can’t separate the effect of the policy from everything else happening at the same time.

That’s the problem difference-in-differences (DiD) solves. It is one of the most popular methods in economics, public health, and social science for estimating cause and effect when you can’t run a randomized experiment. Here is how it works, in plain English.

What Is Difference-in-Differences?

DiD compares how an outcome changed over time in a treatment group (affected by an intervention) with how it changed in a control group (not affected).

The logic is simple:

That final subtraction is your DiD estimate: the “difference in the differences.”

A Quick Example

Suppose a school district launches a tutoring program in some schools.

GroupBeforeAfterChange
Schools with tutoring7080+10
Schools without tutoring6872+4

DiD estimate = 10 − 4 = 6 points.

Test scores rose everywhere (maybe due to easier exams or general trends), but the tutoring schools improved by 6 points more. That extra gain is the estimated effect of the program.

Why Use DiD?

The Key Assumption: Parallel Trends

DiD depends on one critical idea: without the intervention, both groups would have followed similar trends.

This doesn’t mean the groups must have the same starting level. It means their paths should have moved in parallel.

How to Check It

If the trends were already diverging, your result may reflect that gap rather than the intervention.

Running DiD as a Regression

In practice, researchers estimate DiD with a simple regression:

Outcome = β₀ + β₁(Treated) + β₂(Post) + β₃(Treated × Post) + error

What Each Term Means

Regression lets you add control variables, use fixed effects, and calculate proper standard errors.

When Should You Use DiD?

DiD works well when:

Common use cases:

Common Pitfalls to Avoid

Tools to Get Started

Conclusion

Difference-in-differences gives researchers a practical way to answer the question, “Did this intervention actually make a difference?” By comparing changes over time between a treated and untreated group, you filter out background trends and stable group differences. Just remember that the method is only as credible as its parallel trends assumption, so always check it.

Ready to try it yourself? Pick a public dataset with a policy change (many U.S. state-level datasets work well), plot the pre-trends, and run your first DiD regression. Have a question about your own research design? Leave a comment below, and subscribe for more plain-English guides to causal inference.

Leave a Reply

Your email address will not be published. Required fields are marked *