Day 31. The Rubin Causal Model & Potential Outcomes
Units, treatments and potential outcomes; the science table; and why the assignment mechanism decides what the data can tell you.
- ●Write a science table and compute unit-level and average treatment effects.
- ●Derive the observed-outcome identity Y = Y(0) + T·(Y(1) − Y(0)).
- ●Prove that complete randomisation makes the difference in means unbiased for the finite-population ATE.
- ●Distinguish well-defined from ill-defined treatments, and finite- from super-population estimands.
Theory
Potential outcomes
Phase 1 and 2 gave you the tools; Phase 3 gives them a causal meaning. The Rubin causal model (Neyman 1923, Rubin 1974) starts from three ingredients:
- Units : workers, households, patients, villages.
- A treatment : training or not, a cash transfer or not.
- Potential outcomes and : what unit 's outcome would be under each treatment, both defined before treatment is assigned.
The unit-level causal effect is . Collected in one table, the potential outcomes and covariates of all units form the science table: everything there is to know about the causal question.
The observed outcome
We only ever see the outcome under the treatment actually received:
For every unit, one potential outcome is observed and the other is missing: the fundamental problem of causal inference (Holland 1986). Causal inference is therefore a missing-data problem (Day 14).
Estimands
For a fixed set of units, the finite-population ATE is
If the units are a random sample from a larger population, the super-population ATE is . Day 33 adds ATT, ATC and CATE.
The assignment mechanism
The assignment mechanism is the rule that decides who gets treated: . It is the crux of every design:
- In a randomised experiment the researcher controls it and it does not depend on potential outcomes.
- In an observational study people (or officials) choose, often based on what they expect to gain.
With complete randomisation, exactly of units are treated and each of the assignments is equally likely. Then the difference in means is unbiased for (Exercise 8).
What counts as a treatment
"No causation without manipulation" (Holland): must be well defined. "The effect of a job-training voucher" is; "the effect of being obese" is not, because there are many ways to change weight (diet, exercise, surgery) with different consequences. Day 32 formalises this as SUTVA.
Part 1 · Warm-up
Four unemployed workers' annual earnings (in $1,000) with and without a training programme:
| Worker | ||
|---|---|---|
| A | 10 | 14 |
| B | 12 | 12 |
| C | 8 | 13 |
| D | 15 | 15 |
Exercise 1 · Unit and average effects
Compute each worker's effect and the finite-population ATE.
Show solution
Step 1. Unit effects : A , B , C , D .
Step 2. ATE .
Answer: training raises earnings by $2,250 on average, but only two of the four workers gain at all.
Exercise 2 · What the data show
Workers A and C are trained (). Write the observed outcomes and compute the difference in means.
Show solution
Step 1. Observed outcomes: A and C show , B and D show : .
Step 2. Treated mean ; control mean .
Answer: the difference is 0, although the ATE is 2.25. One assignment can give a misleading answer.
Exercise 3 · The observed-outcome identity
Check for workers A and B.
Show solution
Step 1. A: ✓ (observed ).
Step 2. B: ✓ (observed ).
Exercise 4 · The missing half
For the assignment in Exercise 2, which entries of the science table are observed and which are missing?
Show solution
Step 1. Observed: .
Step 2. Missing: .
Answer: exactly half the table is missing, and every unit-level effect needs one missing value.
Exercise 5 · Counting assignments
How many assignments treat exactly 2 of the 4 workers?
Show solution
Step 1. Choose 2 of 4: .
Answer: 6 equally likely assignments under complete randomisation.
Part 2 · Proofs
Exercise 6 · The observed-outcome identity
Prove .
Show solution
Step 1. Expand the left side: .
Step 2. Group the terms with : .
Exercise 7 · ATE as a difference of means
Prove .
Show solution
Step 1. .
Step 2. Split the sum (linearity): .
So we never need individual effects to learn the ATE, only the two means.
Exercise 8 · Complete randomisation is unbiased
Under complete randomisation with treated, prove , where the expectation is over assignments and the science table is fixed.
Show solution
Step 1. Write the treated mean with indicators: (for treated units the observed outcome is ).
Step 2. Only is random, and by symmetry .
Step 3. So .
Step 4. Likewise and .
Step 5. Linearity and Exercise 7: .
Exercise 9 · Unit effects are not identified
Construct a second science table for workers A–D that produces exactly the same observed data as Exercise 2 but has a different ATE.
Show solution
Step 1. Keep the observed entries fixed: , , , .
Step 2. Change the missing entries, e.g. , , , .
Step 3. New effects: 0, 8, 0, 0, so ATE instead of 2.25.
Answer: both tables fit the data perfectly. Without assumptions on the assignment mechanism, the data cannot distinguish them.
Exercise 10 · Post-treatment variables have potential values too
A training programme may change whether a worker moves city, . Explain why has potential values , and why comparing trained and untrained workers who did not move is not a causal comparison.
Show solution
Step 1. Moving happens after assignment and can be affected by it, so each worker has and .
Step 2. "Trained non-movers" are workers with ; "untrained non-movers" have . These are generally different sets of people.
Answer: the comparison mixes the effect of training with differences between two selected groups. Only pre-treatment covariates (fixed before assignment) can be conditioned on safely; this is the "bad control" problem of Day 53.
Part 3 · Applied
Exercise 11 · Every possible experiment
For the training science table, compute the difference in means for all 6 assignments with 2 trained workers, and verify that their average equals the ATE.
Show solution
Step 1. For each pair treated, compare the treated workers' with the others' :
| Trained | Treated mean | Control mean | |
|---|---|---|---|
| A, B | 1.5 | ||
| A, C | 13.5 | 13.5 | 0 |
| A, D | 14.5 | 10 | 4.5 |
| B, C | 12.5 | 12.5 | 0 |
| B, D | 13.5 | 9 | 4.5 |
| C, D | 14 | 11 | 3 |
Step 2. Average: .
Answer: exactly the ATE, as Exercise 8 promised, even though individual experiments range from 0 to 4.5. Unbiasedness is a property of the design, not of one realised experiment.
Exercise 12 · Workers who choose
Now suppose workers know their gains and enrol only if they gain (A and C). Compute the difference in means and compare with the ATT.
Show solution
Step 1. Same observed data as Exercise 2: difference in means .
Step 2. ATT average effect among enrollees A and C .
Step 3. Why the gap: enrollees would have earned less without training (: 10 and 8) than non-enrollees (12 and 15), so the comparison is contaminated by selection bias .
Answer: naive 0 = ATT 4.5 + selection bias (−4.5). Self-selection can hide a large effect completely (Day 34).
Exercise 13 · Is the treatment well defined?
A ministry asks: "What is the effect of obesity on annual health-care costs?" Explain why this is ill-posed in the potential-outcomes framework, and reformulate it as a well-defined question.
Show solution
Step 1. is ambiguous: losing weight through exercise, diet, medication or surgery would change costs differently.
Step 2. So "the" counterfactual is not unique: SUTVA's "no hidden versions" fails (Day 32).
Step 3. A well-defined version names a manipulable intervention, e.g. "the effect on costs of offering a 12-month subsidised gym membership" or "of a sugar-sweetened-beverage tax".
Answer: causal questions need a specific intervention; the reformulation also matches what a policymaker can actually do.
Exercise 14 · Finite or super population?
An evaluation studies all 120 municipalities of a province, randomising a governance reform. Another samples 2,000 households at random from a country and randomises a cash transfer. Which estimand is natural in each case?
Show solution
Step 1. The 120 municipalities are the population of interest; uncertainty comes only from which ones were assigned the reform: the finite-population ATE is natural.
Step 2. The 2,000 households stand in for millions; uncertainty comes from sampling and assignment: the super-population ATE is natural.
Answer: finite-population for the municipalities, super-population for the households. Day 36 shows the two lead to slightly different variance formulas.
Exercise 15 · Who does a vaccine help?
Six people are classified by their potential infection outcomes: 1 "doomed" (), 2 "helped" (, ), 3 "immune" (). Compute the infection rate with and without the vaccine and the ATE. Could a trial reveal the number helped?
Show solution
Step 1. Without the vaccine, infected = doomed + helped = 3 of 6: .
Step 2. With the vaccine, infected = doomed = 1 of 6: .
Step 3. ATE : the vaccine cuts the infection rate by a third of the population.
Step 4. A trial identifies the two rates, hence the ATE. But a fourth type, "hurt" (, ), would also be possible: 3 helped and 1 hurt give the same rates as 2 helped and 0 hurt.
Answer: ATE = −1/3. The share helped equals −ATE only if nobody is hurt (a monotonicity assumption); the data alone cannot tell.
Verify in Python
import itertools
import numpy as np
y0 = np.array([10, 12, 8, 15.]); y1 = np.array([14, 12, 13, 15.])
print("unit effects:", y1 - y0, " ATE:", (y1 - y0).mean())
ests = []
for treated in itertools.combinations(range(4), 2):
T = np.zeros(4, bool); T[list(treated)] = True
Y = np.where(T, y1, y0) # observed outcomes
ests.append(Y[T].mean() - Y[~T].mean())
print("treated", [("ABCD")[i] for i in treated], "estimate", ests[-1])
print("average over all assignments:", np.mean(ests), "(= ATE)")
print("variance across assignments:", round(np.var(ests), 4))
# Self-selection (Exercise 12)
T = (y1 - y0) > 0; Y = np.where(T, y1, y0)
print("self-selected comparison:", Y[T].mean() - Y[~T].mean(), " ATT:", (y1 - y0)[T].mean())
Key takeaways
- A causal effect compares two potential outcomes of the same unit; only one is ever observed.
- The assignment mechanism decides whether observed comparisons recover causal effects.
- Complete randomisation makes the difference in means unbiased for the ATE, averaging over all possible assignments.
Simulation Lab: The Science Table
Open full screen →Twelve workers with both potential outcomes: hide the missing half, randomise, and watch estimates centre on the ATE.
| worker | T | Y(0) | Y(1) | effect | observed Y |
|---|---|---|---|---|---|
| A | 1 | ? | 14 | ? | 14 |
| B | 0 | 13 | ? | ? | 13 |
| C | 1 | ? | 8 | ? | 8 |
| D | 0 | 11 | ? | ? | 11 |
| E | 1 | ? | 9 | ? | 9 |
| F | 0 | 16 | ? | ? | 16 |
| G | 0 | 10 | ? | ? | 10 |
| H | 0 | 8 | ? | ? | 8 |
| I | 1 | ? | 13 | ? | 13 |
| J | 1 | ? | 13 | ? | 13 |
| K | 1 | ? | 11 | ? | 11 |
| L | 0 | 11 | ? | ? | 11 |
Twelve workers' earnings without (Y0) and with (Y1) training, in $1,000. In real data only one column per worker is visible; the other is '?'. Random assignment gives estimates that scatter around the ATE; self-selection (enrol if the gain exceeds 2) does not.