Conditional Independence
When two dependent variables become completely independent once a third confounding variable is observed.
Core Definition & Factorization
Two variables and are conditionally independent given (written ) if and only if:
Equivalently:
Knowing gives zero extra information about when is already observed.
Spurious Association (X <---> Y) Conditioning on Z Breaks the Link!
[ Z ] [ Z ] (Observed)
/ \ / \
▼ ▼ ▼ ▼
[ X ] [ Y ] [ X ] ┴ [ Y ] (X ⊥ Y | Z)
Independence vs Conditional Independence
- Marginal Independence (): . (Does NOT imply conditional independence).
- Conditional Independence (): . (Does NOT imply marginal independence).
Classic Example: Common Cause (Fork)
- : Stork population in a region.
- : Human birth rate.
- : Rural / Urban geographic setting.
and are correlated marginally (). But conditioned on location setting , .
Applications in Machine Learning
- Naive Bayes Classifier: Assumes all features are conditionally independent given class label :
Converts exponential parameter space into linear space!
- Bayesian Networks & Markov Blankets: A node in a Directed Acyclic Graph (DAG) is conditionally independent of all non-descendants given its parents.
- Causal Inference (d-separation): Blocking confounders isolates true causal effects .
Say this out loud
"Conditional independence X ⊥ Y | Z means P(X,Y|Z) = P(X|Z)P(Y|Z). Once Z is known, Y provides zero additional information about X. Spurious correlations between features often disappear when conditioning on a common cause Z. Naive Bayes relies on conditional independence of features given class Y to factorize high-dimensional joint likelihoods into simple 1D probability multiplications."
Follow-ups to expect
- What is the Explaining Away effect (V-structure / Collider)? In a collider DAG , and are marginally independent (), but conditioning on collider makes and dependent ().
- What is a Markov Blanket? The set of nodes consisting of a target node's parents, children, and children's other parents. Conditioned on its Markov Blanket, a node becomes conditionally independent of all other nodes in the network.
Check yourself
What is the formal probability condition for X and Y to be conditionally independent given Z?