Bayesian Network calculations given dependence of variables

45 Views Asked by At

I've been given this bayesian network 1 where $P(A) = P(A = t) = 0.2, P(B) = 0.5, P(C) = 0.8.$

$$\require{enclose}\begin{array}{c}\enclose{circle}{~~A~~}&&&&\enclose{circle}{~~B~~}&&&&\enclose{circle}{~~C~~}\\&\searrow&&\swarrow&&\searrow&&\swarrow\\&&\enclose{circle}{~~D~~}&&&&\enclose{circle}{~~E~~}\end{array}\\\boxed{\begin{array}{c|c} A& B & P(D=T\mid A, B)\\\hline F&F&0.9\\\hline F&T&0.6\\\hline T&F & 0.5\\\hline T&T&0.1\end{array}}\hspace{10ex}\boxed{\begin{array}{c|c} B& C & P(E=T\mid B, C)\\\hline F&F&0.2\\\hline F&T&0.4\\\hline T&F & 0.8\\\hline T&T&0.3\end{array}}$$

I wanted to calculate what the probability of A being false was given that all other variables are known to be true. I have come up with 2 different ways and I'm not sure which one is correct, if any of them are in the first place that is.

  1. $\small{P(A=f \mid B=C=D=E=t) }~{= (P(A = f) * P(B=C=D=E=t | A = f)) / P(B=C=D=E=t)\\ = 0.8 * 0.5 * 0.6 * 0.3 * 0.8 / ((0.6 * 0.3) + (0.1 * 0.3))}$

    With this one I'm not sure if I calculated P(B=C=D=E=t) correctly.

  2. $\small {P(A=f | B=C=D=E=t)} ~{= (P(D|A=f,B=t) * P(E|B=t, C=,t)) / P(B=C=D=E=t)\\ = 0.6 * 0.3 / ((0.6 * 0.3) + (0.1 * 0.3))}$

Am I doing this correctly?

1

There are 1 best solutions below

0
On

Am I doing this correctly?

No, but you seem to have a vague idea of what to do.


  To save space, I shall use $A^+$ for $A=t$ and $A^-$ for $A=f$, et cetera.


Bayes' Rule is not quite the right tool to use here, despite this exercise is about Bayesian Network Diagrams.

  Rather, you should use the definition of conditional probability, and the Law of Total Probability, to state:

$$\def\P{\operatorname{\mathsf P}}\begin{align}\P(A^-\mid B^+, C^+, D^+, E^+)&=\dfrac{\P(A^-, B^+, C^+, D^+, E^+)}{\P(B^+, C^+, D^+, E^+)}\\[1ex]&=\dfrac{\P(A^-, B^+, C^+, D^+, E^+)}{\P(A^-, B^+, C^+, D^+, E^+)+\P(A^+, B^+, C^+, D^+, E^+)}\end{align}$$

What do you do with those?   Okay, now we refer to the diagram.

  Well, the Directed Acyclic Graph (DAG) says that we have the factorisation: $$\begin{align}\P(A^-,B^+,C^+,D^+,E^+)&=\P(A^-)\P(B^+)\P(C^+)\P(D^+\mid A^-,B^+)\P(E^+\mid B^+,C^+)\\[2ex]\P(A^+,B^+,C^+,D^+,E^+)&=\P(A^+)\P(B^+)\P(C^+)\P(D^+\mid A^+,B^+)\P(E^+\mid B^+,C^+)\end{align}$$

Next, just substitute the numerator and denominator and cancel the common factors $\P(B^+)\P(C^+)\P(E^+\mid B^+,C^+)$, leaving you with:

$$\begin{align}\P(A^-\mid B^+, C^+, D^+, E^+)&=\dfrac{\P(A^-)\P(D^+\mid A^-,B^+)}{\P(A^-)\P(D^+\mid A^-,B^+)+\P(A^+)\P(D^+\mid A^+,B^+)}\end{align}$$

Lastly, just read the values for those factors from the tables and calculate the result.