Consider the following belief network:
P(A) | |
---|---|
A=0 | A=1 |
0.4 | 0.6 |
P(B|A) | ||
---|---|---|
A | B=0 | B=1 |
0 | 1.0 | 0.0 |
1 | 0.5 | 0.5 |
P(C|A) | ||
---|---|---|
A | C=0 | C=1 |
0 | 0.2 | 0.8 |
1 | 0.3 | 0.7 |
P(D|B,C) | |||
---|---|---|---|
B | C | D=0 | D=1 |
0 | 0 | 0.0 | 1.0 |
0 | 1 | 1.0 | 0.0 |
1 | 0 | 0.4 | 0.6 |
1 | 1 | 0.6 | 0.4 |
P(A,B,C,D) = P(A) * P(B|A) * P(C|A) * P(D|B,C)
C=0 | C=1 | ||||
---|---|---|---|---|---|
D=0 | D=1 | D=0 | D=1 | ||
A=0 | B=0 | 0 | 0.08 | 0.32 | 0 |
B=1 | 0 | 0 | 0 | 0 | |
A=1 | B=0 | 0 | 0.09 | 0.21 | 0 |
B=1 | 0.036 | 0.054 | 0.126 | 0.084 |
We need to take the joint distribution P(A,B,C,D) and sum over A, B, and C. By grouping all of the terms involving A, we can sum over it first, and then multiply the resulting values by P(D|B,C) and sum over B and C.
SUM[B] SUM[C] P(D|B,C) * (SUM[A] P(A) * P(B|A) & P(C|A))
P(D=0) = 0 + .32 + 0 + 0 + 0 + .21 + .036 + .126 = 0.692
SUM[A] P(A) * P(B|A) * (SUM[C] P(C|A) * P(D|B,C)) ---------------------------------------------------------- SUM[A] P(A) * (SUM[B] P(B|A) * (SUM[C] P(C|A) * P(D|B,C)))
P(B=0|D=0) = P(B=0, D=0) / P(D=0) = 0.53 / 0.692 = .7659