# Conditional Probability about Bayesian Network

Given the above Bayesian Network ($$A,B,C,D$$ are events), how can I prove the following equality?

\begin{align} P(D|A) &= P(D|B \cap C)P(B|A)P(C|A)+ \\ &\ \ \ \ \ \ P(D|B \cap C^c)P(B|A)P(C^c|A)+ \\ &\ \ \ \ \ \ P(D|B^c \cap C)P(B^c|A)P(C|A)+ \\ &\ \ \ \ \ \ P(D|B^c \cap C^c)P(B^c|A)P(C^c|A) \end{align}

(Add) I have no idea about using $$\def\P{\mathop{\sf P}}\P(A,B,C,D)=\P(D\mid B,C)\P(B\mid A)\P(C\mid A)\P(A)$$

I can't progress over this:

$$P(D|A) = \frac{P(D \cap A)}{P(A)}$$ \begin{align} P(D \cap A) &= P(B \cap C)P(D \cap A|B,C) +\\ & P(B \cap C^c)P(D \cap A|B,C^c) +\\ & P(B^c \cap C)P(D \cap A|B^c,C) +\\ & P(B^c \cap C^c)P(D \cap A|B^c,C^c) \\ \end{align}

The Factorisation encoded by that DAG is: $$\def\P{\mathop{\sf P}}\P(A,B,C,D)=\P(D\mid B,C)\P(B\mid A)\P(C\mid A)\P(A)$$
• Try the Law of Total Probability: $\mathsf P(A,D)={\mathsf P(A,B,C,D)+\mathsf P(A,B,C^{\small\complement},D)+\mathsf P(A,B^{\small\complement},C,D)+\mathsf P(A,B^{\small\complement},C^{\small\complement},D)}$, @firia2000 . – Graham Kemp Sep 16 at 8:43