Exercises
Exercises
1 Probability
Use the probability table to calculate the following values:
X1 X2 X3 P (X1 , X2 , X3 )
0 0 0 0.05
1 0 0 0.1
0 1 0 0.4
1 1 0 0.1
0 0 1 0.1
1 0 1 0.05
0 1 1 0.2
1 1 1 0.0
1. P (X1 = 1, X2 = 0)
2. P (X3 = 0)
3. P (X2 = 1|X3 = 1)
4. P (X1 = 0|X2 = 1, X3 = 1)
5. P (X1 = 0, X2 = 1|X3 = 1)
1
2 D-Separation
Indicate whether each of the following conditional independence relationships is guaranteed to be true in the
Bayes Net below. If the independence relationship does not hold, identify all active (d-connected) paths in the
graph.
1. U ⊥
⊥X
2. U ⊥
⊥ X|T
3. V ⊥
⊥ W |Y
4. V ⊥
⊥ W |T
5. T ⊥
⊥ Y |V
6. Y ⊥
⊥ Z|W
7. Y ⊥
⊥ Z|T
3 Variable Elimination
Using the same Bayes Net (shown below), we want to compute P (Y | +z). All variables have binary domains.
Assume we run variable elimination to compute the answer to this query, with the following variable elimination
ordering: X, T , U , V , W .
After inserting evidence, we have the following factors to start out with:
2
(a) When eliminating X we generate a new factor f1 as follows, which leaves us with the factors:
X
f1 (+z|T ) = P (x|T )P (+z|x) P (T ), P (U |T ), P (V |T ), P (W |T ), P (Y |V, W ), f1 (+z|T )
x
(b) When eliminating T we generate a new factor f2 as follows, which leaves us with the factors:
(c) When eliminating U we generate a new factor f3 as follows, which leaves us with the factors:
(d) When eliminating V we generate a new factor f4 as follows, which leaves us with the factors:
(e) When eliminating W we generate a new factor f5 as follows, which leaves us with the factors:
(f ) How would you obtain P (Y | +z) from the factors left above:
(g) What is the size of the largest factor that gets generated during the above process?
(m) Does there exist a better elimination ordering (one which generates smaller largest factors)?