Math

Bayes Theorem Calculator

Apply Bayes theorem to update a prior probability with test evidence, showing the false positive paradox in natural frequencies alongside the algebra.

Last reviewed by the Radiatus Cloud team

Result appears here.

Need this done properly for your business?

Radiatus delivers secure cloud, DevOps & compliance engineering.

Book a free consult

The result that surprises everyone

A test that is 99 percent accurate for a condition affecting one person in ten thousand produces a positive result that is wrong more than 99 percent of the time. This is not a trick or a flaw in the test. Among a million people, a hundred have the condition and 99 test positive, while 999,900 do not and about 9,999 of them test positive anyway. The positives are overwhelmingly false because there are so many more healthy people to draw them from. Studies repeatedly find that most clinicians get this wrong when it is presented as percentages.

Natural frequencies make it obvious

The same calculation stated in whole people rather than percentages is understood correctly by most people without any training. The percentages hide the base rate, which is the number doing all the work, while counting actual individuals makes it impossible to overlook. This tool shows both forms for that reason, and the frequency version is the one to look at when the answer seems wrong.

Where the base rate comes from matters

Bayes theorem is arithmetic and cannot manufacture a prior. When someone is tested because they have symptoms, the relevant base rate is the prevalence among people with those symptoms, not among the general population, and it may be a hundred times higher. Screening an unselected population is exactly the case where the base rate is lowest and false positives dominate, which is the central argument in most debates about mass screening programmes.

Related tools

  • Percentage Calculator — Calculate percentages, percentage change, increase and decrease, and reverse percentages, with the working shown for each result.
  • Statistical Calculator — Calculate mean, median, mode, standard deviation, and more.
  • Probability Calculator — Calculate probabilities for single and combined events, including conditional probability and Bayes' theorem.
  • Scientific Calculator — Perform advanced mathematical operations including trig, log, and exponents.

Frequently Asked Questions

Why is a positive result from an accurate test often wrong?

Because the number of false positives depends on how many people do not have the condition, and for a rare condition that group is enormous. A 1 percent error rate applied to 999,900 healthy people produces far more positives than a 99 percent detection rate applied to 100 sick ones.

What is the difference between sensitivity and specificity?

Sensitivity is the proportion of people with the condition who test positive. Specificity is the proportion without it who test negative. A test can have excellent sensitivity and still produce mostly false positives if its specificity is imperfect and the condition is rare.

Why are natural frequencies clearer?

Because they keep the base rate visible. Percentages hide how many people are in each group, and the group sizes are what drive the answer. Most people get the frequency version right with no statistical training and the percentage version wrong.

Does this apply outside medicine?

Yes, to every screening problem: spam filters, fraud detection, security alerts and drug testing all have the same structure. Any alert for a rare event will be mostly false alarms unless its specificity is extraordinarily high, which is the root of alert fatigue.

How do I choose the prior?

From the population actually being tested. Someone tested because they have symptoms belongs to a much higher prevalence group than the general public. Using a population base rate for a symptomatic individual understates the true probability, sometimes by a large factor.

Privacy & Security

Everything runs in your browser; nothing is uploaded.

Data: None
Client-side-Side
Active
v1.0

How to Use

Enter the base rate and the test accuracy to see the true probability after a positive result.

Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.