Updated
Math
Bayes’ Theorem Calculator
Update probability with evidence. Enter a prior, a likelihood, and a false-positive rate—then get the posterior P(A|B), the evidence probability P(B), and a clear breakdown in decimal and percent.
Bayesian Probability Evaluator
Compute P(A|B) using Bayes’ theorem with a simple two-case model: A vs ¬A. Save results to history and export to CSV.
How common A is before seeing evidence B (base rate).
How often evidence appears when A is true (e.g., sensitivity).
How often evidence appears when A is false (e.g., 1 − specificity).
Quick Steps
- Choose whether you want to enter values as percents or decimals.
- Enter P(A), P(B|A), and P(B|¬A) using the same format.
- Press Calculate to get P(A|B), P(B), and P(¬A|B).
- Use History to compare scenarios and export results to CSV.
Tip: A common “positive test” setup is A = condition present and B = test positive. Then P(A|B) is the probability you truly have the condition given a positive result.
| Concept | Symbol | Plain Meaning | Example Interpretation |
|---|---|---|---|
| Prior | P(A) | How likely A is before evidence | Prevalence of a condition |
| Likelihood | P(B|A) | How often B happens if A is true | Sensitivity: positive if condition present |
| False Positive | P(B|¬A) | How often B happens if A is false | 1 − specificity: positive if condition absent |
| Evidence | P(B) | Overall probability of observing B | Chance of a positive test in the population |
| Posterior | P(A|B) | Updated probability of A after seeing B | Chance condition is present given positive test |
| Complement | ¬A | “Not A” | No condition present |
Formula Breakdown
- Compute the complement: P(¬A) = 1 − P(A).
- Compute evidence: P(B) = P(B|A)P(A) + P(B|¬A)P(¬A).
- Compute posterior: P(A|B) = P(B|A)P(A) ÷ P(B).
- Compute the alternative: P(¬A|B) = 1 − P(A|B).
Valid ranges: probabilities must be between 0 and 1 (decimal) or 0 and 100 (percent). If P(B) becomes 0, the posterior is undefined and the calculator will show an error.
Your Bayes calculations will appear here after you run the calculator.