| Trouble viewing the formulas? You need a MathML compatible browser. |
Bayes' theorem
From LogicWiki
Bayes' Theorem is a result of the probability calculus that allows you to calculate conditional probabilities on the basis of the "reverse" conditional probability. That is, Bayes' Theorem lets you calculate if you know and some other information.
Bayes' Theorem is incredibly useful in problems where you learn some new information (gain some new evidence) and have to update probabilities to account for this new information.
The theorem is named after Reverend Thomas Bayes (1702 - 1761), a Presbyterian minister and Fellow of the Royal Society of London.
Contents |
Statement of the Theorem
The simplest version of Bayes' Theorem is the following (for any sentences ):
This is a simple consequence of Rule 4 of the probability calculus. Rule 4 says that:
and
Since (by Rule 7), we have:
Dividing each side by Pr(B) gives:
Which is precisely Bayes' Theorem.
Example
Here is a typical case for Bayes' Theorem. I suspect that my mechanic is a crook, in fact I think it's 25% likely that he is. If he is a crook, there's a 90% chance that he will install a broken muffler in my car. The unconditioned probability that my muffler will be broken is 0.3. Suppose that it is in fact broken; how likely is it that my mechanic actually is a crook?
In this problem, we gain some new evidence (we observe a broken muffler). This should change the probability assigned to "the mechanic is a crook." But how much should it change? That is where Bayes' Theorem comes in.
We know:
We want:
.
By Bayes' Theorem, this is:
Hence,
.
Bigger Versions
Often, in Bayes' Theorem problems, the value of the denominator - in our statement above - is not given directly. In such cases, the total probability theorem is used. This two-step process can be combined into one, yielding bigger versions of Bayes' Theorem: one corresponding to the simple version of the total probability theorem, and the other to the general version.
And, if is a partition, then
These versions result from substituting the appropriate version of the total probability theorem into the first version of Bayes' Theorem.
Example
Here's a typical Bayes' Theorem problem. I present you with two urns, labelled 1 and 2. Urn 1 contains 1 red ball and 9 black balls, while urn 2 contains 9 red balls and 1 black ball. I'm going to first choose an urn by rolling a six-sided die: if it comes up 3, I will draw a ball at random from urn 1, anything else and I will draw from urn 2. Without showing you which urn I drew from, I present you with a black ball. How likely is it that I drew from urn 1?
Initially it seems more likely that I drew from urn 1 because it is mainly black balls, but the die-rolling changes things. How much? Let's use Bayes' Theorem.
We are given:
We want:
(probabilities like this are sometimes called "inverse probabilities" as they calculate "backwards." They tell you how likely a past event was given that a present event happened, whereas something like "what's the probability that a black ball is drawn from urn 2" calculates "forwards" from picking the urn to drawing the ball)
According to Bayes' Theorem:
So the probability that I drew from urn 1 is only 0.265. If you think about it, this tells you that, since I showed you a black ball, the probability that I rolled a 3 on the six-sided die is 0.265, which is kind of interesting.
Another classic example along these lines is the Monty Hall problem.
Prior and Posterior Probabilities
Sometimes the result of Bayes' Theorem - - is called the posterior probability of , while is called the prior probability of . This is usually done when the problem involves updating a probability on the basis of some new evidence: is the probability of before learning evidence (hence "prior") while is the probability of after learning evidence (hence "posterior").
This is particularly relevant when thinking of probabilities as degrees of belief. Bayes' Theorem tells you the right way to update your degrees of belief when you learn new evidence. A prime example of why this is imporant is the medical test.
See Also
Probability calculus, Total probability theorem, Degree of belief, Medical test, Monty Hall problem, Conditional probability, Conditionalization.
