A new epidemic affects one in every 100,000 citizens of our country. There is a very fast and cheap test that is 99.99% reliable and all citizens are required to pass it. Those who test positive will have to take a pill.

The test returns a positive or negative result depending on whether the person is infected or not, with a 99.99% reliability which means that in 99.99% of the times the test is passed the result coincides with reality and therefore in 0.01% of the cases it is wrong and gives a result contrary to reality.

Knowing this, a person who has tested positive, **How likely are you to be really infected?**

#### Solution

If the reliability of the test is 99.99%, it means that 0.01% of the results will be wrong. In other words, 0.01% of the 99,999 negatives over 100,000 people will be false positives (since we know that one of the 100,000 is really positive and has the disease) - 9,9999 in 100,000 that will be false positives.

That said, we would have at most the possibility of 10.9999 positive tests (the 9.9999 false positives and the true positive).

But in 10,9999 positive tests we know there is only one that is true (since they tell us that 1 in every 100,000 is sick), that is, in all the 10,9999 positive ones, there are **a probability of being infected of approximately 9.091%**.

Thus, for example, if we take a sample of 1,000,000 people, for example:

- 999,990 will NOT be infected

- 10 will be infected

Of the 999,990 uninfected:

- 999,890 will give NEGATIVE

- 100 will give POSITIVE (erroneously)

Of the 10 infected:

- 9,999 will give POSITIVE

- 0.001 will give NEGATIVE (erroneously)

Therefore, in 1,000,000 people, 109,999 will be positive, but really only 9,999 will be infected.

Therefore, less than 10% of positives actually suffer from the disease.