Bayes Theorem Calculator
Use Bayes’ theorem to update probabilities from prior probability, likelihood, and false-positive probability with step-by-step explanation.
Calculator
This common Bayes setup calculates P(A|B), the probability of A after observing evidence B.
What this calculator teaches
Bayes’ theorem updates a probability when new evidence appears. It helps students understand why a high test accuracy does not always mean a high chance that a rare condition is truly present.
The calculator separates the prior probability, the evidence if A is true, and the evidence if A is not true. That makes the denominator easier to understand.
Formula & Symbols
| Concept | Formula | Meaning |
|---|---|---|
| Bayes’ theorem | P(A|B)=P(B|A)P(A)/P(B) | Updates the probability of A after evidence B is observed. |
| Total probability | P(B)=P(B|A)P(A)+P(B|¬A)P(¬A) | The evidence can occur when A is true or when A is false. |
Step-by-Step Examples
- P(A) = 0.01 means the condition is present in 1% of the group.
- P(B|A) = 0.95 means the test is positive for 95% of true cases.
- P(B|not A) = 0.05 means 5% of people without the condition still test positive.
- Even a good test can have many false positives when the condition is rare.
- The prior probability P(A) is called the base rate.
- Bayes’ theorem prevents ignoring that base rate.
Where students use this
Common Mistakes to Avoid
The denominator must include ways the evidence can happen when A is false.
Bayes’ theorem is useful because these two probabilities are not the same.
The prior probability is often the most important number when the event is rare.
Frequently Asked Questions
Related Math Calculators
Formula Explorer connections
Interpretation: This formula summarizes data, models uncertainty or supports inference about a population or random process. Assumption: The sampling design and distribution assumptions must match the data. Independence, sample size, outliers and measurement quality can materially affect interpretation.