Conditional Independence and Bayesian Networks
Representing uncertainty with full joint distributions and why they don't scale, independence and conditional independence, Bayesian networks (DAG + CPTs) and the chain-rule factorisation, parameter counting, the three connection types (chain, fork, collider) and explaining away, d-separation, Markov blankets, and computing joint, marginal and conditional probabilities from a network.
The problem with full joint distributions
A complete probabilistic model of Boolean variables is the full joint distribution — numbers. It answers any query by summing entries (marginalisation), but for 30 variables it needs about numbers: impossible to store, estimate or reason with.
Independence is the key to compactness:
- (marginal independence): .
- (conditional independence): , equivalently .
Conditional independence is far more common in practice: a toothache and a dentist's probe catching are dependent, but independent given whether there is a cavity. Naive Bayes is the simplest structure exploiting it (see naive Bayes).
Bayesian networks
A Bayesian network is a directed acyclic graph (DAG) where
- nodes are random variables;
- an edge means directly influences (often causally);
- each node has a conditional probability table (CPT) .
The network represents the joint distribution as a product of local factors:
Compactness
A Boolean node with Boolean parents needs CPT numbers. With nodes and at most parents each, the network needs numbers instead of .
Building a network: order the variables (causes before effects works best), and for each variable choose as parents a minimal set of predecessors that renders it independent of the other predecessors. A bad ordering (effects first) produces a denser, less intuitive network with more parameters — but it still represents the same distribution.
Independence in the graph
Local Markov property: each node is conditionally independent of its non-descendants given its parents.
The three connection types
| Pattern | Name | Path blocked when the middle node is… | Example |
|---|---|---|---|
| chain (causal) | observed | Burglary → Alarm → JohnCalls | |
| fork (common cause) | observed | JohnCalls ← Alarm → MaryCalls | |
| collider (common effect, v-structure) | unobserved (and no descendant observed) | Burglary → Alarm ← Earthquake |
Explaining away: two independent causes become dependent once their common effect is observed. If the alarm sounds, an earthquake report "explains" it and makes burglary less likely.
d-separation
Sets and are d-separated by evidence if every undirected path between them is blocked; then for every distribution the network represents. A path is blocked if it contains
- a chain or fork whose middle node is in , or
- a collider whose middle node is not in and has no descendant in .
Markov blanket
Parents + children + children's other parents. Given its Markov blanket, a node is independent of everything else in the network.
Reasoning with a network
| Type | Direction | Example |
|---|---|---|
| Causal (predictive) | cause → effect | |
| Diagnostic | effect → cause | |
| Intercausal | between causes of a common effect | (explaining away) |
| Mixed | combinations |
Any query can be answered from the factorisation by summing out the hidden variables — exactly, by enumeration or variable elimination, or approximately by sampling.
Quick revision
Practice questions
GATE-style questions: 3 one-mark and 6 two-mark. Wrong MCQs cost ⅓ of their marks in the real exam; MSQ and NAT have no negative marking. Attempt each before opening the solution.
Alarm network. Burglary and Earthquake are independent causes of Alarm ; JohnCalls and MaryCalls each depend only on . All variables are Boolean. , ; , , , ; , ; , .
The joint probability , expressed in units of , is ______ (round to one decimal).
Alarm network. Burglary and Earthquake are independent causes of Alarm ; JohnCalls and MaryCalls each depend only on . All variables are Boolean. , ; , , , ; , ; , .
The number of independent numbers needed to specify all the CPTs of this network is ______.
In the network (two causes of a common effect), which statement is true?
Which conditional-independence statements are implied by the network structure (for all choices of CPTs)?
One or more options are correct.
Alarm network. Burglary and Earthquake are independent causes of Alarm ; JohnCalls and MaryCalls each depend only on . All variables are Boolean. , ; , , , ; , ; , .
The marginal probability that the alarm sounds, in units of , is ______ (round to two decimals).
The Markov blanket of a node in a Bayesian network consists of its
A Boolean node has three Boolean parents. Its conditional probability table needs how many independent numbers? ______
A network has edges , , , . Given , are and d-separated?
Rain causes wet grass : , , . Given that the grass is wet, is ______ (round to two decimals).