Bayes’ Theorem: Reasoning Under Uncertainty — lecture notes
A positive medical test that is “90% accurate” — so why is the chance of being sick only about 32%? Bayes’ theorem explained with 200 people.
0:001. Introduction

AI systems constantly reason under uncertainty. Bayes theorem tells us how to update a belief when new evidence arrives. Let us see it with a simple medical test.
0:122. Counting people

Picture 200 people. Five percent, that is ten people, are actually sick. The test catches 90 percent of sick people, so nine test positive. But it also wrongly flags 10 percent of the 190 healthy people, which is 19 false alarms. So of 28 positive results, only nine are sick. About 32 percent.
0:343. The formula

The formula says: the posterior equals the likelihood times the prior, divided by the evidence. Point nine times point zero five, divided by point one four, gives about point three two. Exactly what we counted.
0:504. Why it matters

Our intuition fails because we ignore the base rate. When a condition is rare, even a small false-alarm rate produces many false positives. A second independent test would change the picture a lot. Spam filters and diagnostic AI use exactly this reasoning.
1:085. Recap

To recap. Start with a prior. Weigh the evidence with the likelihood. Get an updated posterior. And never forget the base rate.
Key takeaways
- Bayes’ theorem updates a prior belief into a posterior using evidence.
- In the example, a positive result means only about a 32% chance of being sick.
- Ignoring rare base rates leads to badly wrong conclusions.
- Naive Bayes classifiers and probabilistic AI build on this rule.
Check yourself
- In the example, how many of the 28 positive tests were truly sick?
Show answer
9 — 9 sick people tested positive; 19 positives were false alarms.
- What is the “prior” in this example?
Show answer
The 5% of people who are sick — The prior is the belief before seeing the test result.
- Why is the posterior so much lower than 90%?
Show answer
Because the illness is rare, so false alarms outnumber true cases — With a low base rate, even a 10% false-positive rate creates many false alarms.
Go deeper
- Bayes' Theorem: Updating Beliefs with Evidence · The AI Lecture Hall
- Bayesian Networks: Reasoning Under Uncertainty · The AI Lecture Hall
- Naive Bayes Classifiers: Simple, Fast and Surprisingly Strong · The AI Lecture Hall
© 2026 Janin A Apurba, CSE, AUST · Advanced ICT Officer, CNRS-UNHCR. All rights reserved. Notes for the animated lecture at https://ai-in-motion.vercel.app/watch/bayes-theorem.html