





For independent variables,



Not conditionally independent:




For "symptoms" which are unconditionally independent and conditionally independent given the "disease",
You would like to know the chance that it will rain within the next day on a particular planet. You can see that there are green clouds in the sky but no purple clouds. You also know that the chance of rain in general during this season is .1, that when it's raining there have been green clouds in the sky during the past day 60% of the time and purple clouds in the sky 30% of the time, and that when it isn't raining there have been green clouds in the sky during the last day 20% of the time and purple clouds 50% of the time. Calculate the probability that it will rain, making the usual simplifying assumptions. Also explain what these assumptions are.
P(eq | es ∧ ¬nr ∧ ea)
P(eq ∧ c | es ∧ ¬nr ∧ ea) (1)
P(eq ∧ ¬c | es ∧ ¬nr ∧ ea) (2)
P(¬eq ∧ c | es ∧ ¬nr ∧ ea) (3)
P(¬eq ∧ ¬c | es ∧ ¬nr ∧ ea) (4)
P(eq ∧ c | es ∧ ¬nr ∧ ea) =
P(es ∧ ¬nr ∧ ea | eq ∧ c) P(eq ∧ c) / P(es ∧ ¬nr ∧ ea)
(5)
Because of the statistical independence of the observation nodes, of eq from c, of nr from c, and of ea from eq, the numerator of (5) is
P(es | eq ∧ c) P(¬nr | eq) P(ea | c) P(eq) P(c) (6)
P(ea | c) = P(ea ∧ en | c) + P(ea ∧ ¬en | c) (7)
P(ea | ¬c) = P(ea ∧ en | ¬c) + P(ea ∧ ¬en | ¬c)
(8)
P(ea ∧ en | c) = P(ea | en ∧ c) P(en | c) = P(ea | en) P(en | c) (9)
And similarly for other values of en and c.| c | en | P(ea | en) P(en | c) = P(ea ∧ en | c) | P(ea | c) |
|---|---|---|---|
| T | T | 0.7 × 0.9 = 0.63 | 0.64 |
| T | F | 0.1 × 0.1 = 0.01 | |
| F | T | 0.7 × 0.05 = 0.035 | 0.13 |
| F | F | 0.1 × 0.95 = 0.095 |
Now we're ready to calculate the probabilities for different combinations of eq and c. The last column accounts for the missing denominator by normalizing the probabilities so that they sum to 1.0
| eq | c | P(es | eq ∧ c) P(¬nr | eq) P(ea | c) P(eq) P(c) | P(eq ∧ c | es ∧ ¬nr ∧ ea) |
|---|---|---|---|
| T | T | 0.99 × 0.1 × 0.64 × 0.01 × 0.1 = .000063 | 0.0035 |
| T | F | 0.95 × 0.1 × 0.13 × 0.01 × 0.9 = 0.00011 | 0.0061 |
| F | T | 0.2 × 0.95 × 0.64 × 0.99 × 0.1 = 0.012 | 0.67 |
| F | F | 0.05 × 0.95 × 0.13 × 0.99 × 0.9 = 0.0055 | 0.31 |