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.

Best for: feature launches, policy changes, and experiments with clear pre/post periods

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?”

DiD Two Point estimator
Effect = (YTreated, Post − YTreated, Pre) − (YControl, Post − YControl, Pre)

When to use DiD – Two Point

DiD Two Point is a good fit when:

Common examples:

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:

Yit = α + β · Treatedi + γ · Postt + δ · (Treatedi × Postt) + εit

where:

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

Illustrative example

Suppose you are evaluating a new paywall on a subset of users. You measure average revenue per user (ARPU) before and after launch:

Changes over time:

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:

Common pitfalls and checks

When using DiD Two Point, data scientists should pay attention to:

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.