GATE Previous Year Questions: Reasoning Under Uncertainty
Q1. Bayes' Theorem — Factory Defects (GATE DA 2017)
Problem
Three factories produce 30%, 45%, and 25% of total items. Defect rates are 3%, 4%, and 5% respectively. An item is found defective. What is the probability it came from Factory 2?
Solution
P(D) = 0.30(0.03) + 0.45(0.04) + 0.25(0.05) = 0.009 + 0.018 + 0.0125 = 0.0395
P(F2|D) = 0.45 × 0.04 / 0.0395 = 0.018 / 0.0395 = 0.4557 ≈ 45.6%
Q2. Conditional Independence in BN (GATE 2018)
Problem
Given BN: A → C, B → C, C → D, C → E. Which of the following are true?
(a) A ⊥ B
(b) A ⊥ B | C
(c) D ⊥ E | C
(d) A ⊥ E
Solution
(a) A → C ← B. Collider C not observed ⇒ True (A ⊥ B)
(b) With C observed, collider opens ⇒ False (A ¬⊥ B | C)
(c) C → D, C → E is a fork at C. C observed ⇒ True (D ⊥ E | C)
(d) Path A → C → E. C not observed (chain) ⇒ path open ⇒ False (A ¬⊥ E)
Answer: (a) and (c)
Q3. Naive Bayes Classification (GATE DA 2019)
Problem
Using Naive Bayes with two features X1 and X2. P(C=1) = 0.4, P(C=0) = 0.6. P(X1=T|C=1) = 0.8, P(X2=T|C=1) = 0.5, P(X1=T|C=0) = 0.3, P(X2=T|C=0) = 0.7. Classify x = (T, T).
Solution
Score(C=1) = 0.4 × 0.8 × 0.5 = 0.16
Score(C=0) = 0.6 × 0.3 × 0.7 = 0.126
P(C=1|x) = 0.16 / (0.16 + 0.126) = 0.16/0.286 = 0.559
Answer: Classify as C = 1
Q4. Entropy Computation (GATE 2020)
Problem
A random variable X takes values {1, 2, 3, 4} with probabilities {1/2, 1/4, 1/8, 1/8}. Compute H(X).
Solution
H(X) = −(1/2)log2(1/2) − (1/4)log2(1/4) − (1/8)log2(1/8) − (1/8)log2(1/8)
= 1/2(1) + 1/4(2) + 1/8(3) + 1/8(3) = 0.5 + 0.5 + 0.375 + 0.375 = 1.75 bits
Q5. MLE for Bernoulli (GATE DA 2021)
Problem
A coin is flipped 20 times. 14 heads are observed. What is the MLE estimate of P(Heads)?
Solution
p̂MLE = k/n = 14/20 = 0.70
Q6. BN Joint Probability (GATE 2019)
Problem
BN: A → B, A → C. P(A=T) = 0.3. P(B=T|A=T) = 0.9, P(B=T|A=F) = 0.4. P(C=T|A=T) = 0.7, P(C=T|A=F) = 0.2. Compute P(B=T, C=T).
Solution
P(B=T, C=T) = ∑a P(a) P(B=T|a) P(C=T|a)
= P(A=T) P(B=T|A=T) P(C=T|A=T) + P(A=F) P(B=T|A=F) P(C=T|A=F)
= 0.3(0.9)(0.7) + 0.7(0.4)(0.2) = 0.189 + 0.056 = 0.245
Q7. Information Gain (GATE DA 2022)
Problem
Dataset: 8 positive, 4 negative examples. Attribute A splits into A=Yes (5+, 1−) and A=No (3+, 3−). What is the information gain?
Solution
H(S) = −(8/12)log2(8/12) − (4/12)log2(4/12) = −(2/3)log2(2/3) − (1/3)log2(1/3) ≈ 0.918
H(SYes) = −(5/6)log2(5/6) − (1/6)log2(1/6) ≈ 0.650
H(SNo) = −(3/6)log2(3/6) − (3/6)log2(3/6) = 1.0
IG = 0.918 − (6/12)(0.650) − (6/12)(1.0) = 0.918 − 0.325 − 0.500 = 0.093
Q8. D-Separation (GATE 2023)
Problem
BN: X → Y → Z, W → Y. Is X ⊥ W? Is X ⊥ W | Y?
Solution
Path X → Y ← W. Y is a collider.
X ⊥ W: Collider Y is not observed ⇒ path blocked ⇒ Yes, X ⊥ W
X ⊥ W | Y: Collider Y is observed ⇒ path unblocked ⇒ No, X ¬⊥ W | Y
Q9. Markov Blanket (GATE DA 2022)
Problem
BN: A → C, B → C, C → D, C → E, D → F. What is the Markov blanket of C?
Solution
Parents of C: {A, B}
Children of C: {D, E}
Co-parents of children: D has no other parents besides C. E has no other parents besides C.
Markov blanket of C = {A, B, D, E}