Why don't terms cancel in this application of Bayes' Rule?

544 Views Asked by At

I have been looking at several different sites trying to wrap my head around the content of Sebastian Thrun's Intro AI course on Udacity. At the moment I'm trying to understand the lesson on "explaining away" in the case of two confounding causes. I found this SE Mathematics article but the top answer just left me with more questions.

Let S = It is sunny R = I got a raise H = I am happy

The first step in the article linked above is to go from

P(R|H,S)

to

P(R,H,S) / P(H,S)

I understand how to make that step. What I don't understand is why the denominator doesn't cancel out the P(S) and the P(H) in the numerator. I thought that P(R,H,S) was the same as P(R)P(H)P(S), so dividing that by P(H)P(S) would leave you with P(R).

I've always struggled with math, so I'm sure I'm just missing something dumb.

1

There are 1 best solutions below

7
On BEST ANSWER

NOTE:

$P(A|B) = \dfrac{P(A,B)}{P(B)}\ne P(A)P(B)$

so in your case :

$P(R|H,S) = \dfrac{P(R,H,S)}{P(H,S)}$

This is known as conditional probability

EDIT 1:

on the question that $P(A,B) =P(A)P(B)$.

The above is only true iff $P(A)$ and $P(B)$ are independent events.

It would be best to read up on this

EDIT 2:

To answer your question :

Does that imply that it is not possible to calculate P(A, B) unless you know P(A|B) or P(B|A) (assuming that A and B are independent?)

No, you can also use the fact that $P(A\cap B) =P(A)+P(B)-P(A\cup B)$