Bayes' theorem and the screening paradox
10 questions on Bayes' theorem, priors, posteriors, base rates and independence, using medical screening examples. With explanations.
- 10 questions
- Stopwatch
- Instant feedback
Sample questions
Play now ↑Answers stay hidden. Start the quiz to play them.
Sample 1
In Bayes' theorem, how is the denominator, the overall probability of the evidence, obtained?
- By doubling the prior
- By choosing whatever value makes the answer look sensible
- By adding up the probability of the evidence over all the ways it can arise, using the sum rule
Sample 2
Using the same test (80% of ill people and 10% of healthy people test positive), what is the chance of being ill after a positive result when 2 people in 100 are ill?
- About 80%
- About 14%
- About 2%
How it works
- One question per screen. An answer is final once sent.
- You see right away whether you were right, with a short explanation.
- The stopwatch runs: on equal scores, the faster player ranks first.
- Only your best attempt counts, so replaying is never risky.
About this quiz
A friend tells you that a medical test is 90% accurate, and that yours came back positive. How worried should you be? Most people say about 90%. The correct answer can be less than a tenth of that, and the gap between those two numbers is one of the most useful lessons in reasoning under uncertainty. It is also exactly the kind of lesson that machine learning builds on, because every classifier is, in the end, asked to turn evidence into a belief.
This quiz is about Bayes' theorem, the rule that lets you turn a probability you know into the one you want. A test's manufacturer can tell you how often it is positive among people who are ill and among people who are healthy. What you need, once you hold a positive result, is the chance that you are ill. Those are two different conditional probabilities, one the reverse of the other, and Bayes' theorem is the bridge. The questions walk across that bridge with small, friendly numbers, so you can follow every step in your head.
Along the way you will meet the two words that anchor the whole subject. The prior is what you believed before the new evidence arrived, and the posterior is what you believe afterwards. You will see why the prior matters so much when a condition is rare, why a positive result from a decent test can still leave the odds against you, and how the same result means something quite different in a group that is already likely to be ill. Another question covers what happens when evidence is not independent of the thing you are testing for, and when a test tells you nothing.
The most common error is the one in the first paragraph: swapping the two conditional probabilities. Related mistakes include ignoring the base rate, quoting a test's accuracy without saying which accuracy, and treating a single result as final when the updated belief can itself be the starting point for the next piece of evidence. A good way to avoid all of them is to imagine a crowd of, say, ten thousand people and count who ends up where. Keep that habit in mind when you see a reassuring or alarming percentage attached to any screening programme, spam filter or fraud alert: the right follow-up question is always how common the thing was before the test.
The quiz suits students, analysts, doctors and anyone who reads statistics in the news. It follows the quiz on the sum and product rules of probability, but stands on its own. There are 10 questions, each explained straight after you answer, and the whole quiz takes about four minutes.
Questions and answers
›How long does the quiz take?
About 3 to 4 minutes for 10 questions, at roughly 20 seconds each. You see an explanation after every answer.
›Do I need to know the formula for Bayes' theorem?
No. All the examples use round numbers, and every explanation counts people in a crowd instead of using symbols. If you can multiply a percentage by a number of people, you can work out every answer.
›What is Bayes' theorem in plain words?
It tells you how to reverse a conditional probability. If you know how likely some evidence is when a hypothesis is true and when it is false, and you know how likely the hypothesis was to begin with, it gives you how likely the hypothesis is once you have seen the evidence.
›What are a prior and a posterior probability?
The prior is the probability you assign before looking at the new evidence. The posterior is the probability afterwards, once you have taken the evidence into account. Evidence moves you from one to the other, and the posterior from one piece of evidence can serve as the prior for the next.
›Why can a positive result on an accurate test still mean you are probably healthy?
If the condition is rare, the number of healthy people is huge compared with the number of ill ones. Even a small false alarm rate applied to that large group produces many false positives, which can outnumber the true positives from the small group of people who are really ill. The test is strong evidence, but it is weighed against how unlikely the condition was beforehand. In practice, whenever the stakes are high, a positive screening result is followed by a more specific test, which is just Bayes' theorem applied twice: the first result raises the prior for the second.
›What is the base rate fallacy?
It is the habit of ignoring how common something is in the first place when judging the meaning of new evidence. People focus on the test's accuracy and forget the prior. The fallacy appears in medicine, security screening, fraud detection and any other setting where the thing you look for is rare.
›What does it mean for two variables to be independent?
Two variables are independent when knowing one tells you nothing about the other. The probability of both is then just the product of the separate probabilities. Successive flips of a fair coin are an example. A test whose result is independent of the condition is worthless, because a positive result would not change your belief.
›How does this idea appear in machine learning?
Many classifiers are explicitly built on it, and even those that are not can be interpreted this way. A spam filter weighs how often certain words appear in spam and in ordinary mail, together with how common spam is overall. The same reasoning applies whenever a model combines evidence with background knowledge.