1
$\begingroup$

If we observe that it is cloudy and raining. What is the probability that the grass is wet? The answer would be:

P(W=T|C=T,R =T) = P(W=T|R=T,S=T)*P(S=T|C=T)+P(W=T|R=T,S=F)*P(S=F|C=T)

But if we observe that the sprinkler is on and the grass is wet, then what would be the probability that it is raining? I'm not sure what would be the solution query to this problem?

enter image description here

$\endgroup$
  • $\begingroup$ If it is homework, please tag it as self-study $\endgroup$ – jpmuc Jan 3 '18 at 15:10
  • $\begingroup$ @jpmuc It's a group of self-study questions. $\endgroup$ – Tak Jan 3 '18 at 15:56
1
$\begingroup$

You first need to work out what the probability of the model is, $$ P(W, S, R, C) = P(W|S, R)P(S|C) P(R|C)P(C) $$ Then you ask for, $$ P(R=1|S=1, W=1) $$

Now, $$ P(R|S,W) = \frac{P(S, W|R)P(R)}{P(S,W)} $$ Let us first consider the numerator, $$ P(S, W|R)P(R) = \\ P(W|R, S)P(R)P(S|R) = \\ P(W|R, S)P(R,S) = \\ P(W|R, S)\sum_{C}P(R|C)P(S|C)P(C) $$ Similarly, $$ P(S,W) = \sum_{R}P(W|R,S) \sum_{C}P(R|C)P(S|C)P(C) = \\ \sum_{C} P(S|C)P(C) \sum_{R}P(W|R,S) P(R|C) $$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.