You go to the doctor for a quick check up. The doctor tells you to take a test on a very rare illness (1 in a million of the population have it, based on experimental and historical data) and so he handles over a test in a box. In the box it says that the test has 99,99% of accuracy.

You take the test and it is positive. So you definitely have that rare condition, right?

What is the actual probability you do?

## The WHY

The problem above it is one of the most counterintuitive I have heard, and at the same time is one of the most fundamental and powerful results you may encounter constantly on your day to day life. It’s the Bayes Theorem.

The (surprising) actual answer to the question above is that in that situation you have around 1% of probabilities of having the disease. Yes 1% (is not a typo). How can that be?

The actual reasoning behind it is not difficult. A test with 99,99% accuracy will (in average) give you 9999 correct results out of every 10.000 tests or 1 false positive every 10.000 tests, and this is the key to understanding Bayes. If the rare condition you are testing is 1 in a 1.000.000 (as in the situation above), what would be the expected results of the test if you test a milion individuals?

The test is expected to give 1 false positive every 10.000 so, you end up with ~100 false positives out of a 1.000.000 tests! That makes 101 positives in total (adding the expected 1 that actually have the disease )

This is: 100 false positives and 1 real positive. So once you know you are one of those 101 positives, your chances of being the real positive is 1 in 101, or ~1%

Unbelievable, right? But how? This is a much more interesting question…

Continue reading “Rare events and tests”