Friday, January 21, 2011

Intuitive Explanation of Bayes’ Rule

One of my favourite math identities is Bayes’ rule. It also occurs quite frequently in Behavioural Econ / Finance as well as integrative thinking because it is such a good (mathematically provable) example of flawed thinking and model construction.

But like any formula, if not understood at an intuitive level (aka memorizing the formula vs rebuilding it from scratch), applying the formula incorrectly will yield meaningless (and potentially misleading) results.

Bayes’ rule states:

P(A\B) = P(B\A) x P(A) / P(B)

On the surface, this formula seems to make no sense: “The probability of A given B is the probability of B given A multiplied by probability of A divided by probability of B.”

However, walking through step by step we first understand that:

P(A\B) = P(A Λ B) / P(B)

This makes sense. The probability of A happening given that B has happened is the area encompassed by A and B (gray) divided by the total universe of probabilities, B (red and gray), because we are told that B “has happened”.

So from here we can also understand that:

P(B\A) = P(A Λ B) / P(A)

Which is simply the same rationale as the one above. However, using algebra, we can see that:

P(A Λ B) = P(B\A) x P(A)

And combining the two formulas, we get the original:

P(A\B) = P(B\A) x P(A) / P(B)

Example provided in class:
Of patients entering a chest clinic:
Event A – Person has cancer
Event B – Person is a smoker

80% of people with cancer are smokers: P(A\B) = 80%

10% of patients have cancer: P(A) = 10%
50% of patients smoke: P(B) = 50%

If you knew someone was a smoker, what is the probability they have cancer?


Most people would over estimate the number, due to various incongruities in the probabilities, namely because such a high percentage of patients with cancer are smokers at 80%.

However, the math shows us that P(B\A), the probability of finding cancer given that you know someone is a smoker is (80% x 10%)/50% or 16%. Although it is higher than the average of 10%, is still relatively unlikely that they have cancer relative to what most guesses anticipated.

You'll notice that the answer is heavily affected by the rarity (and relative elasticity) of event A, or the chance that someone has cancer to begin with.

No comments: