Medical testing and statistics, why testing positive may mean you “probably” are not

One of the greatest things that has led to a more healthy society, is the creation of new medical tests to help clinicians detect and diagnose conditions.  As with any type of test, there is error.  And in a medical test, particularly those which are testing for serious conditions, it is very important that the test errors on the side of a false positive vs. a false negative, that they are designed to minimize type II errors.  For this reason, it is very possible that you goto the doctor, receive a test, you test positive, but in fact you really are not positive.  Just how likely is it that you are not positive? Well, this of course depends on the test, but here is an example.

In Africa, there are many areas where the prevalence of HIV is .5% .  In fact, there are many areas in Africa and other parts of the world that its much worse than that.  But let’s say you are in this general population in Africa where the prevalence of HIV is .5%.

Let’s also assume we have a test, which can detect HIV 95% of the time that someone actually has HIV. Bayes formula shows us just how likely it is the person actually may have HIV:

p(hiv) = 1/200 – the probability of someone having HIV

p(pos | hiv) = 0.95 – the probability the system will give the positive result if someone has HIV
p(pos | hiv ) = 0.05 – the probability the system will give the positive result if someone does not have HIV

p(hiv | pos) = the probability that a person has HIV if the system gives the  positive result








Of the people who test positive, the percent of them we actually expect to have the HIV virus is .0872 (9% if taken to two decimal places).  Please note, this is just a toy example of a test that will show positive 95% of the time if someone has a condition.  

This is why additional testing can be so important.

This entry was posted in Data Analytics. Bookmark the permalink.

Leave a Reply