how to calculate conditional independence

42 Views Asked by At

This Bayesian net (click) is given with the binary variables B, F, G and D and the following probabilities

$p(B=1) = 0.9$

$p(F=1) = 0.9$

$p(G=1\mid B=1,F=1) =0.8$

$p(G=1\mid B=1,F=0) = 0.2$

$p(G=1\mid B=0,F=1) = 0.2$

$p(G=1\mid B=0,F=0) =0.1$

$p(D=1 \mid G=1)=0.9$

$p(D=0\mid G=0)=0.9$

I want to calculate the probabilities $p(F=0\mid D=0)$ if $D=0$ is observed (that's why the circle of $D$ is filled blue) and $p(F=0\mid D=0,B=0)$ if $B=0$ is observed too.

What I've tried so far:

1) Calculating $p(F=0\mid D=0)$

$p(F=0\mid D=0) = \frac{p(D=0\mid F=0)p(F=0)}{p(D=0)}$

So i have to calculate $p(D=0)$ now:

$$p(D=0) = \sum_{G\in\{0,1\}}(p(D=0\mid G)p(G))$$

And because i don't know $p(G)$ i have to calculate it:

$$p(G)=\sum_{F,B\in\{0,1\}}(p(G\mid F)p(G\mid B)p(F)p(B))$$

So:

$$p(D=0) = \sum_{G\in\{0,1\}}(p(D=0\mid G)\sum_{F,B\in\{0,1\}}(p(G\mid F,B)p(F)p(B))) = 0,352$$

What I do not know is, how to calculate $p(D=0\mid F=0)$?

2) Calculating $p(F=0\mid D=0, B=0)$ should be the same but now $B=0$ is also given.

Edit:

Ok, i have still problems. I can use bayes rule to write $$p(F=0\mid D=0, B=0) = \frac{p(D=0,B=0\mid F=0)p(F=0)}{p(D=0,B=0)}.$$ But how can i calculate $p(D=0,B=0\mid F=0)$?

1

There are 1 best solutions below

1
On BEST ANSWER

You do the same reasoning, but you replace your equation :

$$p(D=0) = \sum_{G\in\{0,1\}}(p(D=0\mid G)\sum_{F,B\in\{0,1\}}(p(G\mid F,B)p(F)p(B))) = 0,352$$

by

$$p(D=0 | F=0) = \sum_{G\in\{0,1\}}(p(D=0\mid G)\sum_{B\in\{0,1\}}(p(G\mid F=0,B)p(B))) $$

Anyway, for this kind of problem, it should be easier to use the Pearl's inference algorithm that uses messages transmitted along the edges of your Bayesian network.