Mathematics
Bayes' theorem
A test is 99% reliable and yet a positive result is usually wrong. How that can be.
What you need first
A test for a rare disease detects 99% of all people who have it. In healthy people it wrongly triggers in only 1% of cases. Your test is positive. How likely is it that you are ill? Most people answer 99%. The correct answer is often below 10%, and this difference is not a quibble, it has real consequences in medicine and in the courts.
The direction is what matters
The test promises: if you are ill, then the test is probably positive. That is . But what you want to know is: if the test is positive, am I ill? That is . These two numbers look almost the same and are completely different, because they count inside different groups.
Bayes' theorem is the rule for getting from one direction to the other. You can write it as a formula, but you can also manage without: simply calculate with a large number of people and count. That route is less error-prone and easier to explain.
Calculating with 10,000 people
Suppose 1% of the population is ill. Among 10,000 people that is 100 ill and 9900 healthy. Of the 100 ill people the test detects 99. Of the 9900 healthy ones it wrongly triggers in 1% of cases, which is 99 people. So in total there are positive tests, and only half of them belong to people who are really ill.
The reason for this surprising result is the size of the two groups. There are almost a hundred times as many healthy people as ill ones. So even a tiny error rate in a huge group produces just as many cases as a large hit rate in a small one. This starting is called the base rate, and ignoring it is the most common error of reasoning in probability.
When the disease is more common
Do the same calculation again with a disease affecting 10% of people. Out of 10,000 that means 1000 ill and 9000 healthy. The test finds 990 ill people and produces 90 false alarms. Now of the positive tests are correct. The same test, the same accuracy, an entirely different result.
That is exactly why the whole population is not tested for rare diseases, only people with symptoms or in a risk group. In that smaller group the base rate is much higher, and only then does a positive result carry weight. And that is why in practice a positive test is confirmed with a second, different method.
Exercises
0 of 6 solvedTime to try it yourself. You can't break anything, every attempt counts.
What does describe?
In a town of 10,000 inhabitants, 2% are ill. How many people is that?
Of 9800 healthy people a test wrongly triggers in 1% of cases. How many false alarms is that?
The frequency of a disease in the population is called the ….
Among 200 ill people the test detects 196, and among the healthy there are 98 false alarms. How likely is illness given a positive test?
Put the steps of a Bayes calculation into the right order.
- 1Split them into ill and healthy using the base rate.
- 2Work out the false alarms among the healthy.
- 3Work out the correct hits among the ill.
- 4Choose a large round number of people, say 10,000.
- 5Divide the correct hits by all the positive tests together.