Day 52. The Back-Door Criterion
A graphical test for which covariates to adjust for. A set Z is admissible if it contains no descendant of the treatment and blocks every path that enters the treatment through an arrow pointing into it; then the adjustment formula identifies the causal effect.
- ●Identify back-door paths and test whether a set satisfies the back-door criterion.
- ●Find all minimal admissible adjustment sets in small DAGs.
- ●Compute causal effects with the back-door adjustment formula and its weighting form.
- ●Connect the criterion to Phase 3's unconfoundedness and to regression adjustment.
Theory
Back-door paths
A back-door path from to is a path that starts with an arrow into : . Directed paths carry the effect; back-door paths carry confounding.
The criterion
A set of variables satisfies the back-door criterion relative to if
- no node in is a descendant of , and
- blocks every back-door path from to (in the sense of d-separation).
The back-door adjustment formula
If satisfies the criterion, the causal effect is identified:
Equivalently, in weighting form,
which is IPW (Day 44) with propensity .
Why the two conditions?
- Condition 2 removes all non-causal association.
- Condition 1 keeps the causal paths intact: conditioning on a mediator would block part of the effect; conditioning on a descendant of that is also affected by 's causes could open new paths.
Link to potential outcomes
In SCM terms, satisfying the back-door criterion implies conditional ignorability, (generalising Day 51, Exercise 9). The criterion is a way to check Phase 3's unconfoundedness assumption from a graph, and to choose which variables to include.
Several valid sets
There may be many admissible sets, or none among the observed variables. The parents of always qualify if they are observed. Different admissible sets give the same estimand but different precision (Day 53).
Linear models
If is linear, , then by the adjustment formula : the regression coefficient is the causal effect when is admissible.
Part 1 · Warm-up
Exercises 1–3 and 5 use this DAG: , , , , , .
Exercise 1 · Find the back-door paths
List every back-door path from to and say which are open given no conditioning.
Show solution
Step 1. : fork at : open.
Step 2. : fork at , chain at : open.
Step 3. : chain at , fork at : open.
Step 4. : collider at : blocked.
Answer: four back-door paths, three open.
Exercise 2 · Is enough?
Does satisfy the back-door criterion?
Show solution
Step 1. blocks the first three paths (it is a fork or chain middle on each).
Step 2. But is the collider on the fourth path; conditioning on it opens .
Answer: no. is both a confounder and a collider.
Exercise 3 · All minimal admissible sets
Find every minimal set (no proper subset admissible) among .
Show solution
Step 1. must be included: otherwise stays open.
Step 2. With included, the fourth path is open unless or is also conditioned (each is a fork on it).
Step 3. : blocks paths 1, 2 (at or ), 3 (at ) and 4 (at ). Admissible.
Step 4. : blocks paths 1, 2 and 3 at , path 4 at . Admissible.
Answer: and (and their superset ).
Exercise 4 · A one-variable adjustment
is binary with and satisfies the back-door criterion. , , , . Compute the average causal effect.
Show solution
Step 1. .
Step 2. .
Answer: .
Exercise 5 · Adding
Is admissible? What does adjusting for it estimate?
Show solution
Step 1. is a descendant of , so condition 1 fails.
Step 2. is the middle of the only causal path ; conditioning on it blocks the effect.
Answer: not admissible; the adjusted contrast is 0 in population (no direct effect remains), however large the true effect.
Part 2 · Proofs
Exercise 6 · Deriving the adjustment formula
Assume satisfies the back-door criterion. Prove , using two facts: (a) interventions do not change the distribution of non-descendants of (Day 51), and (b) if blocks all back-door paths, then (proved formally on Day 55).
Show solution
Step 1. Law of total probability in the intervened model: .
Step 2. contains no descendant of (condition 1), so by (a) .
Step 3. By (b), : once blocks the back-door paths, the only remaining association between and is causal, so observing and setting are the same.
Step 4. Substitute.
Exercise 7 · Parents are admissible
Prove that satisfies the back-door criterion (assuming ).
Show solution
Step 1. Condition 1: a parent of cannot be a descendant of (that would create a cycle).
Step 2. Condition 2: every back-door path starts with .
Step 3. At the path continues out of ( points away), so is a chain or fork middle, not a collider.
Step 4. is conditioned, so the path is blocked.
Exercise 8 · The weighting form
Prove .
Show solution
Step 1. .
Step 2. Divide by (positive by overlap): .
Step 3. Sum over .
Exercise 9 · Regression coefficients under linearity
Suppose is admissible and . Prove .
Show solution
Step 1. Take expectations in the adjustment formula: .
Step 2. .
Step 3. The difference between and is .
Exercise 10 · Why descendants are excluded
In the chain with and , there are no back-door paths, so blocks all of them. Show that "adjusting" for gives the wrong answer.
Show solution
Step 1. True effect: , slope .
Step 2. (given , adds nothing: chain).
Step 3. "Adjusted" formula: , which does not depend on : slope 0.
Answer: condition 1 is necessary in general; conditioning on a mediator removes the effect it carries.
Part 3 · Applied
Exercise 11 · Returns to schooling, revisited
In Day 46's DAG (, , , , , , ), which sets identify the effect of schooling on wages ? What if ability is unobserved?
Show solution
Step 1. Back-door paths: and .
Step 2. blocks both (fork or chain middle on each), and is not a descendant of : admissible. So is .
Step 3. blocks the second but not the first path: not admissible. Occupation is a descendant: never include it.
Answer: you must observe ability. Without it no back-door set exists among , and other strategies are needed (instruments, Phase 5; or bounds, Day 79).
Exercise 12 · A training programme with a sign reversal
Half the jobseekers were previously employed (). Caseworkers send 30% of previously employed and 70% of others to training . Employment rates : previously employed 0.60 untrained, 0.70 trained; others 0.20 untrained, 0.35 trained. is the only confounder. Compute the naive and adjusted effects.
Show solution
Step 1. .
Step 2. Naive, trained: .
Step 3. Naive, untrained: .
Step 4. Adjusted: and .
Answer: naive points; adjusted points. Training helps, but caseworkers send those with worse prospects.
Exercise 13 · Breastfeeding and child health
A DAG: mother's education income , breastfeeding , , child health , infections , and clinic visits . Which minimal set identifies the effect of breastfeeding on child health? Which candidate controls must be excluded, and why?
Show solution
Step 1. Back-door paths from : and .
Step 2. blocks both (fork on the first, chain on the second): minimal admissible set. is also admissible; alone leaves open.
Step 3. Exclude infections : a mediator (descendant of ) on the causal path.
Step 4. Exclude clinic visits : a descendant of and a collider (); conditioning opens a non-causal path.
Answer: adjust for income (optionally education); never for infections or clinic visits.
Exercise 14 · Over-controlling a wage regression
In a simulated programme (code below), prior earnings confound training and later earnings ; training raises job tenure , which raises earnings. True total effect of training: 1.0 ($1,000), of which 0.4 runs through tenure. What do regressions of on with controls , and estimate?
Show solution
Step 1. : the back-door path is open: badly biased (the code finds about 4.4).
Step 2. : admissible: about 1.0, the total effect.
Step 3. : tenure is a descendant (mediator): the coefficient drops to about 0.6, the effect not running through tenure.
Answer: only answers "what does training do to earnings?". The "control for everything" regression answers a different question, and only if tenure is itself unconfounded (Day 58).
Exercise 15 · Hospital report cards
A regulator compares 30-day mortality across hospitals. Candidate adjustment variables: patient severity at admission, age, insurance type, length of stay, and severity at discharge. Draw the relevant DAG fragment and choose the adjustment set for "the effect of being treated at hospital ".
Show solution
Step 1. Pre-treatment (non-descendants of hospital choice): admission severity, age, insurance. They affect which hospital patients use and their mortality: back-door paths through them must be blocked.
Step 2. Length of stay and discharge severity are affected by the hospital (descendants), often mediators of quality.
Step 3. Adjusting for discharge severity would credit a hospital for patients it made sicker; length of stay is also affected by deaths themselves.
Answer: adjust for admission severity, age and insurance; exclude length of stay and discharge severity. If unmeasured severity remains, hospital comparisons stay confounded, and a sensitivity analysis (Day 95) is needed.
Verify in Python
import itertools
import numpy as np
import networkx as nx
dsep = getattr(nx, "is_d_separator", None) or nx.d_separated # name changed in networkx 3.3
def backdoor_ok(G, x, y, Z):
"""Back-door criterion: no descendant of x, and Z d-separates x and y once x's outgoing edges are removed."""
if Z & nx.descendants(G, x):
return False
H = G.copy(); H.remove_edges_from(list(G.out_edges(x)))
return dsep(H, {x}, {y}, set(Z))
G = nx.DiGraph([("Z1", "Z3"), ("Z2", "Z3"), ("Z1", "X"), ("Z2", "Y"), ("Z3", "X"), ("Z3", "Y"), ("X", "W"), ("W", "Y")])
cands = ["Z1", "Z2", "Z3", "W"]
valid = [set(c) for k in range(5) for c in itertools.combinations(cands, k) if backdoor_ok(G, "X", "Y", set(c))]
print("admissible sets:", [sorted(v) for v in valid])
# Exercise 12: sign reversal
pT = {1: .3, 0: .7}; pE = {(1, 0): .60, (1, 1): .70, (0, 0): .20, (0, 1): .35} # key (z, t)
naive = {t: sum(.5 * (pT[z] if t else 1 - pT[z]) * pE[z, t] for z in (0, 1)) / .5 for t in (0, 1)}
adj = {t: sum(.5 * pE[z, t] for z in (0, 1)) for t in (0, 1)}
print("naive:", round(naive[1] - naive[0], 4), " adjusted:", round(adj[1] - adj[0], 4))
# Exercise 14: over-control
rng = np.random.default_rng(52); n = 200_000
P = rng.normal(size=n)
T = (P + rng.normal(size=n) > 0).astype(float)
J = 2 * T + rng.normal(size=n)
Y = 0.6 * T + 0.2 * J + 3 * P + rng.normal(size=n) # total effect 0.6 + 0.2*2 = 1.0
for name, cols in [("none", []), ("P", [P]), ("P, J", [P, J])]:
X = np.column_stack([np.ones(n), T] + cols)
print(f"controls {name:5s}: coefficient on T = {np.linalg.lstsq(X, Y, rcond=None)[0][1]:.3f}")
Key takeaways
- Back-door paths start with an arrow into the treatment; they carry confounding.
- A set is admissible if it blocks them all and contains no descendant of the treatment; then .
- A variable can be both a confounder and a collider; the criterion, not intuition, decides what to add.
Simulation Lab: Back-Door Adjustment
Open full screen →Choose an adjustment set by clicking; the exact regression coefficient shows which sets remove confounding.
A linear model with unit-variance disturbances. Click nodes to choose the adjustment set; the regression coefficient on X is computed exactly from the implied covariance matrix (no sampling noise). Z3 is both a confounder and a collider; W is a mediator. Open back-door paths are drawn in orange.