0
$\begingroup$

While taking a Bayesian network tutorial on YouTube, I was watching a video explaining the Bayesian Network probability inference. Somehow, at the end of the tutorial, the lecturer did not explain how to get the number, 0.284 in the circle in Black. I'd appreciate if somebody can explain it.

enter image description here

The mentioned YouTube video can be found HERE.

$\endgroup$
2
  • $\begingroup$ Can you provide a link to the video on Youtube? Or is it private? $\endgroup$
    – Maurits M
    Jun 26 '19 at 21:18
  • $\begingroup$ I forgot to add the link. I got the above image from the link below: youtube.com/… $\endgroup$
    – StoryMay
    Jun 27 '19 at 2:57
1
$\begingroup$

Your video shows the answer to the question posed in this video: https://www.youtube.com/watch?v=q5DHnmHtVmc

The question is phrased in a slightly confusing way, but the lecturer asks for the following (using his notation):

$$P(+b | +j, +m) = \frac{P(+b, +j, +m)}{P(+j, +m)}$$

He explains that the numerator of this fraction is equal to

$$\sum_e \sum_a P(+b, +j, +m, e, a).$$

Using the Bayesian network structure, this equals

$$\sum_e \sum_a P(+b)P(e)P(a|+b,e)P(+j|a)P(+m|a).$$

The number he calculates in his video is the term where $e = +e$ and $a = +a$.

To get the 0.284 at the end of the video, you need to compute the other three possibilities (i.e. $e = -e$ and $a = +a$, $e = +e$ and $a = -a$, $e = -e$ and $a = -a$) and add them all together. Then we need to divide by $P(+j, +m)$.

$$P(+b)P(+e)P(+a|+b,+e)P(+j|+a)P(+m|+a)= 0.000001197 \text{(as in the video)}$$

$$P(+b)P(-e)P(+a|+b,-e)P(+j|+a)P(+m|+a) = 0.001*0.998*0.94*0.9*0.7 = 0.0005910156$$

$$P(+b)P(+e)P(-a|+b,+e)P(+j|-a)P(+m|-a) = 0.001*0.002*0.05*0.05*0.01 = 5*10^{-11}$$

$$P(+b)P(-e)P(-a|+b,-e)P(+j|-a)P(+m|-a) = 0.001*0.998*0.06*0.05*0.01 = 0.00000002994$$

Adding these all together we get $P(+b, +j, +m) = 0.00059224259$.

Now we need to calculate $P(+j, +m)$. Unfortunately, this is even more tedious to compute, as we have the following:

$$P(+j, +m) = \sum_b \sum_e \sum_a P(b, e, a, +j, +m) = $$

$$\sum_b \sum_e \sum_a P(b)P(e)P(a|b,e)P(+j|a)P(+m|a)$$

so we need to take the expression $P(b)P(e)P(a|b,e)P(+j|a)P(+m|a)$, enter all possible values of $b, e,$ and $a$ and add all the results together. This is a sum with eight terms. Four of those are the same as the four that we computed before, so now let's compute the other four. These correspond to the cases when $b = -b$.

$$P(-b)P(+e)P(+a|-b,+e)P(+j|+a)P(+m|+a) = 0.999*0.002*0.29*0.9*0.7 = 0.0003650346$$

$$P(-b)P(-e)P(+a|-b,-e)P(+j|+a)P(+m|+a) = 0.999*0.998*0.001*0.9*0.7 = 0.00062811126$$

$$P(-b)P(+e)P(-a|-b,+e)P(+j|-a)P(+m|-a) = 0.999*0.002*0.71*0.05*0.01 = 0.00000070929$$

$$P(-b)P(-e)P(-a|-b,-e)P(+j|-a)P(+m|-a) = 0.999*0.998*0.999*0.05*0.01 = 0.000498002499$$

Now the sum of all eight terms equals $0.002084100239$, and thus we have

$$P(+b | +j, +m) = \frac{P(+b, +j, +m)}{P(+j, +m)} = \frac{0.00059224259}{0.002084100239} = 0.284$$

$\endgroup$
2
  • 1
    $\begingroup$ I just guessed there must be a lot of calculations behind it, by looking at what you have provided me here looks like I wasn't that wrong. A lot of appreciations. I put this question in the video on YouTueb, so that other people with the same curiosity can see this. $\endgroup$
    – StoryMay
    Jun 30 '19 at 7:41
  • $\begingroup$ No worries! Glad I could help. $\endgroup$
    – Maurits M
    Jun 30 '19 at 10:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.