Why Conditioning Can Change Dependence
Conditional independence is not a property that necessarily survives conditioning on an arbitrary variable or event. A shared cause can make two variables associated before conditioning, even when they are independent once that cause is known. Conversely, conditioning on a common effect of two variables can make them associated when they were independent beforehand.
These patterns are useful warnings, not mechanical rules. The actual dependence depends on the joint law and on what is being conditioned on. The calculations below make the distinction precise.
Conditional Independence
In a finite model, this says that within each value of \(Z\) having positive probability, the conditional joint probabilities factor into the corresponding conditional marginal probabilities. Conditional independence does not say that \(X\) and \(Y\) are independent without conditioning. Nor does unconditional independence guarantee independence after conditioning.
A Common Cause Can Create Marginal Dependence
A common-cause pattern has a variable \(Z\) influencing both \(X\) and \(Y\). If \(Z\) is unobserved or ignored, the mixture over its possible values can associate \(X\) and \(Y\). Once \(Z\) is given, that association may disappear.
Worked Example: A Binary Common Cause
Let \(Z\) be a fair binary variable. Given \(Z\), let \(X\) and \(Y\) be independent, with both having conditional success probability \(3/4\) when \(Z=1\), and \(1/4\) when \(Z=0\). Thus, for \(z\in\{0,1\}\), their conditional joint law factors.
First calculate the marginal success probability of either variable:
Conditional independence given \(Z\) gives the joint probability by averaging the conditional products:
If \(X\) and \(Y\) were independent marginally, this probability would be \(1/2\cdot1/2=1/4=4/16\). Since \(5/16\ne4/16\), they are not independent. The same point can be seen by conditioning on \(X=1\): Bayes' formula gives \(\mathbb{P}(Z=1\mid X=1)=3/4\), so $$ \mathbb{P}(Y=1\mid X=1) =\frac34\cdot\frac34+\frac14\cdot\frac14 =\frac58\ne\frac12=\mathbb{P}(Y=1). $$ Thus knowing \(X\) changes the probability of \(Y=1\), although knowing \(Z\) makes \(X\) and \(Y\) conditionally independent.
The example is an instance of a general covariance identity. It separates dependence within groups defined by \(Z\) from dependence due to differences between those groups.
Proof. Write \(m_X=\mathbb{E}[X\mid\sigma(Z)]\) and \(m_Y=\mathbb{E}[Y\mid\sigma(Z)]\). By the definition of conditional covariance and the tower property, $$ \mathbb{E}[\operatorname{Cov}(X,Y\mid Z)] =\mathbb{E}[XY]-\mathbb{E}[m_Xm_Y]. $$ Also, \(\mathbb{E}[m_X]=\mathbb{E}[X]\) and \(\mathbb{E}[m_Y]=\mathbb{E}[Y]\), so $$ \operatorname{Cov}(m_X,m_Y) =\mathbb{E}[m_Xm_Y]-\mathbb{E}[X]\mathbb{E}[Y]. $$ Adding these two equalities yields \(\mathbb{E}[XY]-\mathbb{E}[X]\mathbb{E}[Y]=\operatorname{Cov}(X,Y)\), as required. \(\square\)
If \(X\) and \(Y\) are conditionally independent given \(Z\), then their conditional covariance is zero almost surely, provided they are square-integrable. The theorem then says their marginal covariance is the covariance of their conditional means. In the binary example, those means both increase with \(Z\), so their covariance is positive. Conditional independence therefore does not, by itself, imply marginal independence.
A Collider Can Create Dependence
A collider pattern has two variables feeding into a common effect. Conditioning on that effect can change the relative plausibility of the possible values of its causes. This can associate the causes, despite their being independent before selection.
Worked Example: Conditioning on an “Either Cause” Collider
Let \(X\) and \(Y\) be independent fair binary variables, and define \(C=1\) if \(X=1\) or \(Y=1\). Before conditioning, the four pairs \((0,0),(0,1),(1,0),(1,1)\) each have probability \(1/4\), and \(X\) and \(Y\) are independent.
The event \(C=1\) excludes only \((0,0)\). Given \(C=1\), each of \((0,1),(1,0),(1,1)\) has probability \(1/3\). Therefore $$ \mathbb{P}(X=1\mid C=1)=\frac23,\qquad \mathbb{P}(Y=1\mid C=1)=\frac23,\qquad \mathbb{P}(X=1,Y=1\mid C=1)=\frac13. $$ The product of the conditional marginal probabilities is \(4/9\), not \(1/3\), so \(X\) and \(Y\) are dependent given \(C=1\). In fact, their conditional covariance is \(1/3-4/9=-1/9\). Learning that at least one cause occurred makes the other cause less necessary as an explanation for \(C=1\).
For this particular “either cause” rule, the induced association is negative. That sign is not a universal feature of collider conditioning: it depends on how the common effect is defined.
Proof. Put \(d=\mathbb{P}(C=1)=p+q-pq\), which is positive. Since \(C=1\) whenever \(X=1\), and likewise for \(Y\), independence gives $$ \mathbb{P}(X=1\mid C=1)=\frac{p}{d},\qquad \mathbb{P}(Y=1\mid C=1)=\frac{q}{d},\qquad \mathbb{P}(X=1,Y=1\mid C=1)=\frac{pq}{d}. $$ Subtracting the product of the first two conditional probabilities from the third gives $$ \operatorname{Cov}(X,Y\mid C=1) =\frac{pq}{d}-\frac{pq}{d^2} =\frac{pq(d-1)}{d^2}. $$ Since \(d-1=-(1-p)(1-q)\), this is the claimed expression. All factors \(p,q,1-p,1-q\) are positive, so the covariance is strictly negative. \(\square\)
The Collider Mechanism Does Not Fix the Sign
Worked Example: A Collider That Creates Positive Dependence
Again let \(X\) and \(Y\) be independent fair binary variables. This time define \(C=1\) exactly when \(X=Y\). Before conditioning, the four pairs are equally likely, and the variables are independent. Given \(C=1\), only \((0,0)\) and \((1,1)\) remain; each has conditional probability \(1/2\). Consequently, $$ \mathbb{P}(X=1\mid C=1)=\mathbb{P}(Y=1\mid C=1)=\frac12, \qquad \mathbb{P}(X=1,Y=1\mid C=1)=\frac12. $$ The product of the conditional marginal probabilities is \(1/4\), so the conditional variables are dependent, with covariance \(1/2-1/4=1/4\). The common effect and conditioning have induced positive, rather than negative, dependence.
These examples also show why the word “collider” is a useful description of a structure, not a complete calculation. The effect may encode “at least one,” “both,” “exactly one,” equality, or a noisy combination. Those rules select different subsets or weight different outcomes differently. One must calculate the relevant conditional law before asserting the direction or strength of the association.
Diagnosing Common Claims
Several tempting claims fail because they omit what is being conditioned on and how the variables are generated:
- “Conditional independence implies independence.” The common-cause example disproves this: the conditional law factors at each value of \(Z\), but its mixture does not factor.
- “Independent variables remain independent after conditioning.” The collider examples disprove this: \(X\) and \(Y\) begin independent, but conditioning on their common effect makes them dependent.
- “A collider always induces negative dependence.” The equality example gives positive conditional covariance. The sign depends on the collider mechanism.
- “Conditioning always removes dependence caused by a common cause.” In the common-cause example it does remove the association, but that conclusion follows from the specified conditional factorization; it is not guaranteed for every model in which a variable influences two others.
In practice, specify the joint law or the conditional kernels, identify the event or variable being conditioned on, and compare the conditional joint law with the product of its conditional marginals. A structural story can suggest which calculations to make; it cannot replace them. In particular, do not confuse conditioning on a common cause with conditioning on a common effect. These operations can have opposite consequences.
Check Your Understanding
Use conditional probabilities or the covariance calculations above to answer the following.
- In the binary common-cause example, why are the marginal success probabilities \(1/2\) but the joint success probability \(5/16\)?
- State the two terms in the covariance identity and explain which term remains when \(X\) and \(Y\) are conditionally independent given \(Z\).
- For the “either cause” collider, what are the conditional probabilities of \(X=1\), \(Y=1\), and \((X,Y)=(1,1)\) given \(C=1\)?
- Why does conditioning on \(C=1\) in the equality example induce positive dependence?
- What additional information is needed before claiming that collider conditioning creates negative dependence?