# How to correctly identify d-separation in directed graphical model (DGM)?

Pardon me for the newbie question, I'm new in Bayesian network.

I'm reading Chapter 10, Directed Graphical Models (Bayes nets), of Kevin Murphy's textbook: Machine Learning, a Probabilistic Perspective.

Some discussion about using Bayes ball algorithm to test if d-separation holds between two nodes X, Y (or two sets of nodes X, Y) is not clear to me.

For example, the first figure below indicates that node X and node Z are not d-separated.

However, the rule corresponding to the boundary case (second figure below) suggests that the path between nodes x and z is blocked.

So, my question is, if X in the first figure is observed, are Y and Z d-separated then (since the case will be reduced to the second figure)?

The answer is NO. If $Y$ is not observed, $X$ and $Z$ are not d-separated. The ball can simply pass through $Y$ and reach to $Z$.

Note that the second figure does not mean that the path between nodes $x$ and $z$ is blocked. It means that if $z$ is an unobserved leaf, the ball cannot pass through $z$, that is the ball cannot bounce back to $x$. It is defined to ensure that if none of the descendants of a v-structure is observed, the ball does not bounce back.

• Thanks for the explanation @hossein! I think what I don't fully understand is, if I focus on Y and Z nodes in the third figure above, I don't see any Bayes ball rules that tell me how to determine d-separation in that situation, although intuition tells me that Y and Z are not d-separated.
– cwl
Commented Apr 2, 2017 at 15:34
• When you have $Y \rightarrow Z$, the nodes $Y$ and $Z$ cannot be d-separated at all. Commented Apr 2, 2017 at 15:54

You can also try the Moralized Ancestral Graph.

Let X, Y, and Z be variables in a graph. We say X is d-separated from Y given Z if X and Y are separated in the moralized ancestral graph. This graph is constructed by first removing the descendants of X, Y, Z. Then we convert the edges to undirected edges and add edges between nodes which have a common child in the original graph, but no edge between them.