Lecture 2 — Causality and Graphical Models
M2 Data Science — Université d’Évry
| Structure | Marginal | Given \(C\) |
|---|---|---|
| chain \(A \to C \to B\) | \(A \not\perp B\) | \(A \perp B \mid C\) |
| fork \(A \leftarrow C \to B\) | \(A \not\perp B\) | \(A \perp B \mid C\) |
| collider \(A \to C \leftarrow B\) | \(A \perp B\) | \(A \not\perp B \mid C\) |
Chain, factorisation \(p(a)\,p(c \mid a)\,p(b \mid c)\):
\[ p(a, b \mid c) = \frac{p(a)\, p(c \mid a)}{p(c)}\, p(b \mid c) = p(a \mid c)\, p(b \mid c) \]
Fork, factorisation \(p(c)\,p(a \mid c)\,p(b \mid c)\):
\[ p(a, b \mid c) = p(a \mid c)\, p(b \mid c) \]
Factorisation \(p(a)\,p(b)\,p(c \mid a, b)\):
\[ p(a, b) = \textstyle\sum_c p(a)\, p(b)\, p(c \mid a, b) = p(a)\, p(b) \]

Pearl (1988), Probabilistic Reasoning in Intelligent Systems.
Selection = conditioning on a collider → spurious negative correlation.

Selecting stars conditions on the collider and couples the two causes.
\[ p(a, b \mid C = 1) \propto p(a)\, p(b)\, \mathbb{1}\{a + b > 1.5\} \]
A path between two nodes is blocked by a set \(E\) when it contains at least one of the following nodes \(m\).
\[ \begin{aligned} &\text{chain } s \to m \to t \text{ or fork } s \leftarrow m \to t, &&\text{with } m \in E \\ &\text{collider } s \to m \leftarrow t, &&\text{with } (\{m\} \cup de(m)) \cap E = \emptyset \end{aligned} \]
Path not blocked = active: carries dependence.
Two sets \(A\) and \(B\) are d-separated by \(E\) when every path between a node of \(A\) and a node of \(B\) is blocked by \(E\).
\[ A \perp_G B \mid E \iff \forall\, \text{path } a \leadsto b,\ a \in A,\ b \in B: \text{ path blocked by } E \]

| Query | Answer |
|---|---|
| \(A \perp B\) | yes |
| \(A \perp B \mid F\) | no: \(C\) opened via \(F\) |
| \(A \perp E \mid C\) | no: \(A \to C \leftarrow B \to E\) |
| \(A \perp E \mid \{B, C\}\) | yes |
| \(D \perp E \mid \{B, C\}\) | yes |
If \(p\) factorises according to \(G\), every d-separation in \(G\) is a conditional independence of \(p\).
\[ p(x) = \prod_t p(x_t \mid x_{pa(t)}) \;\Longrightarrow\; \big(A \perp_G B \mid E \Rightarrow X_A \perp X_B \mid X_E\big) \]
Each node is independent of its non-descendants given its parents.
\[ X_t \perp X_{nd(t) \setminus pa(t)} \mid X_{pa(t)} \]
Equivalent characterisations (DAG, density \(p\)) factorisation \(\iff\) local Markov \(\iff\) global Markov
Lauritzen (1996), Graphical Models, th. 3.27.
\(G\) is an I-map of \(p\) when every independence read on \(G\) holds in \(p\).
\[ I(G) \subseteq I(p), \qquad I(G) = \{(A, B, E) : A \perp_G B \mid E\} \]
In a DAG, the parents, children and co-parents of a node make it independent of all other nodes: this set is its Markov blanket.
\[ mb(t) = \Big(pa(t) \cup ch(t) \cup \textstyle\bigcup_{c \in ch(t)} pa(c)\Big) \setminus \{t\}, \qquad X_t \perp X_{V \setminus (mb(t) \cup \{t\})} \mid X_{mb(t)} \]
A distribution is faithful to \(G\) when its conditional independences are exactly the d-separations of \(G\).
\[ X_A \perp X_B \mid X_E \iff A \perp_G B \mid E \]
Two DAGs are Markov equivalent when they encode the same d-separations.
\[ G_1 \sim G_2 \iff I(G_1) = I(G_2) \]
Verma–Pearl theorem (1990) Two DAGs are Markov equivalent if and only if they have the same skeleton and the same v-structures.
v-structure: \(a \to c \leftarrow b\) with \(a\) and \(b\) non-adjacent.
CPDAG (completed partially directed acyclic graph), or essential graph: a single graph standing for a whole Markov equivalence class, i.e. all DAGs encoding the same conditional independences.
Beyond the equivalence class Interventions, temporal order, or distributional assumptions (non-Gaussian noise, non-linear mechanisms).
With complete data, the likelihood is a product of one term per node and its parents.
\[ \log p(\mathcal D \mid \theta) = \sum_{t \in V} \underbrace{\sum_{i=1}^{N} \log p\big(x_{it} \mid x_{i, pa(t)}, \theta_t\big)}_{\text{depends on } \theta_t \text{ only}} \]
→ one independent estimation problem per node.
Counts for node \(t\), parent configuration \(c\), state \(k\):
\[ N_{tck} = \sum_{i=1}^{N} \mathbb 1\big(x_{it} = k,\ x_{i, pa(t)} = c\big), \qquad \hat\theta_{tck} = \frac{N_{tck}}{\sum_{k'} N_{tck'}} \]