Bayes’ Theorem

While signing up for two of Stanford’s exciting (and free!) online courses, several of the course descriptions required basic knowledge of probability, and all of them gave the example that one should know what the Bayes’ Theorem.  Of course, I had no idea what that was.

Turns out, it’s poetically simple.  Here’s an example from Wikipedia (where else?):

An entomologist spots what might be a rare subspecies of beetle, due to the pattern on its back. In the rare subspecies, 98% have the pattern. In the common subspecies, 5% have a similar pattern, but he cannot distinguish these from memory. The rare subspecies accounts for only 0.1% of the population. How likely is the beetle to be rare?

To solve using the Bayes’ Theorem, we find P (probability) of finding a rare beetle:

P(Rare|HasPattern) = (P(HasPattern|Rare) * P(Rare)) / ((P(HasPattern|Rare) * P(Rare)) + (P(HasPattern|Common) * P(Has Pattern|Common) * P(Common))

= (0.98*0.001) / (0.98*0.001 + 0.05*0.999)

= 1.9% chance that the beetle is rare

2 Replies to “Bayes’ Theorem”

Leave a Reply

Your email address will not be published. Required fields are marked *