Skip to main content

Bayes Theorem Calculator

Update a prior with evidence. Enter P(A), P(B|A), and P(B) to get the posterior P(A|B) = P(B|A) P(A) / P(B).

Rated 4.8 out of 5 based on 271 reviews

Results

How to compute a Bayes posterior

  1. Enter prior P(A) as a probability from 0 to 1. The default 0.01 is a rare-event sketch, not a medical claim.
  2. Enter likelihood P(B|A), the chance of evidence B when hypothesis A holds.
  3. Enter evidence P(B), the overall chance of B. You supply this value; the page does not expand a law of total probability tree for you.
  4. Read P(A|B) and the echoed inputs. If the product implies a posterior above 1, fix P(B) or the other terms. Nothing is uploaded.

Bayes theorem posterior

Single-event P(A|B) from prior, likelihood, and evidence

FormulaP(A|B) = P(B|A) × P(A) / P(B)
InputsPrior P(A), likelihood P(B|A), evidence P(B)
Default sketchP(A) = 0.01, P(B|A) = 0.9, P(B) = 0.1
OutputPosterior P(A|B) with input echo
ScopeSingle-event Bayes. Not a Bayesian network.
PrivacyRuns in the browser. No upload.

What this Bayes page computes

Bayes theorem turns a prior belief about event A into a posterior after you observe evidence B. This page uses the three-term form P(A|B) = P(B|A) P(A) / P(B). You type all three probabilities. It does not invent P(B) from a tree of alternatives, and it does not run MCMC or hierarchical models.

How the posterior is formed

Multiply likelihood by prior, then divide by evidence. Every input must sit from 0 to 1. P(B) cannot be 0. If the arithmetic would push P(A|B) above 1, the status line asks you to check that P(B) is large enough for the chosen prior and likelihood. The classic rare-disease intuition is that a high P(B|A) still leaves a modest posterior when the prior is tiny and false positives inflate P(B).

Prior, likelihood, evidence, and related jobs

Entities on this page: prior probability, likelihood, marginal evidence, and posterior. Conditional probability without the three-term Bayes layout lives on the probability calculator. Counting success paths over n trials is the binomial probability page. Standardizing one score against a mean and SD is z-score, which is not a Bayesian update.

Use cases

Homework that asks for P(A|B) when the book already states P(A), P(B|A), and P(B). Checking that a rare prior stays small after a sensitive test if the overall rate of positive evidence is not tiny. Classroom demos of base-rate neglect. Not a clinical decision tool and not a spam-filter training loop.

Default numbers

With P(A) = 0.01, P(B|A) = 0.9, and P(B) = 0.1, the posterior is 0.09. The likelihood looks strong, yet the prior is rare and the evidence rate is ten times the prior, so the updated belief stays well below 50%.

Limits

No automatic P(B) from P(B|A)P(A) + P(B|not A)P(not A). No conjugate priors. No credible intervals. Educational arithmetic only. CZNull does not receive the numbers.

Bayes theorem questions

What formula does this page use?
P(A|B) = P(B|A) times P(A) divided by P(B). You supply all three terms.
Why can the posterior exceed 1?
Only when the inputs are inconsistent. Raise P(B) or lower the product of likelihood and prior until the ratio sits at or below 1.
Does the page expand the law of total probability?
No. Enter P(B) yourself. A two-branch total-probability tree is a separate calculation.
What do the default inputs show?
0.01, 0.9, and 0.1 yield P(A|B) = 0.09, which illustrates a rare prior after strong-looking evidence.
Is this a full Bayesian network?
No. It is single-event Bayes with a typed evidence probability.
Where do I go for and/or/not helpers?
Use the probability calculator for intersection, union, complement, and simple conditional forms that are not the three-term Bayes update.