WOLFRAM|DEMONSTRATIONS PROJECT

Probability of Being Sick After Having Tested Positive for a Disease (Bayes's Rule)

​
How good is the test in detecting the disease?
P(positive test| sick):
0.95
How good is the test in detecting the absence of the disease?
P(negative test| healthy):
0.9
How likely is the disease?
P(disease)
0.01
Number of people for reference
N
3000
Probability of being sick after having testedpositive for a disease: P(sick|positive test)
positive test
negative test
Total
sick
28
2
30
healthy
297
2673
2970
Total
325
2675
3000
P(sick|positive test): 28/325 = 0.0861538
For rare diseases, people tend to intuitively overestimate the probability of being sick after having received a positive test result. This probability is calculated using Bayes's theorem from some of the conditional probabilities involved in the scenario. Understanding these probabilities, such as the probability of being sick when having received a positive test result, expressed as P(sick| positive test), can become easier using a contingency table like the one shown. Given properties of the test, the probability of the disease, and the size of the reference group, the table shows the number of people falling into the four different possible categories. The conditional probability of being sick after having received a positive test result is simply the ratio of the people that are sick and that have tested positive to the total number of people having tested positive.