# What are simple examples of Bayesian Networks that don't work as *Causal* Bayesian Networks?

I'm re-reading some of the early chapters of Pearl's seminal Causality and I'm realizing that I can't come up with more than 2 good examples of probability distribution, Bayesian Network pairs that fails as probability distribution, Causal Bayesian Network pairs.

From Pearl, the formal definition of a Causal Bayesian Network is:

A DAG $$G$$ is said to be a causal Bayesian network compatible with [the set of all intervention distributions] $$\mathbf{P}_*$$ if and only if the following three conditions hold for every $$P_x \in \mathbf{P}_*$$:
(i) $$P_x(v)$$ is Markov relative to $$G$$;
(ii) $$P_x(v_i \mid \text{pa}_i) = 1$$ for all $$V_i \in X$$ whenever $$v_i$$ is consistent with $$X = x$$;
(iii) $$P_x(v_i \mid \text{pa}_i) = P(v_i \mid \text{pa}_i)$$ for all $$V_i \notin X$$ whenever $$\text{pa}_i$$ is consistent with $$X = x$$, i.e. each $$P(v_i \mid \text{pa}_i)$$ remains invariant to interventions not involving $$V_i$$.

I've only come up with two potential counter-examples.

The first is the following: say we have $$X$$ which represents "clouds in the sky" and $$Y$$ which represents "it's raining." Now, say we postulate a graph, $$G$$, in which $$Y \rightarrow X$$. In words, "rain causes clouds."

In order to satisfy criterion (iii) in the above definition, $$P_{\text{do}(Y = 1)}(X = 1 \mid Y = 1)$$ must equal $$P(X = 1 \mid Y = 1)$$. However, since rain does not in fact cause clouds, were we truly able to intervene on rain, we'd find that $$P_{\text{do}(Y=1)}(X = 1 \mid Y = 1)$$ would just equal $$P(X=1)$$. Thus, as our intuition would lead us to believe, the graph $$G$$ that represents "rain causes clouds" does not qualify as a Causal Bayesian Network.

My second example, of which I'm less sure, is the following: say we want to know the effect of some treatment ($$X$$), e.g. vitamins vs. no vitamins, on some health marker ($$Y$$). In order to do so, we're going to run a randomized controlled trial, which will give us the intervention distribution for $$\text{do}(X)$$ (for both possible values of $$X$$). Technically, we can deal with this by modeling the treatment assignment as a separate variable from the actual treatment (often done in instrumental variable analyses). However, say we instead model our experiment with a three (rather than 4) variable graph $$X \rightarrow Y \leftarrow U$$ (treatment $$X$$, outcome $$Y$$, unobserved confounding $$U$$) that conflates treatment with treatment assignment. In our intervention distribution generated by the randomized controlled trial, $$P_{do(X = x)}(X=x) < 1$$, violating criterion (ii).

I spent some time trying to generate other examples, in particular ones that violated criterion (i) but struggled to. Can others share more? I'd also love to have my second example (in|)validated!

To start, my two examples above were in fact correct.

To find an example that contradicts condition (i), recall that "Markov relative to" means "all nodes independent of non-descendants given parents" (in the interventional distribution). Thus, any example of a DAG/causal model pair in which this property doesn't hold in the interventional distribution contradicts condition (i).

For example, almost all causal models in which $$X$$ causes $$Z$$ causes $$Y$$ will not induce interventional distributions that satisfy condition (i) with respect to the graph $$X \rightarrow Z \leftarrow Y$$. Condition (i) requires that if we intervene on $$Y$$ (or any node in $$\mathbf{V}$$), $$X \perp Y$$ , however that's very unlikely given that $$X$$ causally influences $$Y$$ through $$Z$$ in the underlying causal model.

While this answers my original question, I think the question reflected an underlying confusion I had about what the above definition was really talking about. What this definition really codifies is the fact that causal DAGs describe structural causal models (i.e. functional relationships between combinations of fixed and random variables) and their arrow direction and structure reflects that.

I'm not sure the following would've helped my past self but I suspect it might have so I'm including it. There's an equivalent definition to the above one, known as global Markov compatibility condition. The global Markov condition states (my own words):

A DAG $$G$$ (with nodes $$\mathbf{V}$$) is a causal DAG globally compatible with a set of interventional joint distributions $$P^*$$ iff the distribution $$P_{\mathbf{x}}(\mathbf{v})$$ resulting from an intervention can be described by the following truncated factorization, $$P_x(\mathbf{v}) = \begin{cases} & \prod_{v_i \in {\mathbf{V \setminus {X}}}} P(v_i \mid pa_i) & \text{if \mathbf{v} not consistent with \mathbf{x} } \\ & 0 & \text{otherwise.} \end{cases}$$

Under this definition, it should be clearer that a causal DAG is valid iff its structure reflects the relationship between variables in the underlying structural model, which only change locally under intervention.

For example, say I try and describe the following structural causal model with a two node graph $$Y \rightarrow X$$. My structural causal model (SCM) has binary-valued unobserved variables $$\mathbf{U}$$ and distribution $$P(\mathbf{U})$$: \begin{aligned} & P(U_X = 1) = 1/2 \\ & P(U_Y = 1) = 3/4. \end{aligned} and two observed variables, $$\mathbf{V} = \{X, Y\}$$ with $$X, Y \in \{0, 1\}$$ and relationship \begin{aligned} & X = U_X \\ & Y = X \oplus U_Y. \end{aligned} This means that, based on the SCM, \begin{aligned} & P(X = 0, Y = 0) = 1/8 & P(X = 0, Y = 1) = 3/8 \\ & P(X = 1, Y = 0) = 3/8 & P(X = 1, Y = 1) = 1/8. \end{aligned}

While $$Y \rightarrow X$$ is a Bayes Net compatible with this observational distribution, it is not globally compatible as I'll show.

In the SCM, intervening on $$X$$ with $$\text{do}(X = 0)$$ will induce the distribution $$P_{X = 0}(X = 0, Y = 1) = P(U_Y = 1) = 3/4$$. However, by the global Markov compatibility condition, $$P_\mathbf{X = 0}(X = 0, Y = 1) = P(Y = 1) = P(X = 0, Y = 1) + P(X = 1, Y = 1) = 1/2.$$ Thus, the graph $$Y \rightarrow X$$ violates the global Markov compatibility condition and is not a causal DAG with respect to $$P_{x}(\mathbf{v})$$.