Bayes' Theorem Formula and Derivation
Bayes' Theorem is a fundamental formula in probability theory that allows us to calculate conditional probabilities by relating the "direct" probability to the "inverse" probability.
Basic Formula
The standard form of Bayes' Theorem is:
[P(A|B) = \frac{P(B|A) \times P(A)}{P(B)}]
Where:
- P(A|B) is the posterior probability: the probability of event A occurring given that B is true[1][3]
- P(B|A) is the likelihood: the probability of event B occurring given that A is true[1][3]
- P(A) is the prior probability: the probability of A occurring independently[1][3]
- P(B) is the marginal probability: the probability of B occurring independently[1][3]
Derivation from First Principles
The derivation of Bayes' Theorem begins with the definition of conditional probability:
-
By definition, conditional probability is expressed as:
[P(A|B) = \frac{P(A \cap B)}{P(B)}]
where P(A ∩ B) is the probability of both A and B occurring[5][7]
-
Similarly, we can write:
[P(B|A) = \frac{P(A \cap B)}{P(A)}]
-
From the second equation, we can solve for the joint probability:
[P(A \cap B) = P(B|A) \times P(A)]
-
Substituting this into the first equation:
[P(A|B) = \frac{P(B|A) \times P(A)}{P(B)}]
And thus we arrive at Bayes' Theorem[2][5].
Extended Form
Using the law of total probability, we can expand the denominator P(B) to get a more useful form:
[P(A|B) = \frac{P(B|A) \times P(A)}{P(B|A) \times P(A) + P(B|\neg A) \times P(\neg A)}]
Where:
- P(¬A) is the probability of A not occurring (complement of A)
- P(B|¬A) is the probability of B occurring given that A did not occur[3][5]
This form is particularly useful when P(B) is not directly known but we have information about how likely B is to occur in the presence or absence of A[9].
Alternative Forms
Bayes' Theorem can also be expressed in other useful forms:
Odds Form
[P(A|B) = \frac{P(A)}{P(\neg A)} \times \frac{P(B|A)}{P(B|\neg A)} \times \frac{P(\neg A|B)}{P(A|B)}]
This can be simplified to:
[\frac{P(A|B)}{P(\neg A|B)} = \frac{P(A)}{P(\neg A)} \times \frac{P(B|A)}{P(B|\neg A)}]
Where the left term represents the posterior odds, the first right term represents the prior odds, and the second right term represents the likelihood ratio[5].
For Multiple Hypotheses
For a partition of events E₁, E₂, ..., Eₙ:
[P(E_i|A) = \frac{P(A|E_i) \times P(E_i)}{\sum_{j=1}^{n} P(A|E_j) \times P(E_j)}]
This form is useful when considering multiple competing hypotheses[5][7].
Bayes' Theorem provides a formal method for updating beliefs based on new evidence, making it foundational in statistical inference, machine learning, and many other fields where probability is used to reason about uncertainty[1][3].