Medical test - basic application of Bayes' theorem

A patient takes a special cancer test which has the accuracy test_accuracy=99.9%: if the result is positive, then 99.9% of the patients tested will suffer from the special type of cancer. 99.9% of the patients with a negative result do not suffer from the cancer.

Suppose that a patient is tested and scores positive on the test. What is the probability that a patient suffers from the special type of cancer?

Analysis:

We will use Bayes' theorem to find out the probability of the patient having the cancer:

P(cancer|test_positive)=(P(test_positive|cancer) * P(cancer))/P(test_positive)

To know the prior probability that a patient has the cancer, we have to find out how frequently the cancer occurs among people. Say that we find out that 1 person in 100,000 suffers from this kind of cancer. Then P(cancer)=1/100,000. So, P(test_positive|cancer) = test_accuracy=99.9%=0.999 given by the accuracy of the test.

P(test_positive) has to be computed:

P(test_positive)=P(test_positive|cancer)*P(cancer)+P(test_positive|no_cancer)*P(no_cancer)

= test_accuracy*P(cancer)+(1-test_accuracy)*(1-P(cancer))

= 2*test_accuracy*P(cancer)+1-test_accuracy-P(cancer)

Therefore, we can compute the following:

P(cancer|test_positive) = (test_accuracy * P(cancer))/(2 * test_accuracy * P(cancer)+1-test_accuracy-P(cancer))

= 0.999 * 0.00001 / (2 * 0.999 * 0.00001 + 1 - 0.999-0.00001)

= 0.00989128497 which is approximately 1%

So, even if the result of the test is positive and the test has accuracy is 99.9%, the probability of the patient having the tested type of cancer is only approximately 1%. This probability of having the cancer after taking the test is relatively low when compared to the high accuracy of the test, but is much higher than the probability of 1 in 100,000 (0.001%), as known prior to taking the test based on its occurrence in the population.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset