Bayesian Network Problems: Enumeration vs.
Elimination Methods
Problem 1: Weather Prediction with Simple Depen-
dencies
Context
You are modeling the weather to predict whether the grass will be wet (W ) based on
whether it rained (R), a sprinkler was on (S), or it was cloudy (C).
Bayesian Network Structure
C → R, C → S, R → W, S→W
Graphical Representation
C
R S
Variables
• C: Cloudy (True/False)
• R: Rain (True/False)
• S: Sprinkler (True/False)
• W : Grass is Wet (True/False)
1
Conditional Probability Tables (CPTs)
P (C): Probability of Cloudy
C P (C)
True 0.5
False 0.5
P (R | C): Probability of Rain given Cloudy
C R P (R | C)
True True 0.8
True False 0.2
False True 0.2
False False 0.8
P (S | C): Probability of Sprinkler given Cloudy
C S P (S | C)
True True 0.1
True False 0.9
False True 0.5
False False 0.5
P (W | R, S): Probability of Grass Wet given Rain and Sprinkler
R S W P (W | R, S)
True True True 0.99
True True False 0.01
True False True 0.9
True False False 0.1
False True True 0.8
False True False 0.2
False False True 0.0
False False False 1.0
Question
What is P (C = True | W = True)? Use Bayes’ Rule and the given CPTs to solve.
2
Problem 2: Complex Medical Diagnosis
Context
A patient exhibits symptoms (S), and you aim to diagnose whether they have a disease
(D). A blood test (B) and a genetic predisposition (G) influence the diagnosis. Both D
and B affect whether symptoms are present.
Bayesian Network Structure
G → D, D → B, D → S, B→S
Graphical Representation
G D B
Variables
• G: Genetic Predisposition (True/False)
• D: Disease (True/False)
• B: Blood Test Positive (True/False)
• S: Symptoms (True/False)
Conditional Probability Tables (CPTs)
P (G): Probability of Genetic Predisposition
G P (G)
True 0.3
False 0.7
P (D | G): Probability of Disease given Genetic Predisposition
G D P (D | G)
True True 0.9
True False 0.1
False True 0.2
False False 0.8
3
P (B | D): Probability of Blood Test Positive given Disease
D B P (B | D)
True True 0.95
True False 0.05
False True 0.1
False False 0.9
P (S | D, B): Probability of Symptoms given Disease and Blood Test
D B S P (S | D, B)
True True True 0.99
True True False 0.01
True False True 0.8
True False False 0.2
False True True 0.7
False True False 0.3
False False True 0.1
False False False 0.9
Question
What is P (G = True | S = True)? Solve using both Enumeration and Elimination meth-
ods. Observe how Enumeration becomes complex while Elimination remains efficient.
4
Problem 3: Economic Forecasting
Context
An economic model predicts market trends (M ) based on interest rates (I), inflation (F ),
and employment (E). Understanding these relationships helps in forecasting whether the
market will be bearish or bullish.
Bayesian Network Structure
I → F, F → E, F → M, E→M
Graphical Representation
I
E M
Variables
• I: Interest Rates High (True/False)
• F : Inflation High (True/False)
• E: Employment Low (True/False)
• M : Market Bearish (True/False)
Conditional Probability Tables (CPTs)
P (I): Probability of High Interest Rates
I P (I)
True 0.4
False 0.6
P (F | I): Probability of High Inflation given High Interest Rates
I F P (F | I)
True True 0.7
True False 0.3
False True 0.2
False False 0.8
5
P (E | F ): Probability of Low Employment given High Inflation
F E P (E | F )
True True 0.6
True False 0.4
False True 0.2
False False 0.8
P (M | F, E): Probability of Bearish Market given Inflation and Employment
F E M P (M | F, E)
True True True 0.9
True True False 0.1
True False True 0.8
True False False 0.2
False True True 0.7
False True False 0.3
False False True 0.3
False False False 0.7
Question
What is P (I = True | M = True)? Solve using both Enumeration and Elimination
methods. Notice how Enumeration requires considering multiple combinations, increasing
complexity, whereas Elimination simplifies the computation.
6
Summary of Problems
1. Weather Prediction with Simple Dependencies
A straightforward Bayesian network illustrating dependencies between Cloudy,
Rain, Sprinkler, and Grass Wetness. Suitable for demonstrating basic Enumer-
ation and Elimination methods.
2. Complex Medical Diagnosis
A more intricate Bayesian network involving Genetic Predisposition, Disease, Blood
Test, and Symptoms. The network’s complexity makes the Enumeration method
computationally intensive, highlighting the efficiency of the Elimination method.
3. Economic Forecasting
An economic model predicting Market trends based on Interest Rates, Inflation,
and Employment. This network showcases variable dependencies in an economic
context, suitable for comparing both inference methods.