causality

Adjustment for direct causes (p.65-76)

** Example **

Soil fumigants XX are used to increase oat crop yields YY by controlling the eel worm population ZZ. Fumigants mays have direct effects on yields (beneficial or adversary).

Our goal is to assess the total effect of fumigants on yields. However, to make it harder for us by creating confounding bias, let's assume that:

  • controlled randomized experiment is infeasible (the farmer insists on choosing which plot should be fumigated)
  • the farmer's choice of treatments depends on last year's eel worm population, denoted Z0Z_0, which is unknown.
  • The growth of the eel worm population depends on the population of birds, which in turn is correlated with last year's population, hence with the treatment itself.

First, we construct a causal diagram:

figure_3_1.png screenshot taken from Causality, p.67

  • Z0Z_0 is last year's eel worm population
  • Z1Z_1 is the population before the treatment
  • Z2Z_2 after the treatment
  • Z3Z_3 at the end of the season
  • dashed arrows connect unmeasured quantities, represented as hollow nodes.
  • solid arrows connect measured quantities

Note that negative causal assumptions are conveyed through the missing links, e.g. no link between XX and Z3Z_3 signifies that fumigants do not affect the growth of the surviving eel worms.

Those are domain specific assumptions and our purpose is not to validate or repudiate them but to determine if they are sufficient to quantity the causal effect from non-experimental data (i.e. estimating the total effect of fumigates on yields).

Our end goal is to show that the total effect of XX on YY is:

P(y∣do(X=x))=∑z1∑z2∑z3P(y∣z2,z3,x)P(z2∣z1,x)∑x′P(z3∣z1,z2,x′)P(z1∣x′)P(y\vert do(X=x))=\sum_{z_1}\sum_{z_2}\sum{z_3}P(y\vert z_2,z_3, x)P(z_2\vert z_1, x)\sum_{x'}P(z_3\vert z_1, z_2, x')P(z_1\vert x')

Instead of probabilistic relationships, we can use functional, deterministic relationships:

xi=fi(pai,ϵi)x_i = f_i(pa_i, \epsilon_i) where:

  • fif_i are deterministic functions
  • paipa_i are the parents (causes) of variable xix_i
  • ϵi\epsilon_i are mutually independent, random disturbances

The disturbances ϵi\epsilon_i represent background factors that the investigator chose not to include. If any of them influences two or more variables - thus violating the independence assumption - that factor must enter the analysis as an unmeasured (latent) variable; e.g. Z0Z_0 or BB in our example.

The functions fif_i and distributions of ϵi\epsilon_i will remain unspecified throughout.

Functional representations actually yield the same recursive decomposition of the joint distribution, characteristic of Bayesian networks:

P(x1,…,xn)=∏iP(xi∣pai)P(x_1, \dots, x_n) = \prod_i P(x_i \vert pa_i)

In our example:

P(z0,x,z1,b,z2,z3,y)=P(z0)P(x∣z0)P(z1∣z0)P(b∣z0)P(z2∣x,z1)P(z3∣z2,b)P(y∣x,z2,z3)P(z_0,x,z_1,b,z_2,z_3,y)=P(z_0)P(x\vert z_0)P(z_1\vert z_0)P(b\vert z_0)P(z_2\vert x,z_1)P(z_3\vert z_2,b)P(y\vert x,z_2,z_3)

External intervention

This is the action of setting a variable XiX_i to some fixed value xix_i and is denoted do(Xi=xi)\text{do}(X_i=x_i).

This amounts to removing the equation xi=fi(pai,ϵ)x_i=f_i(pa_i, \epsilon) (thus removing the arrows entering XiX_i on the graph) and substituting Xi=xiX_i=x_i in the remaining equations.

We can then compute the new probability function under the intervention. The causal effect of XiX_i on XjX_j is given by P(xj∣do(Xi=xi))P(x_j\vert\text{do}(X_i=x_i)) (sometimes noted P(xj∣x^i)P(x_j\vert \hat{x}_i) in the book).

Alternatively, we acan represent an intervention as an additional variable FiF_i in the graph, that takes values fif_i (the deterministic functional) or do(Xi=xi)\text{do}(X_i=x_i) (the intervention).

Back to our example. The intervention do(Xi=xi)\text{do}(X_i=x_i) yields the new distribution:

P(z0,z1,b,z2,z3,y∣do(Xi=xi))=P(z0)P(z1∣z0)P(b∣z0)P(z2∣x′,z1)P(z3∣z2,b)P(y∣x′,z2,z3)P(z_0, z_1, b, z_2, z_3, y\vert \text{do}(X_i=x_i))=P(z_0)P(z_1\vert z_0)P(b\vert z_0)P(z_2\vert x', z_1)P(z_3\vert z_2, b)P(y\vert x',z_2,z_3)

Theorem 3.2.2: Adjusment for direct causes

Let PAiPA_i the set of direct causes (parents) of variable XiX_i. The effect of intervention of do(Xi=xi)\text{do}(X_i=x_i) on YY (any set of variable disjoint of {Xi∪PAi}\{X_i\cup PA_i\}) is:

P(y∣do(Xi=xi))=∑paiP(y∣x,pai)P(pai)P(y\vert \text{do}(X_i=x_i)) = \sum_{pa_i}P(y\vert x, pa_i)P(pa_i)

We "adjust" for the parents by conditioning on them and weighting by their prior probabilities. This aims at eliminating spurious correlations between cause XX and effect YY (some realisations paipa_i of variables PAiPA_i might be more probable than other).

Note that we can intervene on multiple variables at once (do(S=s)\text{do}(S=s) where SS is some subset of variables).

In summary, given a causal diagram in which all direct causes of intervened variable are observable, we can infer post-intervention distributions from pre-intervention distributions.

In figure 3.1 however, some parents PAiPA_i are unobservable (Z0Z_0 and BB). Next, we will provide graphical tests to determine whether P(Xj∣do(Xi=xi))P(X_j\vert \text{do}(X_i=x_i)) is estimable.

The back-door criterion (p.79)

First, a reminder on what it means for a variable ZZ to block a path from XX to YY.

d-separation or "blocking" (p.16)

A path is a sequence of consecutive edges of any directionality. If a variable (or set of variables) ZZ blocks the path from XX to YY, it means that the flow of information is blocked. If we already know ZZ, learning about XX won't give us anything about YY.

Formally, a path is d-separated or blocked by a set of nodes ZZ if and only if:

  • there is a chain (X→Z→YX \rightarrow Z \rightarrow Y) or fork (X←Z→YX \leftarrow Z \rightarrow Y) and ZZ is in the middle.
  • there is no inverted fork (or collider) (X→Z←YX \rightarrow Z \leftarrow Y) where ZZ is in the middle.

Basically, a path is blocked by ZZ iff X⊥Y∣ZX\perp Y | Z. To understand why a collider breaks this dependency, think about X=it rains,Y=the sprinkler is on,Z=the grass is wetX=\text{it rains}, Y=\text{the sprinkler is on}, Z=\text{the grass is wet}. Knowing that the grass is wet but the sprinkler is off helps us deduct that it's raining.

Controlling confounding bias

The book describes Simpson's paradox: "any statistical relationship between two variables may be reversed by including additional factors in the analysis. For example, we may find that students who smoke obtain higher grades than those who do not smoke but, adjusting for age, smokers obtain lower grades in every age groups and, further adjusting for family income, smokers again obtain higher grades than nonsmokers in every income-age group, and so on."

Leaving us with the question, when is adjustment for a given covariate appropriate?

The back-door criterion tells us whether a subset ZZ of observed variables is sufficient for identifying P(y∣do(X)=x)P(y\vert do(X)=x) where XX and YY are observed.

ZZ satisfies the back-door criterion relative to XX and YY if:

  • it blocks every path between XX and YY containing an arrow into XX.
  • ZZ contains no descendant of XX (because that would mean XX has a causal effect on ZZ)

ZZ is the set of variables that ensure XX and YY are d-separated and that are not affected by XX. We can then change XX without affecting the probability of YY (since they are now independent given ZZ).

The causal effect is now given by:

P(y∣do(X)=x)=∑zP(y∣x,z)P(z)P(y\vert do(X)=x) = \sum_z P(y\vert x, z)P(z)

(we adjust for ZZ).

The front-door criterion (p.81)

The first condition of the back-door criterion states that ZZ should not be impacted by XX. The front-door criterion tells us that concomitants ZZ that are impacted by treatment XX can be used to facilitate causal inference.

Take the following graph:

figure_3_5.png

ZZ does not satisfy the back-door criterion but measurements of ZZ can enable consistent estimation of P(y∣do(X)=x)P(y\vert do(X)=x).

The joint distribution of the graph is given by:

P(x,y,z,u)=P(u)P(x∣u)P(z∣u)P(y∣z,u)P(x,y,z,u)=P(u)P(x\vert u)P(z\vert u)P(y\vert z, u)

The intervention do(X)=xdo(X)=x removes the factor P(x∣u)P(x\vert u) and induces the post-intervention distribution:

P(y,z,u∣do(X)=x)=P(y∣z,u)P(y∣z,u)P(z∣x)P(u)P(y,z,u\vert do(X)=x)=P(y\vert z,u)P(y\vert z,u)P(z\vert x)P(u)

Summing over zz and uu:

P(y∣do(X)=x)=∑zP(z∣x)∑uP(y∣z,u)P(u)P(y\vert do(X)=x) = \sum_{z} P(z\vert x)\sum_{u}P(y\vert z,u)P(u)

uu is unobserved but we can get rid of it using the conditional independence assumptions encoded in the graph: P(u∣z,x)=P(u∣x)P(u\vert z, x)=P(u\vert x) and P(y∣x,z,u)=P(y∣z,u)P(y\vert x,z,u)=P(y\vert z,u)

Thus:

∑uP(y∣z,u)P(u)=∑x∑uP(y∣z,u)P(u∣x)P(x)=∑x∑uP(y∣x,z,u)P(u∣x,z)P(x)=∑xP(y∣x,z)P(x)\begin{aligned}\sum_{u}P(y\vert z,u)P(u) & =\sum_{x}\sum_{u}P(y\vert z, u)P(u\vert x)P(x) \\& = \sum_x \sum_u P(y\vert x,z,u)P(u\vert x,z)P(x) \\& = \sum_x P(y\vert x, z)P(x)\end{aligned}

Finally, we are left with observed quantities only:

P(y∣do(X)=x)=∑zP(z∣x)∑x′∼XP(y∣x′,z)P(x′)P(y\vert do(X)=x)=\sum_z P(z\vert x)\sum_{x' \sim X} P(y\vert x',z)P(x')

This process can be interpreted as a two-step application of the back-door formula:

  • first, find the causal effect of XX on ZZ, simply P(z∣do(X)=x)=P(z∣x)P(z\vert do(X)=x)=P(z\vert x) since there is no back-door.
  • second, compute the causal effect of ZZ on YY, using XX as the concomitant, to block the path Z←X←U→YZ\leftarrow X\leftarrow U \rightarrow Y, giving: P(y∣do(Z)=z)=∑x′P(y∣x′,z)P(x′)P(y\vert do(Z)=z)=\sum_{x'} P(y\vert x', z)P(x')

The two effects are then combined using: P(y∣do(X)=x)=∑zP(y∣do(Z)=z)P(z∣do(X)=x)P(y\vert do(X)=x)=\sum_z P(y\vert do(Z)=z)P(z\vert do(X)=x)

Formally, ZZ satisfies the front-door criterion relative to XX and YY if:

  1. ZZ intercepts all directed paths from XX to YY

  2. there is no back-door path from XX to ZZ

  3. all back-door paths from ZZ to YY are blocked by XX

In this case, and if P(x,z)>0P(x, z)> 0 then the causal effect of XX on YY is given by:

P(y∣do(X)=x)=∑zP(z∣x)∑x′P(y∣x′,z)P(x′)P(y\vert do(X)=x)=\sum_z P(z\vert x)\sum_{x'} P(y\vert x', z)P(x')

Q: why the positive distribution requirement?

Possible answer: "we can't infer the effect of action do(X)=xdo(X)=x from data in which XX never attains the value xx in the context wherein the action is applied" (p.78)

"A more powerful symbolic machinery will be introduced in Section 3.4, one that will sidestep algrebraic manipulations such as those used in the derivation of (3.28)".