Probability Theory Fundamentals › Bayes' Theorem
Quantitative FinanceAll chapters Probability Theory Fundamentals › Bayes' TheoremOne section · Sections in this chapter10 / 15 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
Bayes' Theorem provides a systematic method for updating probabilities when new information arrives, establishing the mathematical basis for learning from data and adapting beliefs. These skills are essential in finance, where conditions change constantly.
For and :
where:
- : posterior probability of given evidence
- : likelihood of observing if is true
- : prior probability of before observing
- : marginal probability of (normalizing constant)
In words: the probability of given equals the probability of given , times the prior probability of , divided by the probability of .
For and , Bayes' Theorem follows directly from the definition of conditional probability applied twice. Starting from and noting that , we obtain the theorem. If and , then directly from the joint probability; the elementary ratio defining is undefined. The theorem gives a practical way to update a specified model under new evidence.
The components have specific names that reflect their roles in the updating process:
- : Prior probability, representing our belief about before observing
- : Likelihood, measuring how probable the evidence is if is true
- : Posterior probability, representing our updated belief about after observing
- : Evidence probability, which is a normalizing constant
Once a prior and likelihood model are specified, the theorem provides the rule for computing the posterior after observing evidence. The posterior can then become the prior for the next round of updating as more evidence arrives.
Worked Example: Updating Default Probabilities
A bank is evaluating a corporate borrower. Based on the firm's industry and size, the bank initially estimates a 3% probability of default within one year. This is the prior probability.
The bank then receives the firm's quarterly financial statements showing deteriorating profit margins. Historical estimates from a comparable borrower cohort, measured at the same observation point before a one-year forecast horizon, show:
- 40% of companies that defaulted within the following year showed deteriorating margins at the observation date
- 10% of companies that did not default within that same year showed deteriorating margins at the observation date
The bank wants to update its default probability given this new information.
Step 1: Define events
- = company defaults within one year
- = company shows deteriorating margins
Step 2: List known probabilities
- (prior default probability)
- (prior probability of no default)
- (likelihood of margin deterioration given default)
- (likelihood of margin deterioration given no default)
Step 3: Calculate using the law of total probability
Before applying Bayes' Theorem, we need the total probability of observing deteriorating margins, regardless of whether default occurs. The law of total probability provides this by considering all mutually exclusive ways the evidence could arise:
where:
- : total probability of observing deteriorating margins
- : probability of deteriorating margins given the company defaults
- : prior probability of default
- : probability of deteriorating margins given no default
- : probability of no default
This formula works because every company either defaults or doesn't, so we can decompose the probability of deteriorating margins into these two mutually exclusive cases. We weight each conditional probability by the probability of that case occurring. The law of total probability essentially averages the conditional probabilities, weighted by the probability of each conditioning event.
# Prior probabilities
p_default = 0.03
p_no_default = 0.97
# Likelihoods
p_margin_given_default = 0.40
p_margin_given_no_default = 0.10
# Calculate P(M) using law of total probability
p_margin = p_margin_given_default * p_default + p_margin_given_no_default * p_no_defaultP(Deteriorating Margins) = 0.4 × 0.03 + 0.1 × 0.97 P(Deteriorating Margins) = 0.1090
Step 4: Apply Bayes' Theorem
Now we have all the ingredients to compute the posterior probability:
where:
- : posterior probability of default given deteriorating margins (what we want to find)
- : likelihood of deteriorating margins among defaulting companies (0.40)
- : prior default probability (0.03)
- : probability of deteriorating margins (calculated in Step 3)
The numerator represents the probability of both defaulting and showing deteriorating margins. The denominator normalizes this by dividing by the total probability of the evidence.
# Bayes' Theorem
p_default_given_margin = (p_margin_given_default * p_default) / p_marginP(Default | Deteriorating Margins) = (0.4 × 0.03) / 0.1090 P(Default | Deteriorating Margins) = 0.1101 Updated default probability: 11.01% Prior default probability: 3.00% Increase factor: 3.7x
The deteriorating margins more than tripled our assessed default probability from 3% to about 11%. This updated probability can inform lending decisions, pricing, and reserve estimates, alongside exposure, recovery assumptions, and applicable accounting rules. The magnitude of this update reflects both the strength of the evidence, since deteriorating margins are much more common among defaulters, and the prior belief that default was already considered unlikely.
Visualizing Bayes' Theorem
The following visualization shows how the prior probability updates to the posterior as we incorporate new evidence.
