Calculation of conditional probability in Probabilistic Graphical Model.

131 Views Asked by At

I'm reading through the Koeller and Friedman PGM book and there's an example PGM in Chapter 3. The student example. On page 54 the authors calculate $P(i^1|g^3) \approx 0.079$. The text states a priori $P(i^1)=0.3$ and the measurement is $g=3$.

The PGM looks like this:

enter image description here

1

There are 1 best solutions below

2
On BEST ANSWER

First of all it should be obvious, that the value of $P(g^3)=1.22$ must be wrong, since it is greater than $1$. We use the law of total probability to obtain

$$P(g^3)=P(g^3|i^0,d^0)\cdot P(i^0)\cdot P(d^0)+P(g^3|i^0,d^1)\cdot P(i^0)\cdot P(d^1)$$

$$+P(g^3|i^1,d^0)\cdot P(i^1)\cdot p(d^0)+P(g^3|i^1,d^0)\cdot P(i^1)\cdot P(d^0)$$

$$=0.3\cdot 0.7\cdot 0.6+0.7\cdot 0.7\cdot 0.4+0.02\cdot 0.3\cdot 0.6+0.2\cdot 0.3\cdot 0.4$$

$P(g^3|i^l,d^k)$ are the values of the coloured column. It is worth to mention, that $P(i^l|d^k)=P(i^l)$.

To calculate $P(i^1, g^3)$ we just look for the summands of $P(g^3)$ which contains the event $i^1$: $$P(i^1, g^3)=0.02\cdot 0.3\cdot 0.6+0.2\cdot 0.3\cdot 0.4$$ Thus in total we have

$P(i^1|g^3)=\frac{0.02\cdot 0.3\cdot 0.6+0.2\cdot 0.3\cdot 0.4}{0.3\cdot 0.7\cdot 0.6+0.7\cdot 0.7\cdot 0.4+0.02\cdot 0.3\cdot 0.6+0.2\cdot 0.3\cdot 0.4}=0.07894...\approx 0.079=7.9\%$