Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

Given a Bayesian network that looks like the following:

A->B->C

How do we compute P(A|C)? My initial guess would be:

P(A|C) = P(A|B) * P(B|C) + P(A|not B) * P(not B|C)
share|improve this question
This probably belongs on math.stackexchange.com – Raymond Chen Nov 28 '11 at 0:00

migrated from stackoverflow.com Nov 28 '11 at 0:13

2 Answers

I would prefer $\Pr(A|C) = \Pr(A|C,B) \Pr(B|C) + \Pr(A|C, \text{not } B) \Pr(\text{not } B|C)$ and the following counterexample shows why there is a difference.

Prob A B C
0.1  T T T
0.1  F T T
0.1  T F T
0.2  F F T 
0.2  T T F
0.1  F T F
0.1  T F F
0.1  F F F

Then in your formulation $\Pr(A|C)=\frac{2}{5}$, $\Pr(A|B)=\frac{3}{5}$, $\Pr(B|C)=\frac{2}{5}$, $\Pr(A|\text{not } B)= \frac{2}{5}$, $\Pr(\text{not } B|C)= \frac{3}{5}=6$ but $\frac{2}{5} \not = \frac{3}{5} \times \frac{2}{5} + \frac{2}{5} \times \frac{3}{5}$.

In my formulation $\Pr(A|C,B) = \frac{1}{2}$ and $\Pr(A|C, \text{not } B)=\frac{1}{3}$ and we have the equality $\frac{2}{5} = \frac{1}{2} \times \frac{2}{5} + \frac{1}{3} \times \frac{3}{5}$.

share|improve this answer
3  
Isn't the Bayesian network $A \rightarrow B \rightarrow C$ supposed to be locally Markov in the sense that given $B$, the sole parent of $C$, $C$ is conditionally independent of all nondescendants (such as $A$), that is, $P(A\mid B,C)$ should equal $P(A\mid B)$? While Henry's equation is correct in the general case, the probability assignment in his counterexample is not compatible with the Bayesian network $A \rightarrow B \rightarrow C$. For the probability assignments required by the locally Markov property in this case, @ArKitect's solution is correct. – Dilip Sarwate Nov 28 '11 at 2:42

You are correct; you are integrating out B, conditional upon C. Good job!

To extend this answer in response to Henry's answer and Dilip's comment - yes, the network structure implies that $P(A|B,C) = P(A|B)$, so, taking a problem-specific shortcut, Dilip's original answer is correct.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.