# 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:

Let $\left\{{B_1, B_2, \ldots}\right\}$ be a partition of the event space $\Sigma$.

Then, for any $B_i$ in the partition:

- $\displaystyle \Pr \left({B_i \mid A}\right) = \frac {\Pr \left({A \mid B_i}\right) \Pr \left({B_i}\right)} {\Pr \left({A}\right)} = \frac {\Pr \left({A \mid B_i}\right) \Pr \left({B_i}\right)} {\sum_j \Pr \left({A \mid B_j}\right) \Pr \left({B_j}\right)}$

where $\displaystyle \sum_j$ denotes the sum over $j$.

## 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)}$

$\blacksquare$

## 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**.

## Source of Name

This entry was named for Thomas Bayes.

## Sources

- 1986: Geoffrey Grimmett and Dominic Welsh:
*Probability: An Introduction*... (previous) ... (next): $\S 1.6$: Exercise $18$ - 1991: Roger B. Myerson:
*Game Theory*... (previous) ... (next): $1.2$ Basic Concepts of Decision Theory