I haven't been able to find an explanation online; maybe I don't know which search words to use. Let's say I have the following Bayes net:

enter image description here

How would I compute $P(D=F|A=T)$?


1 Answer 1


The trick is to take into account both cases of B being T or F. so you want P(D=F, B, A=T)/P(A=T) if i remember correctly, I'm a bit rusty with those. But you can follow wikipedia example.

So we have: $P(D=F|A=T)=\frac{P_{B\in[T,F]}(D=F, A=T,B)}{P(A=T)}$

Now the hard bit is the probability in the numerator.

$P_{B\in[T,F]}(D=F, A=T,B)=P(D=F,B=T,A=T)+P(D=F,B=F,A=T)$.

Now let's use the joint probability formula: $P(D=F,B=T,A=T) = P(D=F | B=T, A=T) \cdot P(B=T | A=T) \cdot P(A=T) $

Now you only need to substitute in the values and calculate the second part of the sum. You also have to take into account independence of A,B, so $P(B=T| A=T)=0.6 \cdot 0.3$ and other values are just from the tables.

Does that make sense? :) btw. I did the numerics and got 0.078, how about you?

  • 1
    $\begingroup$ Yes, I believe your explanation and calculations are correct. This was actually part of a larger computation seen here: cs.nyu.edu/faculty/davise/ai/bayesnet.html (part of the calculations for Prob(A=T|D=F)). In that calculation, $P(A=T)$ cancels, and the numerator is $$\sum_{b\in B} P(D=F|A=T,B=b)P(A=T,B=b)$$ which evaluates to 0.078. The key step for me was this: $$P(D|A)=\frac{P(D,A)}{P(A)}=\frac{\sum_{b\in B} P(D,A,B=b)}{P(A)}$$ $\endgroup$
    – jds
    Commented Jan 14, 2017 at 17:47
  • $\begingroup$ Excellent! :) glad it hepled $\endgroup$
    – Jan Sila
    Commented Jan 14, 2017 at 18:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.