Bayes' Theorem Calculator

Your details

Pick which of the four Bayes variables you want to calculate. The other three become inputs.
How likely the hypothesis (e.g. disease, spam) is before seeing the evidence. Use the real base rate, not 50%.
%
Probability of observing B when A is true. For a medical test this is the sensitivity.
%
Probability of observing B when A is false. Equals 1 minus the specificity for a medical test.
%
How many people or items to use when displaying true positives, false positives, etc. 1,000 is a useful default.
Calculated probabilityVery unlikely
9.1743%
P(B), evidence probability9.81%
P(not A), complement of prior99%
Specificity = 1 - P(B|not A)91%
True positives (per population)9
False positives (per population)89.1
False negatives (per population)1
True negatives (per population)900.9
PPV (precision)9.17%
NPV99.89%
Positive likelihood ratio10
True positives9
False positives89.1
False negatives1
True negatives900.9

After seeing the evidence, the probability of A is 9.1743%.

  • The evidence raised your belief from a prior of 1% to a posterior of 9.1743%.
  • Natural frequency check: in 1,000 people, about 9 are true positives and 89.1 are false positives. That gives 9.17% accuracy for a positive result.
  • The positive likelihood ratio (LR+) is 10, which represents very strong evidence. A ratio above 10 is considered diagnostically very useful.
  • The total probability of observing the evidence is 9.81%. This denominator normalises the posterior; when the base rate is small, false positives dominate and pull it down.

Next stepLower the false-positive rate P(B|not A) to see how a more specific test sharpens the posterior, or switch "Solve for" to reverse-engineer the prior or sensitivity.

= Powered by OnlyCalculators