Currently I am working on a sample question for my course:
Calculate P(Sprinkler | Cloudy=True, WetGrass=True)
based on
.
My process is as follows:
- Given the conditional probability table of Sprinkler, we can deduce P(Sprinkler) = 0.10 since we know Cloudy=True
- Since Cloudy is a parent of Sprinkler, P(Sprinker) depends on its value
- Since WetGrass is a child of Sprinkler, Sprinkler is conditionally independent of WetGrass (the former's value does not depend on the latter)
- Thus, we deduce P(Sprinker|Cloudy,WetGrass) = P(Sprinkler|Cloudy) = 0.10
When I checked the instructor's solution to this sample question, it was around 0.13. Could someone help guide me towards the correct way to approach this? I'm new to this concept, and thoroughly confused.
From the diagram $\def\P{\operatorname{\sf P}}\P_{C,S,R,W}=\P_C\P_{S\mid C}\P_{R\mid C}\P_{W\mid S,R}$
We seek $\P_{S\mid C,W}(1\mid 1,1)$
$$\dfrac{\P_{C,S,R,W}(1,1,1,1)+\P_{C,S,R,W}(1,1,0,1)}{\P_{C,S,R,W}(1,1,1,1)+\P_{C,S,R,W}(1,1,0,1)+\P_{C,S,R,W}(1,0,1,1)+\P_{C,S,R,W}(1,0,0,1)}$$
$$\dfrac{(0.5)(0.10)(0.8)(0.99)+(0.5)(0.10)(0.2)(0.90)}{(0.5)(0.10)(0.8)(0.99)+(0.5)(0.10)(0.2)(0.90)+(0.5)(0.90)(0.8)(0.90)+(0.5)(0.90)(0.2)(0.00)}$$
So $$\P_{S\mid C,W}(1\mid 1,1)\approx 0.13$$
Remark, one of your key errors was this:
This is incorrect. Evidence that the grass is wet (or not) does influence our expectation that the sprinkler might be on. In general, a parent is not independent of its child unless the child is independent of the parent (in which case we shouldn't have them as parent/child nodes on the DAG).$$\P(S\mid W)=\dfrac{\P(S)\P(W\mid S)}{\P(W)}$$