Bayes' theorem combines the prior probability of having a disease with the accuracy of a medical test to calculate the posterior probability of disease after a positive result. Therefore, a positive result does not automatically mean that the patient is likely to have the disease.
The Mechanism
Let represent having the disease and represent a positive test. Bayes' theorem gives
Here, is the disease prevalence, is the test's sensitivity, and is its false-positive probability, equal to .
The denominator uses the law of total probability because a positive result can arise in two mutually exclusive ways: a true positive from , or a false positive from (D'). This normalizes the relevant probabilities.
Suppose a disease affects of a population. A test has sensitivity and specificity. For a hypothetical group of people:
| Group | Positive | Negative |
|---|---|---|
| people with disease | true positives | false negatives |
| people without disease | false positives | true negatives |
Of the positive results, only come from people with the disease. Therefore,
The risk after a positive result is therefore approximately , despite the test being reasonably accurate. This occurs because the disease is rare, so false positives among the large healthy population outnumber true positives.
Equivalently, the positive predictive value can be found from expected frequencies. This approach often makes the base-rate effect clearer and provides a useful check on direct substitution into Bayes' formula. Lower prevalence would reduce the posterior probability further, all else equal.
A common misconception is confusing with . Sensitivity is the probability of testing positive given disease; the required medical risk is the probability of disease given a positive test.
Exam Technique
This is IB Mathematics: Analysis and Approaches HL, sub-topic AHL 4.13 Bayes' theorem, usually suited to Paper 2 or Paper 3. Define events clearly, show the Bayes substitution, and interpret the final probability in the medical context rather than giving only a decimal.
