Free access until 30 November 2026 · Physics and Maths questions and notes, updated continuously · Build a test

4 · IB Maths AA

Bayes' theorem: medical test

Set how common a condition is and how accurate a test is, then see through a tree diagram and 1000 people how likely a positive result really means having the condition.

Try this

  1. With prevalence 1 %, sensitivity 90 % and specificity 95 %, find P(C | +). Why is it so much lower than 90 %?
  2. Keep the test fixed and raise the prevalence to 20 %. Watch how the number of false positives compares with true positives.
  3. At prevalence 1 %, raise specificity from 95 % to 99.5 %, then reset and raise sensitivity to 99.5 % instead. Which change improves P(C | +) more?

Common error: confusing P(+ | C) with P(C | +); draw the tree, multiply along each branch, then divide the branch you want by the total of all branches giving that result.