Why Write DiD in Potential-Outcomes Terms?
A two-period difference-in-differences (DiD) calculation compares outcome changes in a treated group with outcome changes in a control group. The arithmetic can be computed from observed outcomes, but a causal interpretation requires asking a different question: what would the treated group’s post-period outcome have been without treatment? Potential outcomes make that missing comparison explicit.
This tutorial derives the two-period DiD contrast using potential outcomes. The derivation clarifies which outcomes are observed in each group and period, which remain counterfactual, and what the observed contrast equals before any identifying assumption is added.
Groups, Periods, and Potential Outcomes
Let \(D_i=1\) indicate that unit \(i\) belongs to the group exposed to treatment in the post period, and let \(D_i=0\) indicate membership in the untreated control group. Index the baseline period by \(t=0\) and the post period by \(t=1\). For each unit and period, define \(Y_{it}(1)\) as the outcome that would be observed if the unit were treated at time \(t\), and \(Y_{it}(0)\) as the outcome that would be observed if it were untreated at time \(t\).
The two-period setup assumes that neither group is treated at baseline, the treated group receives treatment in the post period, and the control group remains untreated. We also assume no anticipation: future treatment does not change baseline outcomes. Under consistency, the observed outcome is the potential outcome corresponding to the treatment status actually received. The setup also presumes no interference between units, so one unit’s treatment does not change another unit’s potential outcome.
Thus, treated-group units have \(A_{i0}=0\) and \(A_{i1}=1\); control-group units have \(A_{i0}=A_{i1}=0\). The distinction between a potential outcome and an observed outcome matters: for any unit-period, only the potential outcome matching its actual treatment status is observed.
| Group and period | Actual treatment status | Observed outcome | Unobserved potential outcome |
|---|---|---|---|
| Treated group, baseline \(t=0\) | Untreated | \(Y_{i0}(0)\) | \(Y_{i0}(1)\) |
| Treated group, post \(t=1\) | Treated | \(Y_{i1}(1)\) | \(Y_{i1}(0)\) |
| Control group, baseline \(t=0\) | Untreated | \(Y_{i0}(0)\) | \(Y_{i0}(1)\) |
| Control group, post \(t=1\) | Untreated | \(Y_{i1}(0)\) | \(Y_{i1}(1)\) |
The table describes availability, not whether a potential outcome is conceptually meaningful. For example, \(Y_{i1}(0)\) for a treated-group unit is well-defined as the outcome that unit would have had in the post period without treatment, but it is not observed for that unit. Likewise, \(Y_{i1}(1)\) for a control-group unit is not observed. The DiD calculation uses observed outcomes only; its causal interpretation depends on how these missing potential outcomes relate to observed ones.
Worked Example: Labeling Observed and Counterfactual Outcomes
Suppose, hypothetically, that the entries below are group-average outcomes, measured in symptom-score points. Treatment begins after baseline for the treated group only.
| Group and period | Potential-outcome means |
|---|---|
| Treated group, baseline | \(E[Y_0(0)\mid D=1]=50\); \(E[Y_0(1)\mid D=1]=\) unobserved |
| Treated group, post | \(E[Y_1(1)\mid D=1]=66\); \(E[Y_1(0)\mid D=1]=58\), counterfactual |
| Control group, baseline | \(E[Y_0(0)\mid D=0]=45\); \(E[Y_0(1)\mid D=0]=\) unobserved |
| Control group, post | \(E[Y_1(0)\mid D=0]=49\); \(E[Y_1(1)\mid D=0]=\) unobserved |
The observed treated-group change is \(66-50=16\) points. The observed control-group change is \(49-45=4\) points. The DiD contrast is therefore \(16-4=12\) points. The treated group’s post-period treatment effect, using the stated counterfactual mean, is \(66-58=8\) points. Its untreated change would have been \(58-50=8\) points, whereas the control group’s untreated change is \(49-45=4\) points. The untreated trend difference is \(8-4=4\) points, and \(8+4=12\), matching the DiD contrast.
The value 58 is a counterfactual mean in this hypothetical illustration. In an actual study, that mean is not directly observed for the treated group. The example shows how it enters the derivation; it does not show that the observed DiD calculation alone recovers it.
The Population DiD Contrast
Write \(E[Y_t(a)\mid D=d]\) for the mean potential outcome at time \(t\), under treatment status \(a\), among units in group \(d\). The population DiD contrast is the treated group’s observed mean change minus the control group’s observed mean change. By the treatment timing and consistency conditions, its observed-outcome form is:
This contrast is formed from observed cells: treated-group outcomes under no treatment at baseline and treatment after baseline, and control-group outcomes under no treatment in both periods. It is an algebraic contrast of observed means. To understand its causal content, add and subtract the treated group’s unobserved post-period mean under no treatment, \(E[Y_1(0)\mid D=1]\).
The first term is the average treatment effect on the treated in the post period: the treated group’s mean post-period outcome under treatment minus its mean post-period outcome under no treatment. The bracketed term is the difference between the groups’ mean changes in outcomes under no treatment. This second term compares two untreated potential-outcome trends, one of which is counterfactual for the treated group.
What the Decomposition Does—and Does Not—Tell Us
The decomposition identifies the key gap between a descriptive contrast and a causal effect. The DiD contrast equals the treated group’s average post-period effect when the bracketed untreated-trend difference is zero. Whether that equality is credible is an identifying question, not an algebraic consequence of computing the contrast. The next step in studying DiD is to examine the assumption that makes this equality plausible; here, the important point is that the counterfactual trend appears explicitly in the formula.
The contrast is not generally the difference in treatment effects between groups. For this two-period design, the control group is never treated, so its observed post-period outcomes do not reveal a treatment effect for controls. The first term in the decomposition concerns the treated group. Nor is the DiD contrast automatically the treated group’s change in outcomes: it subtracts the control group’s observed change, and this subtraction equals the causal effect only under an additional condition on untreated trends.
Worked Example: The Same Observed DiD, Different Counterfactual Effects
Suppose hypothetical observed mean symptom scores are 40 at baseline and 55 after treatment for the treated group, and 30 at baseline and 36 after treatment for controls. The observed DiD is:
Consider two possible values for the treated group’s unobserved post-period mean under no treatment. These are alternative hypothetical counterfactual scenarios, not values learned from the observed outcomes.
Scenario A: If \(E[Y_1(0)\mid D=1]=46\), the treated group’s effect is \(55-46=9\) points. Its untreated change is \(46-40=6\) points, equal to the control group’s untreated change of \(36-30=6\) points. The decomposition gives \(9+(6-6)=9\) points.
Scenario B: If \(E[Y_1(0)\mid D=1]=50\), the treated group’s effect is \(55-50=5\) points. Its untreated change is \(50-40=10\) points, so the untreated trend difference is \(10-6=4\) points. The decomposition gives \(5+4=9\) points.
Both scenarios produce the same observed DiD of 9 points, but they imply different treatment effects. The observed group means do not distinguish the scenarios because \(E[Y_1(0)\mid D=1]\) is unobserved. This illustrates why the causal interpretation requires more than the contrast’s arithmetic.
From Population Means to a Sample Calculation
In data, population means are replaced by sample means for the relevant groups and periods. Let \(\bar{Y}_{d,t}\) denote the observed sample mean in group \(d\) at time \(t\). The sample DiD estimate is:
This sample statistic estimates the corresponding population contrast, subject to the study’s sampling and design. It does not make the missing treated-group post-period outcomes under no treatment observable. The same potential-outcomes decomposition applies to the population target; in a sample, its components are not all directly calculable because the counterfactual mean remains missing.
Worked Example: Connecting the Observed Table to the Decomposition
Imagine a hypothetical study measuring average weekly hours of work. The treated group’s sample mean is 32 hours at baseline and 35 hours post-treatment. The control group’s sample mean is 30 hours at baseline and 31 hours post-treatment. The observed changes are:
The sample DiD is \(3-1=2\) hours. Its potential-outcomes interpretation is the treated group’s average post-period treatment effect plus the difference in mean untreated changes. For example, if the treated group’s mean post-period outcome without treatment were hypothetically 33 hours, its effect would be \(35-33=2\) hours. Its untreated change would be \(33-32=1\) hour, matching the control group’s \(31-30=1\) hour change. The decomposition would then give \(2+(1-1)=2\) hours.
The observed table establishes the two changes and their contrast, all in hours. It does not establish that the treated group’s unobserved untreated change would have been 1 hour. The value 33 is supplied only to illustrate one counterfactual scenario consistent with a causal effect equal to the observed contrast.
Common Mistake: Treating the Contrast as the Effect by Definition
A frequent error is to write “the treated group increased by 12 points, controls increased by 4 points, so treatment caused an 8-point increase,” as though subtracting changes automatically removes every non-treatment difference. The subtraction removes the control group’s observed change. It removes the treated group’s untreated change only when the treated and control groups would have had the same mean untreated change. The potential-outcomes decomposition shows the remaining term explicitly.
A careful report therefore distinguishes the observed DiD contrast from the causal effect it may identify. State the contrast in the outcome’s units, identify the causal estimand of interest, and explain why the unobserved treated-group outcome trend without treatment can be related to the control group’s trend. Do not describe the counterfactual as an observed fact.
Check Your Understanding
Use potential-outcomes notation to answer the following questions.
- For a treated-group unit at baseline, which potential outcome is observed under the no-anticipation setup, and which is counterfactual?
- For a control-group unit in the post period, why is \(Y_1(0)\) observed while \(Y_1(1)\) is not?
- Write the population DiD contrast using group-conditional potential-outcome means.
- In the decomposition, what does \(E[Y_1(1)-Y_1(0)\mid D=1]\) represent?
- If the treated group’s untreated mean change is 3 outcome units and the control group’s untreated mean change is 1 unit, what term is added to the treated group’s effect in the DiD decomposition?
- Why can identical observed DiD contrasts be consistent with different treatment effects?