Difference-in-differences (DiD)

    Difference-in-differences estimates an effect by comparing the change over time in a treated group with the change over the same period in an untreated group.

    Last reviewed

    Say sales in the test regions rose 12% and sales in the control regions rose 5%. The difference between those differences, seven points, is the estimate. Using changes instead of levels cancels out fixed gaps between the groups.

    It rests on one assumption: without the treatment, both groups would have moved in parallel. Check how they moved before the test. If they weren't parallel then, don't trust the estimate now.

    Topic
    Experiments and statistics

    Related terms

    Geo experiment
    A geo experiment changes advertising in some regions and not others, then compares sales between them to measure what the advertising caused.
    Synthetic control
    A synthetic control is a weighted blend of untreated regions, built so that its history tracks the test region closely. It serves as the comparison when no single region is a good match.
    Quasi-experiment
    A quasi-experiment compares treated and untreated groups that weren't formed by random assignment, using statistical methods to make the comparison as fair as it can be.
    Counterfactual
    The counterfactual is what would have happened if you hadn't run the marketing. The effect of a campaign is the gap between what did happen and that unseen alternative.

    Want a second opinion?

    Tell us what you're trying to decide and what data you have, and we'll tell you what we'd do. Or take the short readiness quiz first. It's a rough screen, not a verdict. Both open on the home page.