Let VV be a finite set. A directed graph on VV is a pair G=(V,E)G=\left(V,E\right) where E⊆V×VE\subseteq V\times V is a set of ordered pairs. The elements of VV are the vertices or nodes of GG and the elements of EE are its directed edges. The edge (X,Y)∈E\left(X,Y\right)\in E is written X→Y.X\rightarrow Y.

Let G=(V,E)G=\left(V,E\right) be a directed graph and X,Y∈V.X,Y\in V. The vertex XX is a parent of Y,Y, and YY is a child of X,X, if and only if X→Y∈E.X\rightarrow Y\in E. The set of parents of YY is written pa(Y).\mathrm{pa}\left(Y\right).

Let G=(V,E)G=\left(V,E\right) be a directed graph. A path in GG is a sequence of distinct vertices V1,…,VkV_1,\ldots,V_k such that consecutive vertices are joined by an edge in either direction. A directed path from V1V_1 to VkV_k is a path in which every edge points from VjV_j to Vj+1.V_{j+1}. A directed cycle is a directed path from a vertex to itself.

Let G=(V,E)G=\left(V,E\right) be a directed graph and X,Y∈V.X,Y\in V. The vertex XX is an ancestor of Y,Y, and YY is a descendant of X,X, if and only if there is a directed path from XX to Y.Y. The set of descendants of XX is written de(X).\mathrm{de}\left(X\right).

A directed acyclic graph (DAG) is a directed graph with no directed cycles. In a DAG the vertices can be ordered so that every edge points from an earlier vertex to a later one.

Let GG be a DAG and Vj−1→Vj→Vj+1V_{j-1}\rightarrow V_j\rightarrow V_{j+1} or Vj−1←Vj←Vj+1V_{j-1}\leftarrow V_j\leftarrow V_{j+1} be consecutive vertices on a path. The vertex VjV_j is a chain on the path. Let Vj−1←Vj→Vj+1V_{j-1}\leftarrow V_j\rightarrow V_{j+1} be consecutive vertices on a path. The vertex VjV_j is a fork on the path. Let Vj−1→Vj←Vj+1V_{j-1}\rightarrow V_j\leftarrow V_{j+1} be consecutive vertices on a path. The vertex VjV_j is a collider on the path. Every non-endpoint vertex of a path is exactly one of a chain, a fork or a collider on that path.

Let V={V1,…,Vp}V=\left\{V_1,\ldots,V_p\right\} be a set of endogenous variables, U={U1,…,Up}U=\left\{U_1,\ldots,U_p\right\} be a set of exogenous variables with a joint probability distribution PU,\mathbb{P}_U, and for each jj let paj⊆V∖{Vj}\mathrm{pa}_j\subseteq V\setminus\{V_j\} and fjf_j be a function. A structural causal model (SCM) is the collection of structural equations that determine each endogenous variable from its parents and its exogenous variable, together with PU.\mathbb{P}_U.

Vj:=fj(paj,Uj)  ∀ j=1,…,pV_j:=f_j\left(\mathrm{pa}_j,U_j\right)\,\,\forall\,j=1,\ldots,p

The structural equations are assignments rather than algebraic equalities: the left-hand side is determined by the right-hand side and not conversely.

Let M\mathcal{M} be a structural causal model. The causal graph of M\mathcal{M} is the directed graph on VV with an edge from each element of paj\mathrm{pa}_j to Vj.V_j. The model M\mathcal{M} is recursive if and only if its causal graph is a DAG. A recursive structural causal model has the following properties:

  • the exogenous variables determine the endogenous variables uniquely, so PU\mathbb{P}_U induces a joint distribution PV\mathbb{P}_V of the endogenous variables, the observational distribution;
  • if the exogenous variables are mutually independent then the model is Markovian, and otherwise it is semi-Markovian.

Let GG be a DAG on V={V1,…,Vp}V=\left\{V_1,\ldots,V_p\right\} and P\mathbb{P} be a joint distribution of VV with pmf or pdf p.p. The distribution P\mathbb{P} is Markov with respect to GG if and only if it factorises into the conditional distributions of each variable given its parents.

p(v1,…,vp)=∏j=1pp(vj∣paj)p\left(v_1,\ldots,v_p\right)=\prod_{j=1}^p p\left(v_j\mid\mathrm{pa}_j\right)

The observational distribution of a Markovian structural causal model is Markov with respect to its causal graph.

The causal Markov condition is the assumption that every variable is independent of its non-descendants given its parents in the causal graph. The causal Markov condition is equivalent to the Markov factorisation.

Let GG be a DAG, π\pi be a path in GG and Z⊆VZ\subseteq V be a set of vertices. The path π\pi is blocked by ZZ if and only if at least one of the following holds:

  • π\pi contains a chain or a fork whose middle vertex is in Z;Z;
  • π\pi contains a collider such that neither the collider nor any of its descendants is in Z.Z.

A path that is not blocked by ZZ is open given Z.Z.

Let GG be a DAG and X,Y,Z⊆VX,Y,Z\subseteq V be disjoint sets of vertices. The sets XX and YY are d-separated by ZZ in G,G, written X⊥GY∣Z,X\perp_G Y\mid Z, if and only if every path from a vertex in XX to a vertex in YY is blocked by Z.Z.

Let GG be a DAG and P\mathbb{P} be Markov with respect to G.G. The global Markov property states that d-separation implies conditional independence.

X⊥GY∣Z⇒X⊥ ⁣ ⁣ ⁣⊥Y∣ZX\perp_G Y\mid Z\Rightarrow X\perp\!\!\!\perp Y\mid Z

The converse need not hold: a distribution can have conditional independences that are not implied by d-separation. Conditioning on a collider, or on a descendant of a collider, opens a path between its parents and can create dependence between variables that are marginally independent.

Let M\mathcal{M} be a structural causal model, X∈VX\in V and xx be a value of X.X. The intervention do(X=x)\mathrm{do}\left(X=x\right) is the operation that replaces the structural equation of XX by the constant assignment X:=xX:=x and leaves every other structural equation and PU\mathbb{P}_U unchanged. The intervened model is written Mx\mathcal{M}_{x} and its causal graph is GG with every edge into XX removed.

Let M\mathcal{M} be a structural causal model and Y∈V.Y\in V. The interventional distribution of YY under do(X=x),\mathrm{do}\left(X=x\right), written P(Y∣do(X=x))\mathbb{P}\left(Y\mid\mathrm{do}\left(X=x\right)\right) or p(y∣do(x)),p\left(y\mid\mathrm{do}\left(x\right)\right), is the distribution of YY in the intervened model Mx.\mathcal{M}_{x}. Interventional distributions have the following properties:

  • conditioning on X=xX=x selects the units with X=x,X=x, whereas intervening with do(X=x)\mathrm{do}\left(X=x\right) sets X=xX=x for every unit, so p(y∣do(x))≠p(y∣x)p\left(y\mid\mathrm{do}\left(x\right)\right)\neq p\left(y\mid x\right) in general;
  • the interventional distribution is Markov with respect to the intervened graph;
  • the potential outcome Y(x)Y(x) is the value of YY in Mx,\mathcal{M}_x, so P(Y(x)=y)=p(y∣do(x))\mathbb{P}\left(Y(x)=y\right)=p\left(y\mid\mathrm{do}\left(x\right)\right) and E[Y(x)]=E[Y∣do(x)].\mathbb{E}\left[Y(x)\right]=\mathbb{E}\left[Y\mid\mathrm{do}\left(x\right)\right].

Let M\mathcal{M} be a Markovian structural causal model with observational pmf or pdf pp and X=Vk.X=V_k. The truncated factorisation states that the interventional distribution of the remaining variables is the Markov factorisation with the factor of XX removed and XX fixed at x.x.

p(v∖{vk}∣do(x))=∏j≠kp(vj∣paj)∣vk=xp\left(v\setminus\{v_k\}\mid\mathrm{do}\left(x\right)\right)=\prod_{j\neq k}p\left(v_j\mid\mathrm{pa}_j\right)\Big|_{v_k=x}

Let M\mathcal{M} be a structural causal model, X,Y∈VX,Y\in V and x,x′x,x' be values of X.X. The average causal effect of changing XX from x′x' to xx on YY is the difference of the interventional means.

E[Y∣do(X=x)]−E[Y∣do(X=x′)]\mathbb{E}\left[Y\mid\mathrm{do}\left(X=x\right)\right]-\mathbb{E}\left[Y\mid\mathrm{do}\left(X=x'\right)\right]

For a binary treatment AA this is the average treatment effect E[Y(1)]−E[Y(0)].\mathbb{E}\left[Y(1)\right]-\mathbb{E}\left[Y(0)\right].

Let M\mathcal{M} be a structural causal model with exogenous variables U,U, and EE be an observed event. The counterfactual distribution of Y(x)Y(x) given EE is the distribution of YY in Mx\mathcal{M}_x with PU\mathbb{P}_U replaced by the conditional distribution of UU given E.E. The counterfactual distribution is computed in three steps:

  • abduction: update the distribution of UU to its conditional distribution given E;E;
  • action: replace the structural equation of XX by X:=x;X:=x;
  • prediction: compute the distribution of YY in the modified model.

Counterfactual quantities such as P(Y(0)=y∣A=1,Y=y′)\mathbb{P}\left(Y(0)=y\mid A=1,Y=y'\right) depend on the structural equations and not only on the interventional distributions.

Let GG be a causal graph with treatment AA and outcome Y.Y. A confounder of AA and YY is a common cause of AA and Y,Y, that is, an ancestor of both. A mediator of AA and YY is a vertex on a directed path from AA to Y.Y. A collider between AA and YY is a common effect of AA and Y,Y, or of their causes.

Let GG be a causal graph with treatment AA and outcome Y.Y. A backdoor path from AA to YY is a path from AA to YY that starts with an edge into A.A. Backdoor paths carry the association between AA and YY that is not due to the causal effect of AA on Y.Y. Confounding is the presence of an open backdoor path.

Selection is conditioning on a variable, by design or by the way the data are collected. Collider bias is the spurious association between AA and YY created by selection on a collider or on a descendant of a collider between them. Conditioning on a mediator blocks part of the causal effect, and conditioning on a confounder blocks a backdoor path.