3 ms·
Let's take the flu test I used in the grandparent post, and walk through it step by step using the traditional notation. P(Flu) = 0.1 P(not Flu) = 1 - P(Fl
by ekidd 14y ago
Let's take the flu test I used in the grandparent post, and walk through it step by step using the traditional notation.
P(Flu) = 0.1
P(not Flu) = 1 - P(Flu) = 0.9
P(Pos|Flu) = 0.7
P(Pos|not Flu) = 0.1
P(Flu|Pos)
= P(Pos|Flu)P(Flu)
-------------------------------------------
P(Pos|Flu)P(Flu) + P(Pos|not Flu)P(not Flu)
= 0.07 / (0.07 + 0.09)
= 0.4375
P(not Flu|Pos) = 0.09 / (0.07 + 0.09) = 0.5625
As you can see, the same numbers show up in both versions of the problem. In the traditional example, the "impossible worlds" are P(Flu|not Pos) and P(not Flu|not Pos), because we know we have Pos. So these two terms never appear in the equation. The division by (0.07 + 0.09) is the same as the normalization step in my example: once we narrow our world down to 0.07 and 0.09, we need to divide by 0.16 so that everything sums back up to 1.
You may need to work through the math in both the Haskell version and the traditional version before it becomes completely obvious that they're exactly the same thing.
- deleted 14y ago[deleted]
- deleted 14y ago[deleted]
- deleted 14y ago[deleted]