An extension of the topic of conditional probability. Even a very accurate test for a rare disease produces plenty of false alarms — a positive result may indicate a low probability of disease. Bayes' theorem: P(A|B)=P(B|A)·P(A)/P(B) — the probability depends on the base rate too, not only on the test's sensitivity. It was formulated by Thomas Bayes (published posthumously in 1763).

I’ll give you a target P(disease | +) — use the slider to set the base rate so the Bayes posterior hits it. Same test (99%), different result.
What just happened?
Even a very accurate test (99% sensitivity and specificity) for a rare disease produces plenty of false alarms. The reason: for a rare disease the number of healthy people is huge, so a small percentage of false positives among the healthy outweighs the true positives among the few sick. That is why a positive result often means a low probability of disease.
Bayes’ theorem:
— describes how to update the probability of a hypothesis in light of new data . In diagnostics: = "disease", = "positive result".
Numeric example (per 100,000 people):
At a prevalence of : sick → the test detects ; among healthy people, false positives is people. Out of positives only are truly sick, so . The probability depends also on the base rate, not only on the test accuracy.
Why does this work? (the invariant)
Ignoring the base rate (prevalence) is the classic "base-rate fallacy" — common even among doctors. The probability of disease given a positive result depends also on how common the disease is in the population, not solely on the sensitivity and specificity of the test. For a rare disease the false positives dominate; the more common the disease, the larger the share of truly sick among all positives (the gauge rises).
History and applications
The theorem was formulated by Thomas Bayes, and his work was published posthumously in 1763. It is the foundation of Bayesian statistics, medical diagnostics, spam filters, machine learning, and rational inference. It teaches us not to trust "test accuracy" blindly without asking: how common is the thing being tested for?
Why you need this for the exam:
This extends conditional probability. Trick: write out concrete counts over a large population (e.g. 100,000) and count how many are true and false positives — then you compute directly from the definition, with no base-rate fallacy.
Remember: a positive result from an accurate test for a rare disease usually means you are healthy anyway — because false alarms predominate. Always ask about the base rate before trusting "test accuracy".
For a rare disease (small ) even a sensitive test produces many false alarms — a positive result may indicate a low probability of disease.
Ignoring the prevalence (how common the disease is in the population) inflates the estimate — a common mistake, even among doctors.
Notation: is the prior probability, the posterior, the test's sensitivity.
Most often, that you are healthy — because false positives among the many healthy people outnumber the truly sick.
On the test's sensitivity AND on the disease's base rate in the population (not only on the test's accuracy).
Omitting the disease's prevalence when interpreting a test result — a classic mistake, common even among doctors.
Teaching? Embed this experiment on your site.
Free widget — paste it on your school site, blog or notes. It links to the full version.