Difference-in-Differences (DiD) – Two Point
A clean, two-period Difference-in-Differences estimator for estimating treatment effects from before–after data with treated and control groups.
What the DiD Two Point method does
The Difference-in-Differences (DiD) Two Point method helps data scientists estimate the causal effect of a treatment or intervention using observational or quasi-experimental data. It focuses on settings with exactly two time points—typically a pre period and a post period—observed for both a treated group and a control group.
Instead of just comparing levels across groups, DiD looks at changes over time. It asks: “How much did the treated group change from pre to post, and how much of that change is above and beyond the change we would have expected from the control group?”
When to use DiD – Two Point
DiD Two Point is a good fit when:
- You have a treatment applied to some units (e.g., users, stores, regions) but not others.
- You observe those units in exactly two time periods: before and after the intervention.
- The treated and control groups are expected to follow similar trends over time in the absence of treatment.
- You care about the average treatment effect on the treated (ATT), not just correlations.
Common examples:
- Rolling out a new onboarding flow to a subset of users while others stay on the old flow.
- Launching a pricing change in specific regions while other regions are unchanged.
- Introducing a policy or feature to a treatment cohort and using a comparable cohort as control.
Core assumptions
For the DiD Two Point estimator to be interpretable as a causal effect, data scientists typically rely on:
1. Parallel trends (in the absence of treatment)
The key assumption is that, without the treatment, the change over time in the treated group would have been the same as the change over time in the control group. DiD effectively uses the control group to estimate this “counterfactual” change for the treated group.
2. No other shocks that differentially affect treatment and control
There should not be another event at the same time that impacts only the treated (or only the control) group. If there is, the DiD estimate will mix the effect of the treatment with the effect of that other shock.
3. Stable composition and definitions
The meaning of “treated” and “control” should be stable across time, and the units compared should be broadly similar. Large changes in who is in each group or how metrics are defined can break the interpretation.
How the estimator works
The DiD Two Point estimator can be implemented either via the simple difference formula above or via a regression with an interaction term. A common specification is:
where:
- Yit is the outcome for unit i at time t
- Treatedi is 1 for treated units, 0 otherwise
- Postt is 1 in the post period, 0 in the pre period
- δ (delta) is the DiD effect – the additional change in the treated group relative to control
In this setup, δ is the main parameter of interest. It captures how much more the treated group changed from pre to post compared to the control group.
A simple numerical example
Suppose you are evaluating a new paywall on a subset of users. You measure average revenue per user (ARPU) before and after launch:
- Treated group: ARPU goes from 10 to 15
- Control group: ARPU goes from 9 to 11
Changes over time:
- Change in treated = 15 − 10 = 5
- Change in control = 11 − 9 = 2
DiD effect = 5 − 2 = 3. Under the assumptions above, you interpret this as: the new paywall increased ARPU by about 3 units for the treated users, relative to what would have happened without the change.
DiD Two Point vs. TWFE DiD
The Two Point version of DiD focuses on settings with exactly two periods. In contrast, Two-Way Fixed Effects (TWFE) DiD models are used for richer panel data with multiple periods and staggered treatment timing.
Benefits of the Two Point setup:
- Conceptually simple and easier to explain to stakeholders.
- Clear, single pre and post periods reduce complexity around timing.
- Less sensitive to some of the pitfalls that arise in staggered-adoption TWFE designs.
Common pitfalls and checks
When using DiD Two Point, data scientists should pay attention to:
- Non-comparable groups: If treated and control units are fundamentally different, the parallel trends assumption is less credible.
- Seasonality or external shocks: If the pre/post boundary coincides with holidays, season changes, or major events, controls must truly capture those effects.
- Outcome definition changes: Metric restatements or logging changes between pre and post can mimic a treatment effect.
In richer datasets (e.g., multiple pre periods), data scientists often inspect pre-period trends to make the parallel trends assumption more credible. Even in a pure Two Point setup, context, domain knowledge, and complementary analyses are essential.