I'm working with Bayesian Networks and conditional probability. Let $e$, $l$ and $s$ be random variables, the expression $$\sum_l p(e|l)p(l|s)=p(e|s) $$

holds always? If so, how can I derive it using the definition of conditional probability and marginalization?


If I understand correctly, $s$ is the parent of $l$ and $l$ is the parent of $e$ in the Bayesian network. Therefore, $$ p(e \mid l, s) = p(e \mid l) $$ since the probability of $e$ depends only on $l$. Then \begin{align} \sum_l p(e\mid l)p(l\mid s) = \sum_l p(e\mid l, s)p(l\mid s) = \sum_l p(e, l \mid s) = p(e \mid s) \end{align} where the second equality is due to $$ p(A, B \mid C) = p(A \mid B, C) \cdot p(B \mid C) $$ and the last equality is due to the law of total probability.

  • $\begingroup$ That is one situation. More generally, the equality, $p(e\mid \ell, s)=p(e\mid \ell)$, means that $e$ and $s$ are conditionally independent when given $\ell$, and vice versa. $$\begin{align}p(e\mid s)~&= \sum_\ell p(e,\ell\mid s) && \text{Law of Total Probability}\\[1ex] &=~\sum_\ell p(e\mid\ell,s)~p(\ell\mid s) &&\text{Definition of Conditional Probability}\\[1ex] &=~\sum_\ell p(e\mid \ell)~p(\ell\mid s) && e\perp s\mid\ell\end{align}$$ $\endgroup$ Mar 21 '17 at 8:08
  • $\begingroup$ @GrahamKemp Good point. $\endgroup$
    – PSPACEhard
    Mar 21 '17 at 10:07
  • $\begingroup$ @GrahamKemp Thanks fo the comment, but I don't see any difference with the answer. The first equation of the answer $p(e|l,s)=p(e|l)$ means that $e$ and $s$ are conditionally independent given $l$. $\endgroup$
    – Ana S. H.
    Mar 21 '17 at 15:00

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.