Suppose a child’s blood type is correlated with a grandparent’s. Once the parents’ blood types are known, the grandparent’s blood type provides no further information about the child’s. This is conditional independence: a relationship can disappear when particular other variables are held known. section 2.1.9 section 4.1
Write X ⊥ Y | Z when learning X does not change the distribution of Y after Z is known: P(Y | X, Z) = P(Y | Z). This differs from ordinary independence, X ⊥ Y, which says P(Y | X) = P(Y) without conditioning on Z. The equality applies to values for which the conditional probabilities are defined. It also simplifies expectations: E(Y | X, Z) = E(Y | Z). section 2.1.9 section 2.1.10
Conditional independence makes a joint distribution easier to represent. If Y ⊥ Z | X, the chain-rule factorization P(Z, X, Y) = P(Z)P(X | Z)P(Y | X, Z) reduces to P(Z)P(X | Z)P(Y | X). To simulate it, sample Z, then X given Z, then Y given X. The final sampling step needs no direct input from Z. The same factorization can be implemented with conditional probability tables in pgmpy or sampling statements in Pyro. section 2.1.9 section 2.2.3
A causal directed acyclic graph (DAG) expresses assumptions like these through its arrows. Starting with a chain-rule factorization, condition each variable only on its parents to obtain the graph’s simpler factorization. D-separation is a graphical method for finding implied independence constraints; it is not itself independence in the data-generating distribution. If the graph represents the causal process well, its d-separations imply conditional independences in that distribution. section 3.1.6 section 4.2.3 section 4.4.1
Conditioning can create dependence
Assume sprinkler use and rain are independent causes of wet grass. If the grass is wet, learning that the sprinkler was off makes rain more likely. Thus two independent causes can become dependent when conditioned on their shared effect, or collider. Conditioning is not a universal way to remove associations; which variable is conditioned on matters. section 4.1.1
These constraints offer a way to challenge a proposed DAG. Derive a conditional independence from the graph, then compare it with observed data. Strong evidence of dependence where the DAG implies independence counts against the graph. A statistical test cannot establish that independence is true: sampled data can produce false positives or false negatives, and conventional tests can be sensitive to sample size. Treat off-the-shelf tests as diagnostic evidence rather than proof. section 4.1 section 4.4.1 section 4.4.3
For complex or multidimensional variables, a practical check compares a model predicting Y from Z with one predicting Y from X and Z. If X ⊥ Y | Z, X should add no predictive information beyond Z; similar predictive performance is evidence consistent with the constraint, provided overfitting is controlled. In causal-effect work, a related assumption—ignorability—states that treatment and potential outcomes are conditionally independent given confounders, supporting a backdoor derivation. section 4.4.5 section 10.3.2
Listing 4.1 D-separation analysis of the DAG in figure 4.15
from networkx import is_d_separator #1
from pgmpy.base import DAG #2
dag = DAG([ #2
('I', 'U'), #2
('I', 'M'), #2
('M', 'U'), #2
('J', 'V'), #2
('J', 'M'), #2
('M', 'V') #2
]) #2
print(is_d_separator(dag, {"U"}, {"V"}, {"M"})) #3
print(is_d_separator(dag, {"U"}, {"V"}, {"M", "I", "J"})) #4
print(is_d_separator(dag, {"U"}, {"V"}, {"M", "I"})) #5
print(is_d_separator(dag, {"U"}, {"V"}, {"M", "J"})) #5
The NetworkX and pgmpy listing checks whether chosen variable sets are d-separated in a DAG; its output concerns the graph, not a statistical test of sampled data. section 4.2.3

