Bayesian Reasoning: The Covid Test Paradox
Why a 99% accurate test doesn't mean you are 99% likely to be sick. Explore the crucial role of prevalence and Bayes' Theorem.
The Base Rate Fallacy
During the pandemic, a common misunderstanding emerged: If a Covid test is 99% accurate, and I test positive, I must be 99% likely to be sick, right?
Wrong.
This intuitive leap falls victim to the Base Rate Fallacy. It confuses two very different probabilities:
- Test Specificity: The probability the test is positive given that you are sick.
- Positive Predictive Value: The probability you are sick given that the test is positive.
To bridge the gap between these two, we must know the Prevalence (the base rate of the disease in the population).
Play with the parameters below to see how drastically the real-world probability changes based on the underlying prevalence of the virus.
Adjust Test Parameters
Positive Predictive Value
Negative Predictive Value
Population Outcome
The Math: Bayes’ Theorem
We can calculate the exact probability of being sick after a positive test using Bayes’ Theorem.
It is stated mathematically as:
Let’s break down what each of these terms means in the context of our simulation:
- is the Posterior Probability (Positive Predictive Value). This is what we actually want to know: I tested positive, am I sick?
- is the Sensitivity (True Positive Rate). How often the test correctly flags a sick person.
- is the Prevalence (Prior / Base Rate). What percentage of the total population currently has the disease.
- is the total probability of getting a positive result, regardless of whether you are sick or healthy. We must calculate this by adding the True Positives and the False Positives:
Why the Paradox Happens
When a disease is rare (e.g., a Prevalence of 1%), the vast majority of the population is healthy ().
Even if a test is highly specific (e.g., only a 1% False Positive rate), 1% of a massive healthy population creates a very large number of false alarms. These False Positives can easily outnumber the True Positives from the tiny sick population.
As a result, your positive test might just be a drop in the ocean of false alarms, meaning your actual chance of being sick is surprisingly low.