Given the following Bayes network:



  • $p(k=t)=.2$
  • $p(o=t)=.1$
  • $p(s=t|k=f,o=f)=.0$
  • $p(s=t|k=f,o=t)=.2$
  • $p(s=t|k=t,o=f)=.5$
  • $p(s=t|k=t,o=t)=.95$

how would I calculate $p(s=t|o=t)$ and $p(o=t|s=t)$?

I tried the following way:

$p(s=t|o=t) = \dfrac{p(s=t \land o=t)}{p(o=t)} = \dfrac{p(s=t)p( o=t | s=t)}{p(o=t)}$, which obviously doesn't make sense, since I have to caluclate $ p( o=t | s=t)$ with Bayes rule.


From the graph you know $P(s|k,o)$, so to get $P(s|o)$ you need to sum over all possible values of $k$, it will be then:

$$ P(s=t|o=t) = \sum_{i \in {t,f}} P(s=t|o=t,k=i) $$

which will be equal to :

$$ P(s=t|o=t) = P(s=t|o=t,k=f) + P(s=t|o=t,k=t) $$ In your case it doesn't sum to one your distribution, I think you should change the values.

Hope it helps


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.