# Bayes' Theory Fundementals

I saw an equation as like that:

$$P(W) = P(W\mid R,S)+P(W\mid !R,S) + P(W\mid !R,S) + P(W\mid R,!S) + P(W\mid !R,!S)$$

Which of these two statements are true?

$$P(W) = P(W\mid R,S)P(R,S)+P(W\mid !R,S)\,P(!R,S) + P(W\mid !R,S)\,P(!R,S) + P(W\mid R,!S)\,P(R,!S) + P(W\,!R,!S)\,P(!R,!S)$$ or $$P(R,S) = P(R\mid S)\,P(S) = P(S\mid R)\,P(R).$$

Is there any document for it?

-
There are $5$ terms in the expressions on the right side of $P(W)$? –  Dilip Sarwate May 24 '13 at 18:40

## 1 Answer

More specifically, you saw that equation in my flawed answer to this question of yours, which I've now corrected. Your second version is correct.

You could have asked that question as a comment under my answer, or at least linked to that answer. In case you didn't do that so as not to offend me by implying that I made a mistake, there's no need for such restraint – errare humanum est :-)

-
... perseverare diabolicum. :-) –  Did Nov 11 '12 at 16:44
@joriki I asked this as a separate question because I wanted to learn underlying equation for it. On the other hand I accepted your answer as correct because I don't know anything about that equations, I didn't want to show your mistake :) –  kamaci Nov 11 '12 at 18:06