AI Wiki中文/EN

Back-door adjustment: compare like with like

后门调整

Pearl's back-door criterion says which variables to adjust for so that an observed association becomes a causal effect. Learn the two conditions and the adjustment formula, check them on a synthetic graph where some sets work and others fail, and see what not to adjust for.

On this pageIntuitionMathematics & methodImplementationLimitationsExercisesResearch connections

Compare like with like

Back-door adjustment turns an observed difference into a causal effect by comparing treated and untreated units only within groups that are alike. It works only if you have measured the right variables to form those groups. The back-door criterion is a graph test that tells you which variables are the right ones. Back-door criterion

Here is an example. People who take a vitamin may also exercise more, and exercise lowers disease risk on its own. A plain comparison of vitamin users with non-users then mixes the vitamin’s effect with the effect of exercise. If you compare users and non-users separately among people who exercise and among people who do not, and then average the two results, exercise no longer distorts the comparison. That averaging step is the adjustment formula.

A few words first. The treatment XX is the thing whose effect we want, and the outcome YY is what it might change. The causal effect asks what would happen to YY if we set XX by hand. This is written P(y∣do(x))P(y\mid do(x)), where do(x)do(x) means “set XX to xx by intervention”. It differs from P(y∣x)P(y\mid x), which only filters the data to the rows where X=xX=x. The notation is built in structural causal models.

The criterion works on a causal graph: a diagram with one node per variable and an arrow from each direct cause to its effect (see causal graphs). A back-door path is a path between XX and YY that starts with an arrow pointing into XX, such as X←C→YX\leftarrow C\rightarrow Y. Such paths carry association that is not caused by XX. Paths that leave XX along arrows carry its effect. Spurious and causal paths

A set of measured variables ZZ passes the back-door criterion if it meets two conditions. First, nothing in ZZ is caused, directly or indirectly, by XX. Second, ZZ blocks every back-door path. If both hold, averaging the within-group comparisons over the population gives the causal effect. Definition and theorem

The second condition is subtler than it looks. Adjusting for a variable that two other causes point into, called a collider, can open a path instead of closing it. That is why “adjust for everything measured before treatment” is not a safe rule. The rest of the article states the formula, runs a synthetic example in which some sets work and others fail, and lists what not to adjust for. Good and bad controls

The criterion, the formula and why they match

This section states the formula and the criterion, explains why they give the causal effect, and then lists which sets are valid and which are not.

The adjustment formula

Pearl’s Theorem 1 says that if ZZ meets the back-door criterion, the effect of XX on YY is identifiable and given by the formula below. Theorem 1, eq. (6) Eq. (25)

P(y∣do(x))=∑zP(y∣x,z) P(z)P(y\mid do(x))=\sum_{z}P(y\mid x,z)\,P(z)

In words: inside each group zz, look up the outcome rate among units with treatment xx. Then average these rates, weighting each group by how common it is in the whole population.

Identifiable means the left side can be computed from the distribution of the observed variables alone. Pearl requires this for every positive distribution compatible with the graph. In practice it means a large enough sample determines the answer. Definition 4 A group zz is called a stratum, and computing the formula is called stratification or standardisation.

For a binary treatment the average causal effect follows by subtracting two copies of the formula.

E[Y∣do(X=1)]−E[Y∣do(X=0)]=∑z(E[Y∣X=1,z]−E[Y∣X=0,z])P(z)E[Y\mid do(X=1)]-E[Y\mid do(X=0)]=\sum_{z}\big(E[Y\mid X=1,z]-E[Y\mid X=0,z]\big)P(z)

In words: compute the treated-minus-untreated difference inside each stratum, then take the population-weighted average of these differences.

Pearl notes that with a sufficient set, each within-stratum difference is itself a causal effect for that stratum. Their weighted average is the effect for the whole population. Stratum-specific effects

What plain conditioning does instead

Plain conditioning uses the same within-stratum rates but different weights.

P(y∣x)=∑zP(y∣x,z) P(z∣x)P(y\mid x)=\sum_{z}P(y\mid x,z)\,P(z\mid x)

In words: the observed outcome rate among the treated weights each stratum by how common it is among the treated, not in the whole population.

This is where confounding enters. If exercisers are over-represented among vitamin users, the observed rate for users leans toward the exerciser stratum. The adjustment formula replaces each group’s own mix P(z∣x)P(z\mid x) with the common mix P(z)P(z). What confounding is, and why randomisation removes it, is covered in confounding.

The back-door criterion

Pearl defines it for an ordered pair of variables (X,Y)(X,Y) in a directed acyclic graph. A set ZZ satisfies the criterion if (i) no node in ZZ is a descendant of XX, and (ii) ZZ blocks every path between XX and YY that contains an arrow into XX. Definition 3 Definition 3 Definition 1 A descendant of XX is any variable that XX affects through a chain of arrows. The name comes from condition (ii): only paths entering XX through the “back door” must be blocked. Name

“Block” is used exactly as in causal graphs. As a reminder, ZZ blocks a path in two cases. The path passes through a non-collider that is in ZZ. Or it passes through a collider that is not in ZZ and has no descendant in ZZ. A collider on a path is a node where two arrowheads meet, as CC in A→C←BA\rightarrow C\leftarrow B.

Why the formula gives the causal effect

Peters, Janzing and Schölkopf give a short argument. Under the intervention, write the outcome probability as an average over ZZ. The formula holds if two things do not change when XX is set by hand: the distribution of ZZ, and the outcome rate given XX and ZZ. Both invariances can be read off d-separation statements in a graph with an added intervention node. The back-door conditions guarantee them. Eqs. (6.15)–(6.17), Remark 6.40 Condition (i) keeps ZZ unaffected by the intervention. Condition (ii) makes the treated and untreated comparable within each stratum.

A special case needs no search at all. In a Markovian model, where the noise terms of different variables are independent (no hidden common causes), adjusting for the parents of XX (its direct causes) always works. This follows from the truncated factorization, which is the rule for how an intervention changes the joint distribution. Eq. (24) Proposition 6.41 (i) structural causal models derives this sum for a fully observed model. The back-door criterion adds something: it says when the sum is valid even if other variables in the graph are unobserved.

Several sets can work, and some surprising ones fail

More than one set can satisfy the criterion. In Pearl’s Fig. 4, {Z1,Z2,Z3}, {Z1,Z3}, {W1,Z3} and {W2,Z3} are all sufficient. {Z3} alone is not. Conditioning on Z3Z_3, a collider, opens the path X←W1←Z1→Z3←Z2→W2→YX\leftarrow W_1\leftarrow Z_1\rightarrow Z_3\leftarrow Z_2\rightarrow W_2\rightarrow Y. Fig. 4 example Pearl adds two consequences. A variable that belongs to every sufficient set can be unassociated with both XX and YY. And a pre-treatment variable associated with both may have to be left out. Irreducible sets

The back-door criterion is sufficient, not necessary. Peters and colleagues list three kinds of valid adjustment sets. The first is the parents of XX, and the second is any back-door set. The third is a broader class that may include descendants of XX lying off every directed path to YY. They state that this broader class characterises all valid adjustment sets, citing Shpitser and colleagues (2010), which we did not read. Proposition 6.41 Cinelli, Forney and Pearl present the same idea as the adjustment criterion, citing Shpitser and colleagues (2012). Definition 2 Adding to a valid set any variable that is independent of YY given XX and the set keeps it valid. Adding variables Software such as dagitty can list valid sets from a graph. Software

What not to adjust for

Cinelli, Forney and Pearl sort candidate controls into good, bad and neutral cases. Here are the cases this article relies on, as they state them. Models 7–12, 18

  • Mediators. A mediator is a variable on a causal path from XX to YY. Adjusting for it removes part of the effect, which they call overcontrol bias. Adjusting for a descendant of a mediator does so partially. If the goal is the controlled direct effect, adjusting for the mediator can be right, but a mediator–outcome confounder then turns the mediator into a collider. Models 11–12
  • Pre-treatment colliders. A variable measured before treatment can still be a collider between two hidden causes, one of XX and one of YY. Adjusting for it creates bias; this is M-bias, treated in collider bias. Model 7
  • Pure causes of treatment with hidden confounding. If a variable affects only XX and an unobserved confounder UU remains, adjusting for it amplifies the remaining bias. In their linear model the adjusted slope is λxy+λuxλuy/(1−λzx2)\lambda_{xy}+\lambda_{ux}\lambda_{uy}/(1-\lambda_{zx}^2), so the confounding term grows. Model 10, formula
  • Descendants of the outcome. Adjusting for a variable caused by YY biases the estimate; they call this case-control bias. Model 18

Hernán and Robins stress a point about timing. The criterion excludes descendants of the treatment, not variables measured later in time. A variable recorded after treatment but not caused by it can be a valid adjuster. Conversely, a descendant of treatment that blocks every back-door path still does not remove bias, because it also blocks the effect that flows through it. Fine Point 7.4

Pearl’s 1995 paper also qualifies the warning against concomitants affected by treatment. A concomitant is a variable measured alongside the treatment. He shows graphs in which such variables must be measured to learn the total effect. The adjustment is then nonstandard, done in two or more stages, as in the front-door formula (front-door adjustment). §5.2 (vi)

The same assumption in the language of counterfactuals

A second school writes the assumption with counterfactuals. YxY_x is the outcome a unit would have if XX were set to xx. Conditional ignorability, also called conditional exchangeability, says YxY_x is independent of XX given ZZ. It yields the same formula, and Pearl presents the back-door criterion as its graphical counterpart. Eqs. (39)–(40) (The framework itself is potential-outcomes.)

Hernán and Robins make the link precise, with a caveat. Under faithfulness, conditional exchangeability given LL holds if and only if LL satisfies the back-door criterion. Faithfulness means, roughly, that the data show no independence that the graph does not imply, for example through effects that cancel exactly. Without faithfulness only one direction is guaranteed: the criterion implies exchangeability. The converse direction also depends on the counterfactual model they assume throughout the book (Robins’s FFRCISTG model); under another model, the NPSEM-IE, it can fail. §7.2, Technical Point 7.1 In their single-world intervention graphs (SWIGs), YaY^a is d-separated from AA given LL exactly when LL is a non-descendant of AA that blocks all back-door paths. §7.5

From formula to estimate

The formula is nonparametric: it assumes no model for how YY depends on XX and ZZ. With few strata one can plug in the sample proportions. With many, Pearl notes that parametric models may be used to estimate the same right-hand side. Propensity-score methods are efficient ways to estimate it. They cannot reduce bias if the chosen set fails the criterion. §3.3.3 (See propensity-scores and inverse-probability-weighting.) Hernán and Robins group standardisation, inverse-probability weighting and g-estimation as g-methods, which estimate population effects. Stratification and matching estimate conditional associations. §7.6

Linear regression is a special case. If E[Y∣X,Z]E[Y\mid X,Z] is linear, the adjusted contrast equals the coefficient of XX in a regression of YY on XX and ZZ. If it is not linear, that coefficient may summarise something else, and the full formula should be used. Linear vs nonlinear Example 6.42 In the simplest linear graph, Z→XZ\rightarrow X, Z→YZ\rightarrow Y, X→YX\rightarrow Y, with standardized variables, Cinelli, Forney and Pearl give these slopes. Model 1, linear formulas

βyx=λxy+λzxλzy,βyx⋅z=λxy\beta_{yx}=\lambda_{xy}+\lambda_{zx}\lambda_{zy},\qquad \beta_{yx\cdot z}=\lambda_{xy}

In words: the unadjusted slope βyx\beta_{yx} equals the causal coefficient λxy\lambda_{xy} plus the product of the coefficients along the back-door path. The slope adjusted for ZZ, written βyx⋅z\beta_{yx\cdot z}, equals the causal coefficient alone. See linear regression.

Choosing among valid sets

When several sets are valid, they differ in precision, meaning how much the estimate varies from sample to sample. Cinelli, Forney and Pearl give a rule of thumb, citing work by Henckel and colleagues and by Rotnitzky and Smucler that we did not read. Causes of YY that do not spoil identification tend to improve precision. Causes of XX that are not needed tend to hurt it. They call such variables neutral controls: they leave the bias unchanged and are possibly good or possibly bad for precision. Models 8–9, multiple controls Pearl also notes that the criterion lets one search for a set that is cheapest to measure or gives the least sampling variability. Optimal set Search

A synthetic graph where some sets work and others fail

This section checks the criterion and the formula on an original synthetic graph, exactly and then with finite samples. All variables are binary. Nothing here is real data.

The graph has arrows A→XA\rightarrow X, A→CA\rightarrow C, B→CB\rightarrow C, B→YB\rightarrow Y, C→XC\rightarrow X, C→YC\rightarrow Y, Q→XQ\rightarrow X, X→MX\rightarrow M, M→YM\rightarrow Y, X→YX\rightarrow Y, P→YP\rightarrow Y and Y→DY\rightarrow D. CC is both a confounder (it causes XX and YY) and a collider (between AA and BB). MM is a mediator, QQ affects only XX, PP affects only YY, and DD is caused by YY. Each probability is linear in the parents, for example P(M=1∣X)=0.2+0.6XP(M=1\mid X)=0.2+0.6X. The back-door paths include X←C→YX\leftarrow C\rightarrow Y, X←A→C→YX\leftarrow A\rightarrow C\rightarrow Y, X←C←B→YX\leftarrow C\leftarrow B\rightarrow Y and X←A→C←B→YX\leftarrow A\rightarrow C\leftarrow B\rightarrow Y. The shape follows the standard teaching pattern of Pearl’s Fig. 4; the variables, numbers and code are ours. Fig. 4

The program first enumerates all 512 joint states, so the first part has no sampling error. It computes the true effect by replacing XX‘s mechanism, and tests the criterion with its own d-separation routine on the graph with XX‘s outgoing arrows removed. Then it draws 300 data sets of 4000 units each and applies the plug-in formula. It uses numpy and the standard library, with seed 1993.

# Back-door adjustment on a synthetic binary causal graph (original toy model, not real data).
import itertools

import numpy as np

# Graph: A -> X, A -> C, B -> C, B -> Y, C -> X, C -> Y, Q -> X,
#        X -> M, M -> Y, X -> Y, P -> Y, Y -> D
PARENTS = {
    "A": [], "B": [], "Q": [], "P": [],
    "C": ["A", "B"],
    "X": ["A", "C", "Q"],
    "M": ["X"],
    "Y": ["X", "M", "B", "C", "P"],
    "D": ["Y"],
}
ORDER = ["A", "B", "Q", "P", "C", "X", "M", "Y", "D"]


def p_one(v, val):
    # P(v = 1 | parents), linear in the parents
    if v in ("A", "B", "Q", "P"):
        return 0.5
    if v == "C":
        return 0.1 + 0.4 * val["A"] + 0.4 * val["B"]
    if v == "X":
        return 0.1 + 0.3 * val["A"] + 0.3 * val["C"] + 0.25 * val["Q"]
    if v == "M":
        return 0.2 + 0.6 * val["X"]
    if v == "Y":
        return (0.02 + 0.1 * val["X"] + 0.2 * val["M"] + 0.15 * val["B"]
                + 0.1 * val["C"] + 0.4 * val["P"])
    if v == "D":
        return 0.2 + 0.6 * val["Y"]


def joint(do_x=None):
    # exact joint distribution by enumeration; do_x replaces X's mechanism
    table = []
    for bits in itertools.product((0, 1), repeat=len(ORDER)):
        val = dict(zip(ORDER, bits))
        pr = 1.0
        for v in ORDER:
            if v == "X" and do_x is not None:
                pr *= 1.0 if val["X"] == do_x else 0.0
            else:
                q = p_one(v, val)
                pr *= q if val[v] == 1 else 1 - q
        if pr > 0:
            table.append((val, pr))
    return table


def prob(table, cond):
    return sum(p for val, p in table if all(val[k] == x for k, x in cond.items()))


def adjusted_effect(table, Z):
    # sum_z [P(Y=1|X=1,z) - P(Y=1|X=0,z)] P(z)
    total = 0.0
    for zv in itertools.product((0, 1), repeat=len(Z)):
        z = dict(zip(Z, zv))
        pz = prob(table, z)
        diff = 0.0
        for x, sign in ((1, 1), (0, -1)):
            num = prob(table, {**z, "X": x, "Y": 1})
            den = prob(table, {**z, "X": x})
            diff += sign * num / den
        total += diff * pz
    return total


def descendants(v):
    out, stack = set(), [v]
    while stack:
        u = stack.pop()
        for w, ps in PARENTS.items():
            if u in ps and w not in out:
                out.add(w)
                stack.append(w)
    return out


def d_separated(parents, xs, ys, zs):
    # moralize the ancestral graph of xs | ys | zs, delete zs, test connectivity
    anc, stack = set(), list(xs | ys | zs)
    while stack:
        u = stack.pop()
        if u not in anc:
            anc.add(u)
            stack.extend(parents[u])
    nbr = {u: set() for u in anc}
    for u in anc:
        ps = [p for p in parents[u] if p in anc]
        for p in ps:
            nbr[u].add(p)
            nbr[p].add(u)
        for p1, p2 in itertools.combinations(ps, 2):
            nbr[p1].add(p2)
            nbr[p2].add(p1)
    seen, stack = set(), [x for x in xs if x not in zs]
    while stack:
        u = stack.pop()
        if u in seen or u in zs:
            continue
        seen.add(u)
        if u in ys:
            return False
        stack.extend(nbr[u])
    return True


def backdoor_ok(Z):
    if set(Z) & descendants("X"):
        return False
    cut = {v: [p for p in ps if not (p == "X")] for v, ps in PARENTS.items()}
    return d_separated(cut, {"X"}, {"Y"}, set(Z))


obs = joint()
p1 = prob(joint(1), {"Y": 1})
p0 = prob(joint(0), {"Y": 1})
true_ace = p1 - p0
naive = prob(obs, {"X": 1, "Y": 1}) / prob(obs, {"X": 1}) - prob(obs, {"X": 0, "Y": 1}) / prob(obs, {"X": 0})
print("Exact computation on the joint distribution (no sampling)")
print(f"  P(Y=1|do(X=1)) = {p1:.4f}, P(Y=1|do(X=0)) = {p0:.4f}, true effect = {true_ace:+.4f}"
      "  (= 0.1 direct + 0.2 * 0.6 via M)")
print(f"  naive P(Y=1|X=1) - P(Y=1|X=0) = {naive:+.4f}")
print("  set Z            back-door?   adjusted effect   error")
candidates = [[], ["A"], ["B"], ["C"], ["A", "B"], ["A", "C"], ["B", "C"], ["A", "B", "C"],
              ["A", "C", "P"], ["A", "C", "Q"], ["A", "C", "M"], ["B", "C", "D"], ["Q"], ["P"]]
for Z in candidates:
    est = adjusted_effect(obs, Z)
    name = "{" + ",".join(Z) + "}"
    err = round(est - true_ace, 10) + 0.0
    print(f"  {name:16s} {str(backdoor_ok(Z)):12s} {est:+.4f}           {err:+.4f}")
print(f"  parents of X, {{A,C,Q}}: back-door {backdoor_ok(['A', 'C', 'Q'])}")

print("\nFinite samples: 300 data sets of n = 4000, plug-in adjustment formula")
rng = np.random.default_rng(1993)


def sample(n):
    s = {}
    for v in ORDER:
        val = {k: s[k] for k in s}
        q = p_one(v, val) if v not in ("A", "B", "Q", "P") else np.full(n, 0.5)
        s[v] = (rng.random(n) < q).astype(int)
    return s


def plug_in(s, Z):
    if not Z:
        return s["Y"][s["X"] == 1].mean() - s["Y"][s["X"] == 0].mean()
    key = np.zeros(len(s["X"]), dtype=int)
    for v in Z:
        key = key * 2 + s[v]
    total = 0.0
    for k in np.unique(key):
        m = key == k
        y1 = s["Y"][m & (s["X"] == 1)]
        y0 = s["Y"][m & (s["X"] == 0)]
        total += (y1.mean() - y0.mean()) * m.mean()
    return total


sets = [["A", "C"], ["B", "C"], ["A", "C", "P"], ["A", "C", "Q"], ["C"]]
est = {tuple(Z): [] for Z in sets}
for _ in range(300):
    s = sample(4000)
    for Z in sets:
        est[tuple(Z)].append(plug_in(s, Z))
print("  set Z        mean estimate   sd across data sets")
for Z in sets:
    e = np.array(est[tuple(Z)])
    print(f"  {'{' + ','.join(Z) + '}':12s} {e.mean():+.4f}         {e.std(ddof=1):.4f}")

The program prints:

Exact computation on the joint distribution (no sampling)
  P(Y=1|do(X=1)) = 0.6050, P(Y=1|do(X=0)) = 0.3850, true effect = +0.2200  (= 0.1 direct + 0.2 * 0.6 via M)
  naive P(Y=1|X=1) - P(Y=1|X=0) = +0.2802
  set Z            back-door?   adjusted effect   error
  {}               False        +0.2802           +0.0602
  {A}              False        +0.2728           +0.0528
  {B}              False        +0.2578           +0.0378
  {C}              False        +0.2112           -0.0088
  {A,B}            False        +0.2442           +0.0242
  {A,C}            True         +0.2200           +0.0000
  {B,C}            True         +0.2200           +0.0000
  {A,B,C}          True         +0.2200           +0.0000
  {A,C,P}          True         +0.2200           +0.0000
  {A,C,Q}          True         +0.2200           +0.0000
  {A,C,M}          False        +0.1000           -0.1200
  {B,C,D}          False        +0.1444           -0.0756
  {Q}              False        +0.2842           +0.0642
  {P}              False        +0.2802           +0.0602
  parents of X, {A,C,Q}: back-door True

Finite samples: 300 data sets of n = 4000, plug-in adjustment formula
  set Z        mean estimate   sd across data sets
  {A,C}        +0.2207         0.0180
  {B,C}        +0.2210         0.0169
  {A,C,P}      +0.2199         0.0168
  {A,C,Q}      +0.2216         0.0216
  {C}          +0.2125         0.0170

The true effect. Setting XX by hand gives P(Y=1∣do(X=1))=0.6050P(Y=1\mid do(X=1))=0.6050 and P(Y=1∣do(X=0))=0.3850P(Y=1\mid do(X=0))=0.3850, an effect of +0.2200+0.2200. This can be checked by hand. The direct arrow adds 0.1. Setting X=1X=1 raises P(M=1)P(M=1) by 0.6, and MM adds 0.2, so the path through MM adds 0.2×0.6=0.120.2\times0.6=0.12. The total is 0.1+0.12=0.220.1+0.12=0.22. The naive difference P(Y=1∣X=1)−P(Y=1∣X=0)P(Y=1\mid X=1)-P(Y=1\mid X=0) is +0.2802+0.2802, too large by 0.0602.

set Zpasses criterion?adjusted effecterrorwhy
{}no+0.2802+0.0602all back-door paths open
{A}no+0.2728+0.0528X←C→YX\leftarrow C\rightarrow Y open
{B}no+0.2578+0.0378X←C→YX\leftarrow C\rightarrow Y open
{C}no+0.2112−0.0088opens X←A→C←B→YX\leftarrow A\rightarrow C\leftarrow B\rightarrow Y
{A,B}no+0.2442+0.0242X←C→YX\leftarrow C\rightarrow Y open
{A,C}yes+0.2200+0.0000
{B,C}yes+0.2200+0.0000
{A,B,C}yes+0.2200+0.0000
{A,C,P}yes+0.2200+0.0000
{A,C,Q}yes+0.2200+0.0000parents of XX
{A,C,M}no+0.1000−0.1200MM is a mediator
{B,C,D}no+0.1444−0.0756DD is caused by YY
{Q}no+0.2842+0.0642all back-door paths open
{P}no+0.2802+0.0602all back-door paths open

Every set the criterion accepts gives exactly 0.2200, and every set it rejects is off. {A,B} contains two genuine pre-treatment causes and still fails, because neither blocks X←C→YX\leftarrow C\rightarrow Y. {A,C,M} returns exactly the direct effect 0.1000: adjusting for the mediator removes the 0.12 that flows through it. {B,C,D} conditions on a descendant of YY and lands at 0.1444. The parents of XX, {A,C,Q}, pass, as the theory says they must.

{C} needs a warning. It closes X←C→YX\leftarrow C\rightarrow Y but opens the collider path X←A→C←B→YX\leftarrow A\rightarrow C\leftarrow B\rightarrow Y. Its error is only −0.0088 because, with these particular numbers, the bias from the opened path nearly cancels what remains. That is a coincidence of the chosen parameters, not a general property. Collider bias is not small in general, and other numbers could make {C} far worse than {}.

Finite samples. With 300 data sets of 4000 units each:

set Zmean estimatesd across data sets
{A,C}+0.22070.0180
{B,C}+0.22100.0169
{A,C,P}+0.21990.0168
{A,C,Q}+0.22160.0216
{C}+0.21250.0170

All valid sets are centred near 0.22. How precise is that statement? The standard error of a mean over 300 data sets is about 0.018/300≈0.0010.018/\sqrt{300}\approx0.001, so differences of about 0.001 between the means are noise. The relative standard error of a sample standard deviation is about 1/2×299≈0.0411/\sqrt{2\times299}\approx0.041, roughly 4%.

Precision differs among valid sets in the direction of the rule of thumb. Adding QQ, a cause of XX only, raises the standard deviation from 0.0180 to 0.0216, about 20%, well beyond the 4% noise. Adding PP, a cause of YY only, lowers it slightly to 0.0168. Using BB (a cause of YY) instead of AA (a cause of XX) gives 0.0169 against 0.0180. These last two differences are modest, near the noise level. {C} varies little (0.0170) but is centred at 0.2125: a small spread does not make a biased estimator right. This is one synthetic demonstration, not a general proof.

What the criterion cannot do

This section lists what back-door adjustment assumes and where it stops.

It needs the graph. The criterion is applied to a causal graph that must include unmeasured common causes. Data alone cannot confirm that the graph is right. Hernán and Robins add that the criterion does not answer how large any remaining confounding is or in which direction it goes. §7.2, §7.4, §7.6 Sensitivity analysis for this case is covered in confounding.

Hidden common causes. Cox and Wermuth, discussing Pearl’s paper, noted that the criterion requires that no unobserved common cause is left unblocked by observed variables. Doubt about such assumptions, they wrote, is what makes epidemiologists cautious in separating risk factors from causal effects. Discussion, pp. 688–689

Positivity. Each stratum zz with P(z)>0P(z)>0 must contain both treated and untreated units. Otherwise P(y∣x,z)P(y\mid x,z) is undefined and the formula cannot be computed. Pearl’s definition of identifiability assumes positive distributions, and Hernán and Robins assume positivity throughout the chapter. Definition 4 Chapter assumptions Positivity is defined in causal inference.

Not the only route. A back-door path that no observed non-descendant of XX can block is necessary for non-identifiability, but not sufficient. The front-door graph is identifiable even though no back-door set exists. §5.3 (i) So “no back-door set” does not mean “no answer”; see front-door adjustment and do-calculus.

Regression is not automatically the formula. A regression coefficient equals the adjusted effect only when E[Y∣X,Z]E[Y\mid X,Z] is linear. Linear vs nonlinear The example uses the stratified formula for this reason, since its mechanisms are binary.

More variables is not safer. Mediators, colliders, descendants of the outcome and pure causes of treatment can all add bias or variance, as the table shows. Which variables you adjust for matters, not how many.

The example is a toy. The graph, numbers and data are synthetic, and the analysis knows the true graph. The results say nothing about any real study.

Exercises

These exercises cover the two conditions, a hand calculation, a common counterexample, a judgment about timing, and a choice of variables.

  1. State the two conditions of the back-door criterion. For each, give a set from the example that violates it and its adjusted effect.

    Answer: (i) No member of ZZ is a descendant of XX. MM (a mediator) and DD (caused by YY, hence also a descendant of XX) violate it: {A,C,M} gives 0.1000 and {B,C,D} gives 0.1444 instead of 0.2200. (ii) ZZ blocks every path into XX. {B} leaves X←C→YX\leftarrow C\rightarrow Y open and gives 0.2578. {C} blocks that path but opens X←A→C←B→YX\leftarrow A\rightarrow C\leftarrow B\rightarrow Y, because CC is a collider on it; it needs AA or BB added. Pearl’s Fig. 4 has the same structure with Z1Z_1, Z2Z_2, Z3Z_3.

  2. A binary confounder ZZ has P(Z=1)=0.3P(Z=1)=0.3, P(X=1∣Z=0)=0.2P(X=1\mid Z=0)=0.2 and P(X=1∣Z=1)=0.9P(X=1\mid Z=1)=0.9. The outcome rates P(Y=1∣X,Z)P(Y=1\mid X,Z) are 0.3 for (X=0,Z=0)(X=0,Z=0), 0.5 for (1,0)(1,0), 0.7 for (0,1)(0,1) and 0.8 for (1,1)(1,1). Compute P(Y=1∣do(X=x))P(Y=1\mid do(X=x)) for x=0,1x=0,1, the adjusted effect, and the naive difference.

    Answer: Adjusted: do(X=1)do(X=1) gives 0.7×0.5+0.3×0.8=0.590.7\times0.5+0.3\times0.8=0.59, and do(X=0)do(X=0) gives 0.7×0.3+0.3×0.7=0.420.7\times0.3+0.3\times0.7=0.42, so the effect is 0.17. Naive: P(X=1)=0.14+0.27=0.41P(X=1)=0.14+0.27=0.41, so P(Z=1∣X=1)=0.27/0.41=0.6585P(Z=1\mid X=1)=0.27/0.41=0.6585 and P(Z=1∣X=0)=0.03/0.59=0.0508P(Z=1\mid X=0)=0.03/0.59=0.0508. Then P(Y=1∣X=1)=0.5+0.3×0.6585=0.6976P(Y=1\mid X=1)=0.5+0.3\times0.6585=0.6976 and P(Y=1∣X=0)=0.3+0.4×0.0508=0.3203P(Y=1\mid X=0)=0.3+0.4\times0.0508=0.3203. The naive difference is 0.3772, more than twice the effect. The naive contrast weights strata by P(z∣x)P(z\mid x); the adjusted one by P(z)P(z).

  3. “The more pre-treatment covariates we adjust for, the closer we get to the truth.” Refute this with examples from this article.

    Answer: (a) In the example, {A,B} contains two genuine pre-treatment causes and gives 0.2442, because X←C→YX\leftarrow C\rightarrow Y stays open; {A,C} or {B,C} is exact. Which variables you choose decides validity, not how many. (b) M-bias: adjusting for a pre-treatment collider creates bias (Cinelli, Forney and Pearl, Model 7; see collider bias). (c) Bias amplification: with an unmeasured confounder, adjusting for a pure cause of XX increases the bias in linear models (their Model 10). Pearl also warns that propensity scores do not reduce bias if the set fails the criterion. Even among valid sets, adding QQ only adds variance: the standard deviation rises from 0.0180 to 0.0216.

  4. An analyst adjusts for a variable LL that is recorded after treatment but is not caused by it, such as a genotype measured at follow-up. A reviewer objects: “Never adjust for post-treatment variables.” Who is right?

    Answer: The analyst can be. The criterion forbids descendants of XX, not variables measured later. Hernán and Robins (Fine Point 7.4) say what matters is which variables cause which, not the order of measurement. If LL is not a descendant of XX and blocks the back-door paths, adjusting for it removes bias. The reviewer’s rule is still a sensible default when the graph is uncertain; Hernán and Robins advise avoiding variables that may be affected by treatment or outcome.

  5. In the example’s graph you can afford to measure only two of AA, BB, CC, QQ, PP. Which pair do you choose, and why? What changes if CC cannot be measured?

    Answer: Choose {B,C}. It closes all back-door paths, and BB, a cause of YY, helps precision: standard deviation 0.0169 against 0.0180 for {A,C}, a modest gain. Avoid adding QQ (0.0216 with {A,C,Q}). If CC is unmeasured, X←C→YX\leftarrow C\rightarrow Y cannot be blocked by any observed non-descendant of XX, so no back-door set exists. Other routes may still identify the effect. The front-door formula through MM would need MM to carry the whole effect, which fails here because X→YX\rightarrow Y is a direct arrow (see front-door adjustment and do-calculus). Otherwise report a sensitivity analysis (confounding).

History and further reading

This section traces where the criterion came from and suggests what to read next.

Judea Pearl named the criterion “back-door” in a 1993 paper, which we did not read; his 1995 and 2009 papers cite it. His 1995 paper describes it as a graphical test equivalent to judging conditional ignorability, an assumption described in the theory section together with Hernán and Robins’s caveat. Roadmap, Definition 3 Naming The 1995 Biometrika paper “Causal diagrams for empirical research” stated the criterion as Definition 3 and the formula as Theorem 1. The same paper also presents the front-door criterion. It was published with discussions by several statisticians and a rejoinder by Pearl. Pages 669–675

The characterisation of all valid adjustment sets came later, from Shpitser, VanderWeele and Robins. We know it only as cited by Peters, Janzing and Schölkopf and by Cinelli, Forney and Pearl. Proposition 6.41 Definition 2

For a first read, Pearl’s 2009 overview gives the criterion with a worked graph in a few pages. §3.3 Hernán and Robins’ Chapter 7 explains confounding through back-door paths and links it to exchangeability. Chapter 7 Peters, Janzing and Schölkopf’s Section 6.6 gives the valid-set results with proofs and a kidney-stone example. §6.6 Cinelli, Forney and Pearl’s crash course walks through many small graphs of good and bad controls. Crash course

Make a prediction, then check

A causal graph has A→X, A→C, B→C, B→Y, C→X, C→Y and X→Y. Why is adjusting for C alone not enough?

Choose one answer

Learning objectives

  • State the two conditions of Pearl's back-door criterion and the adjustment formula, decide which sets are valid on a causal graph, and compute by hand the adjusted effect and the naive difference in a binary example.
  • Explain which variables not to adjust for (mediators, colliders and their descendants, descendants of the outcome, pure causes of treatment) and choose among several valid sets by precision.

Prerequisites & connections

Explore related knowledge →

References

  1. Causal diagrams for empirical research (with discussions and rejoinder; technical report R-218-B) — scoped
    Judea Pearl · 1995
  2. Causal inference in statistics: An overview
    Judea Pearl · 2009
  3. Causal Inference: What If (online version of 19 August 2026) — scoped
    Miguel A. Hernán; James M. Robins · 2026
  4. Elements of Causal Inference: Foundations and Learning Algorithms — scoped
    Jonas Peters; Dominik Janzing; Bernhard Schölkopf · 2017
  5. A Crash Course in Good and Bad Controls (technical report R-493, revised March 2022) — scoped
    Carlos Cinelli; Andrew Forney; Judea Pearl · 2022

Version1 · Editorial status: Recorded technical checks completed

View technical check record (AI)

Claude · 2026-12-03 · Independent AI check (Claude subagent, not the author; not a human or expert review). These articles did not get a Gemini style pass; I did the D012 readability pass on the intuition sections myself in both languages. Research was done by a separate research subagent (facts.md) and the prose by a writer subagent. I ran example.py with the pinned interpreter (numpy 1.26.4) and diffed it against example.stdout.txt (identical), confirmed the python block in en.mdx and zh.mdx is byte-identical to example.py, and matched every quoted number (0.6050/0.3850/+0.2200, naive +0.2802, the 14-row set table, the finite-sample means and sds, 0.018/sqrt(300) and 1/sqrt(598)). I re-derived the four display equations, the 0.1 + 0.2 x 0.6 decomposition, exercise 2 (0.59, 0.42, 0.17; 0.6585, 0.0508, 0.6976, 0.3203, 0.3772) and checked that the precision wording fits the stated Monte Carlo error (0.0216 vs 0.0180 is about 20% against about 4% sd noise; 0.0168/0.0169 vs 0.0180 is about 1.5 noise units, called modest). I re-read the sources from the same PDFs the writer used (local copies of the cited URLs): Pearl 1995 R-218-B pp. 671, 674-676, 678, 682-683, Cox & Wermuth pp. 688-689; Pearl 2009 R-350 pp. 114-117; Hernán & Robins What If (19 Aug 2026) §7.2 pp. 93-95 incl. Technical Point 7.1, Fine Point 7.4 p. 103, §7.6 pp. 103-104; Peters et al. ECI Proposition 6.41 and p. 116; Cinelli-Forney-Pearl R-493 pp. 3-13 and the linear appendix (Models 1, 8-12, 18). I checked en/zh parity section by section, citations, MDX safety, inline-code status of unpublished topics, aliases (unique ignoring case, no collision with src/data/aliases.json or other 016 topics) and the lint stock-phrase list. Not checked: Pearl 1993, Shpitser et al. 2010/2012, Henckel et al. 2019 and Rotnitzky & Smucler 2020 (the article credits them only as cited); the site validator and build were not run on the staged files.

  • Example re-run with the pinned interpreter matches example.stdout.txt; code blocks in both languages are byte-identical to example.py; every quoted number matches.
  • The two conditions, Theorem 1 formula, identifiability definition, parent adjustment and the Fig. 4 valid sets and {Z3} counterexample agree with Pearl 1995/2009.
  • Hernán and Robins's 'iff' is stated with faithfulness and, for the converse, their FFRCISTG model; Fine Point 7.4's 'descendant, not time order' is reported accurately.
  • {C}'s −0.0088 is explicitly called a coincidence of the parameters; precision wording fits the Monte Carlo error (0.0216 clearly larger; 0.0168/0.0169 vs 0.0180 modest).
  • en/zh correspond section by section; unpublished topics are inline code; aliases unique and collision-free; no lint stock phrases.

Source locations checked:

  • Causal diagrams for empirical research (with discussions and rejoinder; technical report R-218-B) — scoped · pdftotext of R-218-B (Biometrika 82(4): 669-710 with discussions), journal pages from running heads. For this topic: pp. 669-671 (summary; Cochran fumigant example; roadmap naming the back-door and front-door criteria, back-door 'equivalent to the ignorability condition'); p. 674 (§3.1, Definition 3 back-door criterion, name, Definition 4 identifiability); p. 675 (Fig. 2, Theorem 1, eq. (6), optimal set search); pp. 678-679 (§4.4 Task 2, eq. (17) as a special case of the back-door formula); pp. 682-683 (§5.2 (vi) concomitants affected by treatment; §5.3 (i) unblockable back-door path necessary but not sufficient for non-identifiability); pp. 688-689 (Cox & Wermuth discussion on back-door and front-door assumptions). NOT read: §2, §4.5 onward except as listed, appendix proofs, other discussions except where listed for frontdoor-adjustment, Pearl 1993.
  • Causal inference in statistics: An overview · pdftotext of R-350, journal page numbers. For this topic: pp. 110-113 (Theorem 1 causal Markov condition, Corollary 1 truncated factorization, Eqs 18-22, Eq. 23, Eq. 24 parents of X); p. 114 (§3.3.1, Fig. 4, Definition 3, blocking examples, sufficient sets {Z1,Z2,Z3}, {Z1,Z3}, {W1,Z3}, {W2,Z3}; {Z3} insufficient; intuition; reason for excluding descendants cited to Pearl 2009a pp. 338-41); p. 115 (stratum risk differences, Eq. 25, irreducible sets, Z3 unassociated, search for optimal set); pp. 116-117 (§3.3.2 Eq. 26, Tian-Pearl Theorem 2; §3.3.3 parametric estimation, propensity scores cannot reduce bias if S fails the criterion); pp. 128-130 (§4.2 Eqs 39-40, footnote 20). NOT read for this topic: §§3.4-3.5, 5, 6.
  • Causal Inference: What If (online version of 19 August 2026) — scoped · pdftotext of hernanrobins_WhatIf_19aug26.pdf; printed page = PDF page - 9. For this topic: p. 92 (assumptions of the chapter, incl. positivity); p. 93 (§7.2, criterion definition, equivalence with conditional exchangeability under faithfulness, Pearl 1995/2009 margin); p. 94 (Technical Point 7.1; two settings); p. 95 (magnitude/direction not answered; §7.3 Figs 7.1-7.4); pp. 96-98 (confounder definitions, Fig. 7.5 intractable, Fine Point 7.2); p. 100 (confounder relative, structural approach); p. 102 (SWIG equivalence; §7.6 uncheckable sufficient set); p. 103 (Fine Point 7.4 descendant vs future; g-methods vs stratification); p. 104 (alternative methods; avoid variables affected by treatment or outcome). NOT read for this topic: Chapters 1-6 and 9 onward.
  • Elements of Causal Inference: Foundations and Learning Algorithms — scoped · pdftotext of the MIT Press open-access PDF, printed pages. For this topic: pp. 109-110 (eq. 6.7 autonomy; truncated factorization / G-computation / manipulation theorem eqs 6.8-6.10); pp. 111-112 (Example 6.37 kidney stones: 0.832 vs 0.782, conditional 0.78 vs 0.83); p. 112 (Definition 6.38 valid adjustment set, eq. 6.13); p. 113 (Definition 6.39, larger sets not always better, eq. 6.15); pp. 113-114 (Remark 6.40 intervention node); p. 115 (Fig. 6.5, Proposition 6.41 (i)-(iii)); p. 116 (adding Z' with Z' indep. Y | X, Z; (iii) characterises all valid sets [Shpitser et al. 2010]; Example 6.42 linear Gaussian); p. 117 (Code Snippet 6.43 description; the R code itself was not run or copied); p. 119 (identifiability). NOT read: Shpitser et al., Perković et al.
  • A Crash Course in Good and Bad Controls (technical report R-493, revised March 2022) — scoped · pdftotext of R-493 (March 2022), report page numbers. Read pp. 1-14 in full (introduction; terminology p. 3; guiding principle p. 4; Models 1-3 p. 4; Models 4-7 p. 5; Model 7 variation and Model 8 p. 6; Models 9-10 p. 7; Models 11-12 and CDE variant p. 8; Models 13-15 p. 9; Models 16-18 p. 10; null exception and applied cases p. 11; multiple controls and software p. 12; beyond adjustment and sensitivity p. 13; conclusion p. 14) and appendix pp. 21-28 (potential outcomes p. 21; linear Model 1 p. 22; Eq. 1, Definition 1 back-door, Definition 2 adjustment criterion p. 23; linear vs nonlinear, virtual colliders p. 24; Eq. 2 and Models 1-5 pp. 25-26; Models 6-9 p. 27; Model 10 bias amplification p. 28). NOT read: references in full, the Kaggle R code, Henckel et al. and other cited works, the journal version.

Related topics

No matches. Try a synonym or acronym.

0 results shown

Wrap the whole query in double quotes for a phrase match.