# How to combine Bayes network, total probability and probability of parent event given child event?

Given the following Bayes network:

how can I calculate $$\Pr(C|\lnot A,E)$$?

I think first we need to use Bayes theorem, then we can use chain rule: $$\Pr(C|\lnot A, E)=\frac{\Pr(\lnot A, E|C)\cdot\Pr(C)}{\Pr(\lnot A,E)}=\\\frac{\Pr(\lnot A, E,C)\cdot\Pr(C)}{\Pr(\lnot A,E)}=\\ \frac{\Pr(\lnot A)\Pr(C|A)\Pr(E|C)\Pr(C)}{\sum_{C\in \{T,F\}}\Pr(\lnot A, C, E)}$$

Am I on the right track?

\begin{align}\mathsf P(C\mid \neg A, E)&=\dfrac{\mathsf P(\neg A,C, E)}{\sum_{C\in\{\top,\bot\}}\mathsf P(\neg A,C,E)}\\[1ex]&=\dfrac{\mathsf P(\neg A)\mathsf P(C\mid\neg A)\mathsf P(E\mid C)}{\mathsf P(\neg A)\mathsf P(C\mid\neg A)\mathsf P(E\mid C)+\mathsf P(\neg A)\mathsf P(\neg C\mid\neg A)\mathsf P(E\mid\neg C)}\\[1ex]&=\dfrac{\mathsf P(C\mid\neg A)\mathsf P(E\mid C)}{\mathsf P(C\mid\neg A)\mathsf P(E\mid C)+\mathsf P(\neg C\mid\neg A)\mathsf P(E\mid\neg C)}\end{align}

$$P(\neg A,C,E)$$ is the marginalization of the joint distribution $$\sum_{B,D} P(\neg A,B,C,D,E)$$ and the joint is given via the network (which you've already used).

Joint probability:

$$P(\neg A,B,C,D,E) = P(\neg A)P(C\mid\neg A) P(E\mid C) P(B) P(D\mid \neg A,B)$$.

• are you saying that $P(\lnot A,E,C)=\sum_{B,D} P(\neg A,B,C,D,E)$ and $P(\lnot A,E,C)\neq P(\lnot A)P(C|A)P(E|C)$?
– Yos
Jun 30, 2019 at 12:18
• See joint probability added. Jun 30, 2019 at 12:23
• I understand how to calculate $P(\lnot A,B,C,D,E)$ but I don't understand if $P(\lnot A,C,E)=P(\lnot A)P(C|A)P(E|C)$ is correct or not.
– Yos
Jun 30, 2019 at 12:25
• $$\mathsf P(\lnot A,C,E)~=~\mathsf P(\lnot A)\,\mathsf P(C\mid\lnot A)\,\mathsf P(E\mid C)\,\require{cancel}\cancelto{1}{\sum_{B,D}\mathsf P(D\mid\lnot A,B)\,\mathsf P(B)}$$ Jul 10, 2019 at 6:20