dSeparation Without Tears
Adapted from the original in Judea Pearl's book "Causality" with his permission.
Introduction
dseparation is a criterion for deciding, from a given a causal graph, whether a set X of variables is independent of another set Y, given a third set Z. The idea is to associate "dependence" with "connectedness" (i.e., the existence of a connecting path) and "independence" with "unconnectedness" or "separation". The only twist on this simple idea is to define what we mean by "connecting path", given that we are dealing with a system of directed arrows in which some vertices (those residing in Z) correspond to measured variables, whose values are known precisely. To account for the orientations of the arrows we use the terms "dseparated" and "dconnected" (d connotes "directional").
We start by considering separation between two singleton variables, x and y; the extension to sets of variables is straightforward (i.e., two sets are separated if and only if each element in one set is separated from every element in the other).
1. Unconditional separation
Rule 1: x and y are dconnected if there is an unblocked path between them.
By a "path" we mean any consecutive sequence of edges, disregarding their directionalities. By "unblocked path" we mean a path that can be traced without traversing a pair of arrows that collide "headtohead". In other words, arrows that meet headtohead do not constitute a connection for the purpose of passing information, such a meeting will be called a "collider".
Examples
All graphs on this page are clickable; clicking on a variable shows the effect of conditioning on it.

x and y are dconnected because r
is not a collider. This path represents an indirect causal effect.
x E @0,0 y O @6,6 r 1 @3,3 x r r y

x and y are not dconnected because
r is a collider. No statistical correlation can result
from this path.
x E @0,0 y O @6,6 r 1 @3,3 x r y r

x and y are dconnected because
there is a path between them that does not contain a
collider. This path transmits a correlation that does not
reflect a causal effect (biasing path).
x E @0,0 r 1 @1,1 s 1 @2,2 t 1 @3,3 u 1 @4,4 v 1 @5,5 y O @6,6 s r t s u v t v y r x

x and y are not dconnected because
t is a collider. Again, no statistical correlation can
result from this path.
x E @0,0 r 1 @1,1 s 1 @2,2 t 1 @3,3 u 1 @4,4 v 1 @5,5 y O @6,6 r s s t u v t v y x r
This graph contains one collider, at t. The path xrst is unblocked, hence x and t are dconnected. So is also the path tuvy, hence t and y are dconnected, as well as the pairs u and y, t and v, t and u, x and s etc.... However, x and y are not dconnected; there is no way of tracing a path from x to y without traversing the collider at t. Therefore, we conclude that x and y are dseparated, as well as x and v, s and u, r and u, etc. (The ramification is that the covariance terms corresponding to these pairs of variables will be zero, for every choice of model parameters).
2. Blocking by conditioning
Motivation: When we measure a set Z of variables, and take their values as given, the conditional distribution of the remaining variables changes character; some dependent variables become independent, and some independent variables become dependent. To represent this dynamics in the graph, we need the notion of "conditional dconnectedness" or, more concretely, "dconnectedness, conditioned on a set Z of measurements".
Rule 2: x and y are dconnected, conditioned on a set Z of nodes, if there is a collidertree path between x and y that traverses no member of Z. If no such path exists, we say that x and y are dseparated by Z, We also say then that every path between x and y is "blocked" by Z.
Example
x E @0,0 r A @1,1 s 1 @2,2 t 1 @3,3 u 1 @4,4 v A @5,5 y O @6,6 r s s t u v t v y x r
Let Z be the set {r, v} (marked by circles in the figure). Rule 2 tells us that x and y are dseparated by Z, and so are also x and s, u and y, s and u etc. The path xrs is blocked by Z, and so are also the paths uvy and stu. The only pairs of unmeasured nodes that remain dconnected in this example, conditioned on Z, are s and t and u and t. Note that, although t is not in Z, the path stu is nevertheless blocked by Z, since t is a collider, and is blocked by Rule 1.
Exercise: Is it necessary to condition for r and v in the above example to dseparate x and y? If not, which is the smallest set Z that dseparates x and y in the graph above?
3. Conditioning on colliders
Motivation: When we measure a common effect of two independent causes, the causes becomes dependent, because finding the truth of one makes the other less likely (or "explained away"), and refuting one implies the truth of the other. This phenomenon (known as Berkson paradox, or "explaining away") requires a slightly special treatment when we condition on colliders (representing common effects) or their descendants (representing effects of common effects).
Rule 3: If a collider is a member of the conditioning set Z, or has a descendant in Z, then it no longer blocks any path that traces this collider.
Example
x E @0,0 r A @1,0 w 1 @1,1 s 1 @2,0 t 1 @3,0 p A @3,1 u 1 @4,0 v 1 @5,0 q 1 @5,1 y O @6,0 r s w s t u v t v y x r t p v q
Let Z be the set {r, p} (again, marked with circles). Rule 3 tells us that s and y are dconnected by Z, because the collider at t has a descendant (p) in Z, which unblocks the path stuvy. However, x and u are still dseparated by Z, because although the linkage at t is unblocked, the one at r is blocked by Rule 2 (since r is in Z).
Exercise: Click on r in the above graph to remove the conditioning. This will render x and y dconnected. Then find another node that you can condition on to dseparate x and y again.
This completes the definition of dseparation, and the reader is invited to try it on some more intricate graphs.
Typical application: Suppose we consider the regression of y on p, r and x,
and suppose we wish to predict which coefficient in this regression is zero. From the discussion above we can conclude immediately that c_{3} is zero, because y and x are dseparated given p and r, hence the partial correlation between y and x, conditioned on p and r, must vanish. c_{1} and c_{2}, on the other hand, will in general not be zero, as can be seen from the graph: Z={r, x} does not dseparate y from p, and Z={p, x} does not dseparate y from r.
Remark on correlated errors: Correlated exogenous variables (or error terms) need no special treatment. These are represented by bidirected arcs (doublearrowed) and their arrowheads are treated as any other arrowhead for the purpose of path tracing. For example, if we add to the graph above a bidirected arc between x and t, then y and x will no longer be dseparated (by Z={r, p}), because the path xtuvy is dconnected — the collider at t is unblocked by virtue of having a descendant, p, in Z.