I need help calculating P(alarm) from this setup:

picture 1

This problem is similar to that in this link:


However, the sum of all probabilities in that link is 1.0 as seen below:

picture 2

In the (cavity, catch, toothache) in that link, P(cavity) can be calculated by adding all values of that row and gives 0.2, by the rule of marginalization:

picture 3

My problem has a total sum of 4.0, and if I add all rows in the (alarm=T) column, I will get P(alarm) = 1.100, which is greater than 1.0. Can anyone tell me what I am doing wrong?

There is a similar question posted, but there is no answer to follow.

How to calculate Full joint probability distribution

================================================================== edit after Graham Kemp's comment

Actually, this is the problem setup. You are right. I left out some details. how can I solve for P(A) now?

picture 4


1 Answer 1


The setup is incorrect.   You appear to have the conditional probabilities for the events (alarm given cooking and smoke), rather than the joint probabilities.

You want. $\mathsf P(A{=}\mathsf T) ~=~ {{\mathsf P(S{=}\mathsf T,C{=}\mathsf T)~\mathsf P(A{=}\mathsf T\mid S{=}\mathsf T,C{=}\mathsf T)}+{\mathsf P(S{=}\mathsf T,C{=}\mathsf F)~\mathsf P(A{=}\mathsf T\mid S{=}\mathsf T,C{=}\mathsf F)}+{\mathsf P(S{=}\mathsf F,C{=}\mathsf T)~\mathsf P(A{=}\mathsf T\mid S{=}\mathsf F,C{=}\mathsf T)}+{\mathsf P(S{=}\mathsf F,C{=}\mathsf F)~\mathsf P(A{=}\mathsf T\mid S{=}\mathsf F,C{=}\mathsf F)}}$

You have, $\mathsf P(A{=}\mathsf T\mid S{=}\mathsf T,C{=}\mathsf T)=0.45, \mathsf P(A{=}\mathsf T\mid S{=}\mathsf T,C{=}\mathsf F)=0.15,$ et. cetera.

You are missing; $\mathsf P(S{=}\mathsf T,C{=}\mathsf T), \mathsf P(S{=}\mathsf T,C{=}\mathsf F), \mathsf P(S{=}\mathsf F, C{=}\mathsf T), \mathsf P(S{=}\mathsf F,C{=}\mathsf F)$

With the added information, you have $\mathsf P(S{=}\mathsf T)=0.27, \mathsf P(C{=}\mathsf T)=0.42$ and from the diagram, they are independent random variables, so $\mathsf P(S{=}\mathsf T, C{=}\mathsf T)=\mathsf P(S{=}\mathsf T)~\mathsf P(C{=}\mathsf T) = (0.27)(0.42) \\ \mathsf P(S{=}\mathsf T, C{=}\mathsf F)=\mathsf P(S{=}\mathsf T)~\mathsf P(C{=}\mathsf F) = (0.27)(0.58)\\\text{etc.} $

Then you now have enough information to calculate the join probability masses: $$\mathsf P(A{=}\mathsf T,S{=}\mathsf T,C{=}\mathsf T)=(0.27)(0.42)(0.45)=0.05103$$

And so forth.

  • $\begingroup$ I am using, Artificial Intelligence, a Modern Approach 3ed (Russell, Norvig), chapter 13. The superscripts (CC), (SC), etc..... are not used. Can you point me to a page / formula where that is used. I do not understand this. $\endgroup$
    – CaTx
    Oct 20, 2016 at 5:23
  • $\begingroup$ Sorry. I was using $C$ as the event of Cooking, and $C^\complement$ is the complement. I'll change it to random variables if you wish. $\endgroup$ Oct 20, 2016 at 7:52
  • $\begingroup$ @CaTx Is that clearer? $\endgroup$ Oct 20, 2016 at 8:00
  • $\begingroup$ I left out some details, which are now added. How can I solve for P(A) now? $\endgroup$
    – CaTx
    Oct 20, 2016 at 13:01
  • $\begingroup$ how can I computer P(A = T | S = T) from the given? $\endgroup$
    – CaTx
    Oct 20, 2016 at 13:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .