# Need help calculating full joint probability distribution

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

This problem is similar to that in this link:

http://www.cs.tut.fi/~elomaa/teach/AI-2012-7.pdf

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

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:

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?

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.

• 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. – CaTx Oct 20 '16 at 5:23
• 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. – Graham Kemp Oct 20 '16 at 7:52
• @CaTx Is that clearer? – Graham Kemp Oct 20 '16 at 8:00
• I left out some details, which are now added. How can I solve for P(A) now? – CaTx Oct 20 '16 at 13:01
• how can I computer P(A = T | S = T) from the given? – CaTx Oct 20 '16 at 13:16