3
$\begingroup$

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.

$\endgroup$
2
  • $\begingroup$ Think about what these cryptic expressions mean. The event $R$ (“I got a raise”) includes cases when it’s sunny or you aren’t happy, but we want to exclude those for the conditional probability, so $P(R)$ can’t in general be the right value. $\endgroup$
    – amd
    Jun 26, 2018 at 19:59
  • 1
    $\begingroup$ If $S,H,R$ were independent you might be correct as $\dfrac{ P(R)P(H)P(S)}{P(H)P(S)} = P(R)$ as you say, but they need not be independent, especially as the weather and your pay may influence your happiness $\endgroup$
    – Henry
    Jun 26, 2018 at 22:23

1 Answer 1

1
$\begingroup$

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)$

$\endgroup$
7
  • $\begingroup$ I apologize in advance for being so dense, but in the top transformation, doesn't P(A,B) expand to P(A)P(B), in which case the P(B) in the denominator would cancel out the P(B) in the numerator? It's the same question, just with two variables instead of three. $\endgroup$ Jun 26, 2018 at 18:39
  • $\begingroup$ @DanielArant: No, $P(A,B)$ is in general not equal to $P(A)P(B)$. See en.wikipedia.org/wiki/Independence_(probability_theory). $\endgroup$
    – joriki
    Jun 26, 2018 at 18:41
  • $\begingroup$ @DanielArant not always $P(A,B)= P(A)P(B) $ iff $P(A) \& P(B)$ are independent events $\endgroup$ Jun 26, 2018 at 18:43
  • 1
    $\begingroup$ 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?) $\endgroup$ Jun 26, 2018 at 19:11
  • 1
    $\begingroup$ @DanielArant no you can also use the fact that $P(A\cup B)= P(A)+P(B)-P(A\cap B)$ $\endgroup$ Jun 26, 2018 at 19:14

You must log in to answer this question.

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