Bayes' Theorem

Theorem
Let $\Pr$ be a probability measure on a probability space $\left({\Omega, \Sigma, \Pr}\right)$.

Let $\Pr \left({A \mid B}\right)$ denote the conditional probability of $A$ given $B$.

Let $\Pr \left({A}\right) > 0$ and $\Pr \left({B}\right) > 0$.

Then:
 * $\displaystyle \Pr \left({B \mid A}\right) = \frac {\Pr \left({A \mid B}\right) \Pr \left({B}\right)} {\Pr \left({A}\right)}$

General Result
There are other more or less complicated ways of saying very much the same thing, all of which can be derived from the basic version with the help of other fairly elementary results.

For example:

Proof
From the definition of conditional probabilities, we have:


 * $\displaystyle \Pr \left({A \mid B}\right) = \frac{\Pr \left({A \cap B}\right)} {\Pr \left({B}\right)}$


 * $\displaystyle \Pr \left({B \mid A}\right) = \frac{\Pr \left({A \cap B}\right)} {\Pr \left({A}\right)}$

After some algebra:


 * $\displaystyle \Pr \left({A \mid B}\right) \Pr \left({B}\right) = \Pr \left({A \cap B}\right) = \Pr \left({B \mid A}\right) \Pr \left({A}\right)$

Dividing both sides by $\Pr \left({A}\right)$ (we are told that it is non-zero), the result follows:
 * $\displaystyle \Pr \left({B \mid A}\right) = \frac {\Pr \left({A \mid B}\right) \Pr \left({B}\right)} {\Pr \left({A}\right)}$

Also known as
This result is also known as Bayes' Formula.

The formula:
 * $\displaystyle \Pr \left({A \mid B}\right) \Pr \left({B}\right) = \Pr \left({A \cap B}\right) = \Pr \left({B \mid A}\right) \Pr \left({A}\right)$

is sometimes called the product rule for probabilities.