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
How to compute a Bayes posterior
- Enter prior P(A) as a probability from 0 to 1. The default 0.01 is a rare-event sketch, not a medical claim.
- Enter likelihood P(B|A), the chance of evidence B when hypothesis A holds.
- 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.
- 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
| Formula | P(A|B) = P(B|A) × P(A) / P(B) |
|---|---|
| Inputs | Prior P(A), likelihood P(B|A), evidence P(B) |
| Default sketch | P(A) = 0.01, P(B|A) = 0.9, P(B) = 0.1 |
| Output | Posterior P(A|B) with input echo |
| Scope | Single-event Bayes. Not a Bayesian network. |
| Privacy | Runs 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.