P ProbLab
Tools/Bayes' Theorem Calculator

Bayes' Theorem Calculator

Start with a prior probability and update it with one or more independent pieces of evidence. Includes medical-test and spam-filter presets with sensitivity / false-positive rate inputs.

Setup

Advertisement

Posterior trajectory

Sequential update table

After test #P(H|E)LRPosterior odds

Why this exists

Almost no popular explanation of "Bayes' theorem" answers the actual question most people have: if I have a positive test result, what's the chance I actually have the disease? The answer depends on the prior (how common the disease is) and the test's false-positive rate, not just its sensitivity.

Classic example: 1% disease, 95% sens, 90% spec

Of 10,000 people, 100 have the disease. Test catches 95 of them. Of 9,900 healthy, 10% = 990 false-positive. Total positives: 1,085. Only 95 are true positives. So P(disease | positive) = 95/1085 ≈ 8.76%. Counter-intuitive, but real.

Who uses it

  • Doctors and epidemiologists interpreting screening results.
  • Data scientists calibrating classifiers.
  • Anyone arguing with a friend about base rates.

Limitations

  • Assumes test results are conditionally independent given H. In reality, repeat tests of the same kind often aren't independent (same lab, same systematic bias).
  • Uses fixed sensitivity / specificity. Real tests vary by patient subgroup.
  • Not a substitute for professional medical or statistical advice.