suppose that the chance that someone is happy after visiting the bathroom is 0.05. If he has not visited the bathroom the chance that he is happy is 0.01.
If he goes to the bathroom there is a 0.7 chance that he also washed his hands. The chance that somebody washed his hands but not visited the bathroom is 0.3.
Now given that someone has washed his hands and that he is happy, what is the chance that he visited the bathroom?
I've got the following:
P(happy|bathroom) = 0.05
p(happy|notBathroom) = 0.01
p(washedHands|bathroom) = 0.7
p(washedHands|notBathroom) = 0.3
I googled a bit and found out that there is a rule called bayes' rule which could be useful, but how should you use this here?
Thanks in advance!