Skip to content
GATEiit

GATE DA · Artificial Intelligence

Reasoning under uncertainty: conditional independence representation

Representing uncertain knowledge with Bayesian networks: conditional independence, the chain-rule factorisation, CPT parameter counts, d-separation and Markov blankets. GATE asks joint probabilities from CPTs, parameter counts and which independencies a graph implies.

Before you start

This topic comes before: Approximate inference through sampling, Exact inference through variable elimination

Concept notes

1. Conditional independence

Random variables X and Y are independent, X⊥Y, if P(X,Y)=P(X) P(Y) for all values. They are conditionally independent given Z, written X⊥Y∣Z, if

P(X,Y∣Z)=P(X∣Z) P(Y∣Z)for all values of X,Y,Z.

An equivalent form, often easier to use: P(X∣Y,Z)=P(X∣Z). Once Z is known, learning Y tells us nothing more about X.

The two notions are independent of each other:

  • Two symptoms of one disease are dependent (both rise together) but independent given the disease.
  • Two independent causes of one effect become dependent once the effect is observed. This is explaining away: if the site is down and we learn the server failed, a power cut becomes less likely.

Why it matters: a full joint distribution over n binary variables needs 2n−1 numbers. Conditional independence lets us factorise the joint into small local tables. In naive Bayes, all features are assumed independent given the class, so P(C,X1,…,Xn)=P(C)∏iP(Xi∣C), which needs only 1+2n numbers for binary variables.

2. Bayesian networks: structure and factorisation

A Bayesian network (belief network) is a DAG whose nodes are random variables, with a conditional probability table (CPT) P(Xi∣Parents(Xi)) at each node. It represents the joint distribution

P(X1,…,Xn)=∏i=1nP(Xi∣Parents(Xi)).

The graph encodes the local Markov property: each node is conditionally independent of its non-descendants given its parents. The factorisation is the chain rule P(X1,…,Xn)=∏iP(Xi∣X1,…,Xi−1) with each condition cut down to the parents.

Parameter count. A node with k values whose parents have k1,…,km values needs (k−1)∏jkj independent numbers. For binary variables this is 2#parents per node. In the network below: P 1, F 1, D 4, C 2, A 2, total 10, against 25−1=31 for the full joint.

To read a joint probability of a full assignment, multiply one entry from each CPT. To answer any other query, sum the joint over the hidden variables (that is inference, the next topic).

The same distribution can be drawn with different DAGs. A good network follows cause → effect order; a bad ordering adds extra edges and parameters but is still correct.

P: power cutF: server fault D: site down C: complaintA: alert P(D | P, F)P(C | D), P(A | D)
A Bayesian network: power cut P and server fault F cause site down D, which causes a complaint C and an alert A

3. d-separation: reading independence from the graph

A path between X and Y is blocked by a set of observed nodes Z if it contains a node W where one of these holds:

Pattern at W Blocked when
Chain →W→ W∈Z
Fork ←W→ W∈Z
Collider →W← neither W nor any descendant of W is in Z

X and Y are d-separated by Z if every path between them is blocked; then X⊥Y∣Z holds in every distribution that factorises over the graph. If some path is active, the graph does not guarantee independence.

In the alarm-style network: P⊥F (the only path has the unobserved collider D). But P⊥̸F∣D and even P⊥̸F∣C, because C is a descendant of the collider. C⊥A∣D (fork at D observed), while C and A are dependent when D is unknown.

Method for exam questions: list every undirected path, classify each interior node as chain, fork or collider, and check the rule. One active path is enough for dependence.

XZY ZXY XYZ chainblocked if Z observed forkblocked if Z observed collideropen if Z observed
The three connection types: a chain and a fork are blocked by observing the middle node; a collider is blocked unless the middle node or a descendant is observed

4. Markov blanket and what the graph does not say

The Markov blanket of a node X is its parents, its children and its children's other parents. Given its Markov blanket, X is conditionally independent of every other node in the network. This is what Gibbs sampling uses: to resample X you need only the CPTs of X and of its children.

P(x∣MB(X))∝P(x∣Parents(X))∏Y∈Children(X)P(y∣Parents(Y))

Two cautions:

  • The absence of an edge is what carries information. A missing edge says some independence holds; a present edge only allows dependence.
  • d-separation is sound: every independence it finds holds in all distributions on the graph. A particular CPT may create extra independencies that the graph does not show.
Structure Parameters (binary, n nodes)
Full joint 2n−1
All independent (no edges) n
Naive Bayes, class plus n−1 features 1+2(n−1)
Each node with at most k parents at most n 2k

Sparse graphs give compact models, and compact models need less data to learn.

Formulas to remember

Conditional independence
X⊥Y∣Z  ⟺  P(X,Y∣Z)=P(X∣Z) P(Y∣Z)
Equivalent form
P(X∣Y,Z)=P(X∣Z)
Bayesian network factorisation
P(X1,…,Xn)=∏iP(Xi∣Pa(Xi))
Parameters of one nodeBinary node with m binary parents: 2m
(k−1)∏j∈Pakj
Full joint tableIndependent numbers for n binary variables
2n−1
Naive Bayes model
P(C,X1,…,Xn)=P(C)∏i=1nP(Xi∣C)

Common mistakes

  • Assuming independence implies conditional independence; observing a common effect makes independent causes dependent.
  • Forgetting that observing a descendant of a collider also opens the path.
  • Counting 2#parents+1 numbers for a binary node; each CPT row has one free number, so it is 2#parents.
  • Leaving out the children's other parents when listing a Markov blanket.
  • Calling two nodes dependent because an edge exists somewhere; check every path and its blocking nodes.
  • Multiplying CPT entries for a partial assignment; a query with hidden variables needs a sum over them.

Worked examples

Try each step yourself, then reveal the working.

Example 1: A joint probability from CPTs

numerical

In the network of the figure, P(P=1)=0.1, P(F=1)=0.2, P(D=1∣P,F)=0.95,0.8,0.7,0.05 for (P,F)=(1,1),(1,0),(0,1),(0,0), P(C=1∣D)=0.6 or 0.1 for D=1 or 0, and P(A=1∣D)=0.9 or 0.02. Find P(P=0,F=1,D=1,C=1,A=0).

  1. Step 1: Write the factorisation.

    Try it on paper first.

Example 2: Counting parameters

numerical

How many independent numbers does the network of the figure need (all variables binary)? Compare with the full joint distribution.

  1. Step 1: Count per node.

    Try it on paper first.

Example 3: Explaining away, in numbers

numerical

With the CPTs of the first example, compute P(P=1∣D=1) and P(P=1∣D=1,F=1).

  1. Step 1: Find $P(D{=}1)$ by summing over P and F.

    Try it on paper first.

Example 4: Reading independencies with d-separation

conceptual

In the DAG A→C←B, C→D, B→E, decide: (i) A⊥E, (ii) A⊥E∣C, (iii) D⊥E∣B.

  1. Step 1: List the paths for (i) and (ii).

    Try it on paper first.

Previous year questions

2 official GATE DA questions on this topic, newest first.

Practise these 2 PYQs →

Topic test

10 questions: up to 2 official PYQs and original practice questions, with GATE marking (MCQ wrong answers lose marks). Score 60% or more to pass. A new set is drawn each time.

Mark as mastered

Loading your progress…

My revision notes

Notes written by the GATEiit team against the official GATE DA syllabus; being checked by a reviewer. Updated 2026-11-21. Spotted a mistake? Use Report an issue on any question, or contact us.