Enter three numbers — how common the condition is (prior), how often the evidence appears when the condition is present (sensitivity), and how often it appears when it is not (false-positive rate) — and Bayes' theorem returns the updated probability.
Because the condition is rare. False positives from the huge healthy group (9,900 × 5% = 495) swamp the true positives from the tiny sick group (100 × 99% = 99). Base rates dominate — that is the whole lesson of Bayes' theorem.
The prior is your belief before the new evidence; the posterior is the updated belief after weighing the evidence by how expected it is under each possibility. Bayes' theorem is the exact arithmetic of that update.
Yes — spam filters, fault diagnosis, forensic likelihoods and forecasting all use the same structure: a base rate, a hit rate and a false-alarm rate.
The classic form P(A|B) = P(B|A) × P(A) ÷ P(B) needs P(B) directly; this calculator builds P(B) from the two conditional rates instead, which is how the inputs are usually known in practice.
P(A | B) = P(B | A) × P(A) ÷ P(B), with the total evidence rate built by the law of total probability: P(B) = P(B | A) × P(A) + P(B | not A) × P(not A). Substituting gives the three-input form this calculator uses.
Inputs: prior 0.01, sensitivity 0.99, false-positive rate 0.05.
Steps: P(B) = 0.99 × 0.01 + 0.05 × 0.99 = 0.0099 + 0.0495 = 0.0594. Posterior = 0.0099 ÷ 0.0594 = 0.1667.
Result: P(A | positive) = 16.67% — despite a '99% accurate' test, because the condition is rare.
Add this calculator to your own website or blog — it is completely free, needs no sign-up, and always shows the latest version. Copy the code below and paste it into your page where you want the calculator to appear. Keeping the small “Powered by Loona Automation” credit line under the embed helps keep this tool free — but you are free to style or remove it; the tool works either way.