Bayes Theorem Calculator

Apply Bayes' theorem to calculate posterior probability from prior probability, likelihood, and false positive rate.

Share this calculator

Posterior Probability

15.38%

Given a prior probability of 1.00%, the posterior probability after observing the evidence is 15.38%. The probability increased from the prior by a factor of 18.00 (likelihood ratio).

Posterior P(A|B)
0.15
Posterior %
15.38%
Evidence P(B)
0.06
Prior odds
0.01
Posterior odds
0.18
Likelihood ratio
18

How to read this result

Bayes' theorem updates your prior belief P(A) = 0.01 after observing evidence B. The likelihood ratio of 18 shows how much more likely the evidence is under hypothesis A than under not-A. A ratio above 1 strengthens the hypothesis; below 1 weakens it; exactly 1 means the evidence is uninformative.

Also in Probability

Probability

Bayes' theorem calculator: update probabilities with new evidence

A Bayes' theorem calculator computes the posterior probability of a hypothesis after observing evidence. It takes a prior probability, the likelihood of the evidence given the hypothesis, and the false positive rate, then applies Bayes' formula to produce an updated probability.

Bayes' theorem formula

Bayes' theorem relates the posterior probability P(A|B) to the prior P(A), the likelihood P(B|A), and the marginal probability of the evidence P(B). The marginal evidence is computed as P(B) = P(B|A) × P(A) + P(B|¬A) × P(¬A).

The classic example is medical testing: if a disease has 1% prevalence (prior = 0.01), a test has 90% sensitivity (likelihood = 0.9), and a 5% false positive rate, the posterior probability of having the disease given a positive test is about 15.4% — much lower than the 90% sensitivity might suggest.

P(A|B) = P(B|A) × P(A) / P(B)

Bayes' theorem: the posterior probability of A given evidence B.

P(B) = P(B|A) × P(A) + P(B|¬A) × P(¬A)

The total probability of the evidence (law of total probability).

Likelihood ratio

The likelihood ratio LR = P(B|A) / P(B|¬A) measures how much the evidence discriminates between the hypothesis and its alternative. A ratio above 1 supports the hypothesis; below 1 weakens it; equal to 1 means the evidence is uninformative.

Posterior odds equal prior odds multiplied by the likelihood ratio: O(A|B) = O(A) × LR. This multiplicative form makes it easy to update beliefs step by step as new evidence arrives.

LR = P(B|A) / P(B|¬A)

The likelihood ratio — how much more likely the evidence is under the hypothesis than under the alternative.

Frequently asked questions

Why is the posterior often much lower than the test sensitivity?

When the prior probability (prevalence) is low, most positive results come from the large number of healthy people generating false positives rather than the small number of affected people generating true positives. This is called the base-rate fallacy.

What happens when P(B|A) equals P(B|¬A)?

The likelihood ratio becomes 1, and the posterior equals the prior. The evidence is equally likely under both hypotheses, so it provides no information and does not change your belief.

Related

More from nearby categories

These related calculators come from the same leaf category, nearby sibling categories, or the same top-level topic.