SLIDE 10 Exact Inference in Bayesian Networks
Let be the query variable, be the evidence variables, be the observed values for them, be the remaining unobserved (hidden) variables and be The exhaustive set of sequences of distinct variable/value pairs of the unobserved variables .
X E e Y y Y
Note that is the set of all variables in the full joint distribution.
{X} ∪ E ∪ Y
P(X ∣ e) = α * P(X, e) = α * ∑
y
P(X, e, y)
Subset of probabilities from the full joint distribution
We know that the terms in the joint distribution can be written as products of conditional probabilities from the network. So, a query is answered by computing the sums of products of conditional probabilities from the network.
P(X, e, y)
37
37
An Inference Example
Query: P(Burglary ∣ johncalls, marycalls)
P(X ∣ e) = α * P(X, e) = α * ∑
y
P(X, e, y)
X = {Burglary} E = {JohnCalls, MaryCalls} e = {johncalls, marycalls} Y = {Earthquake, Alarm}
P(Burglary ∣ johncalls, marycalls) = αP(Burglary, johncalls, marycalls) = α∑
y
P(Burglary, johncalls, marycalls, y)
= α[P(B, j, m, e, a) + P(B, j, m, e, ¬a) + P(B, j, m, ¬e, a) + P(B, j, m, ¬e, ¬a)]
= α∑
e ∑ a
P(Burglary, johncalls, marycalls, e, a)
38
38
= α∑
e ∑ a
P(Burglary, johncalls, marycalls, e, a)
= α[P(B, j, m, e, a) + P(B, j, m, e, ¬a) + P(B, j, m, ¬e, a) + P(B, j, m, ¬e, ¬a)] P(b, j, m, e, a) = P(e) * P(b) * P(a ∣ e, b) * P(m ∣ a) * P(j ∣ a) P(¬b, j, m, e, a) = P(e) * P(¬b) * P(a ∣ e, ¬b) * P(m ∣ a) * P(j ∣ a)
= 0.002 * 0.001 * 0.95 * 0.70 * 0.90 = 1.197 * 10−6 = 0.002 * 0.999 * 0.29 * 0.70 * 0.90 = 0.0003650346
P(B, j, m, e, a) = ⟨P(b, j, m, e, a), P(¬b, j, m, e, a)⟩ = ⟨1.197 * 10−6,0.0003650346⟩ P(b, j, m, e, ¬a) = P(e) * P(b) * P(¬a ∣ e, b) * P(m ∣ ¬a) * P(j ∣ ¬a) P(¬b, j, m, e, ¬a) = P(e) * P(¬b) * P(¬a ∣ e, ¬b) * P(m ∣ ¬a) * P(j ∣ ¬a)
= 0.002 * 0.001 * 0.71 * 0.01 * 0.05 = 7.1 * 10−10 = 0.002 * 0.001 * 0.05 * 0.01 * 0.05 = 5 * 10−11
P(B, j, m, e, ¬a) = ⟨P(b, j, m, e, ¬a), P(¬b, j, m, e, ¬a)⟩ = ⟨5 * 10−11,7.1 * 10−10⟩
39
39
P(B, j, m, ¬e, a) = ⟨P(b, j, m, ¬e, a), P(¬b, j, m, ¬e, a)⟩ = ⟨0.0005910156,0.00062811126⟩
P(b, j, m, ¬e, a) = P(¬e) * P(b) * P(a ∣ ¬e, b) * P(m ∣ a) * P(j ∣ a) P(¬b, j, m, ¬e, a) = P(¬e) * P(¬b) * P(a ∣ ¬e, ¬b) * P(m ∣ a) * P(j ∣ a)
= 0.998 * 0.001 * 0.94 * 0.70 * 0.90 = 0.0005910156 = 0.998 * 0.999 * 0.001 * 0.70 * 0.90 = 0.0062811126 P(B, j, m, ¬e, ¬a) = ⟨P(b, j, m, ¬e, ¬a), P(¬b, j, m, ¬e, ¬a)⟩ = ⟨2.99 * 10−8,0.00049351599⟩
P(b, j, m, ¬e, ¬a) = P(¬e) * P(b) * P(¬a ∣ ¬e, b) * P(m ∣ ¬a) * P(j ∣ ¬a) P(¬b, j, m, ¬e, ¬a) = P(¬e) * P(¬b) * P(¬a ∣ ¬e, ¬b) * P(m ∣ ¬a) * P(j ∣ ¬a)
= 0.998 * 0.001 * 0.06 * 0.01 * 0.05 = 2.99 * 10−8 = 0.998 * 0.999 * 0.99 * 0.01 * 0.05 = 0.00049351599 α[⟨0.0006032851,0.001486669⟩] = ⟨0.288659,0.711340⟩
α[⟨1.197 * 10−6,0.0003650346⟩ + ⟨5 * 10−11,7.1 * 10−10⟩ + ⟨0.0005910156,0.00062811126⟩ + ⟨2.99 * 10−8,0.00049351599⟩
chance of a burglary. An increase from the prior chance of
28.9 % 0.1 %
40
40