The most powerful framework for reasoning under uncertainty
~10 minutes • Interactive
A disease affects 10% of the population.
A test has 90% accuracy (for both positive and negative).
You test positive. What's the probability you're actually sick?
Drag to make your guess:
Imagine 1000 people. Let's sort them:
810 test negative ✓
90 false positives ✗
90 true positives ✓
10 false negatives ✗
Who tests positive?
90 sick + 90 healthy = 180 total
Of these, only 90 are actually sick
P(sick | positive) = 90/180 = 50%
What crucial information did they ignore?
The base rate (prior probability) dramatically affects the result. With only 10% disease prevalence, even a 90% accurate test produces many false positives.
In our medical example:
P(sick | test+) = P(test+ | sick) × P(sick) / P(test+)
= 0.9 × 0.1 / 0.18
= 0.5
This coin is biased (70% heads). Watch how estimators behave.
Adjust prior (Beta distribution):
Between MLE and MAP?
MLE: argmax P(data | θ)
MAP: argmax P(data | θ) × P(θ)
posterior = likelihood × prior
1. Base Rate Matters
Prior probability dramatically affects posteriors.
2. MLE Overfits, MAP Regularizes
MAP adds prior knowledge as a regularizer.
3. Regularization = Prior
L2 = Gaussian prior. L1 = Laplace prior.
4. Update Beliefs Correctly
Bayes' theorem is the correct way to incorporate evidence.
Ready for the skill check?
3 questions to test your understanding
1. Spam filter: 95% accurate, 2% spam. If flagged, P(actually spam)?
2. 3 flips, 3 heads. MLE estimate for P(heads)?
3. Weight decay (L2) is equivalent to:
Key Formulas