Photo by Adam Nieścioruk on Unsplash

what is the probability of a random person being infected, given a positive test result? Assuming test sensitivity of 95% and 5% of the population are infected.

The correct answer is 20%. If your answer was much higher, then you have committed a base rate fallacy, and here is why. Under uncertainty, we tend to make a quick judgment based on a presupposition. In psychology, this is called the representativeness heuristic.

Base rate fallacy is reasoning without taking prior knowledge into account. The solution is the Bayes theorem. The beauty of this approach relies on conditional probability, the essence of probabilistic reasoning.

For example: we have a test for infection with a sensitivity of 0.95, which means the test returns a 95% positive result on the infected population. Suppose further the test specificity is 0.80, which means the test return 80% negative results on the healthy population.

A visual representation of the probabilities

With a 0.05 prevalence (base rate), what is the probability of a random person being infected, given a positive test result?

Using Bayes Theorem:

P(H|E) = P(H) P(E|H) / P(E)

P(Infected | Positive) = P(Positive | Infected) P(Infected) / P(Positive | Infected) + P(Positive | Healthy)

So, what is the probability of a random person being healthy, given a positive test result?

P(Healthy | Positive) = 1 — P(Infected | Positive)

The takeaway, there is an 80% probability of a random person being healthy, given a positive test result. Committing a base rate fallacy as a decision-maker will result in disasters! I’ll leave this to your imagination. Now, you know. It would be easier for you to identify this bias when it happens in real life.

Programming and Statistics for now!