# Conditional Probability Applied To Medical Tests

Lets say a certain cancer is prevalent in .4% of the population, and a test for said cancer is 95% accurate in testing positive for if someone has the disease. If you test positive, how likely are you to have that type of cancer?

This is a textbook conditional probability question, and the answer may surprise you. Even if you test positive, you only have a 7.1% chance of actually having cancer. Why?

The counterintuitive nature of this problem is an example of the Prosecutors Fallacy  where we mistakingly think the conditional probability P(T+|C) = P(C|T+). To find out the true probability of having the cancer with a positive test, we must apply Bayes theorem.

Below is a simple model of what the probability of having cancer is given a positive test. Things such as the false positive and false negative percentage are compared, along with the prevalence of the cancer in question.

From these results we can see that the quickest way to make an accurate test is to make it’s false positive rate as low as possible. We also learn from the model that for tests on rare diseases or cancers, it is vital that we have an accurate test to have confidence when one tests positive. 