Bayes Theorem Calculator

Use Bayes’ theorem to update probabilities from prior probability, likelihood, and false-positive probability with step-by-step explanation.

ProbabilityBayesStatistics

Calculator

Prior probability P(A)
Likelihood P(B|A)
False positive P(B|not A)

This common Bayes setup calculates P(A|B), the probability of A after observing evidence B.

Please enter valid values.

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

ConceptFormulaMeaning
Bayes’ theoremP(A|B)=P(B|A)P(A)/P(B)Updates the probability of A after evidence B is observed.
Total probabilityP(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

Example 1
Rare condition with a positive test
  • 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.
✓ Bayes’ theorem combines all three numbers to find P(A|B).
Example 2
Why base rates matter
  • 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.
✓ The prior strongly affects the final probability.

Where students use this

📊
AP Statistics
Interpret conditional probability, screening tests, and base rates.
🧪
Science
Update beliefs using observed evidence and likelihoods.
💻
Machine learning
Build intuition for classification, priors, and evidence.
🧠
Decision making
Avoid base-rate neglect in real-world reasoning.

Common Mistakes to Avoid

⚠️
Forgetting false positives

The denominator must include ways the evidence can happen when A is false.

⚠️
Confusing P(A|B) and P(B|A)

Bayes’ theorem is useful because these two probabilities are not the same.

⚠️
Ignoring the prior

The prior probability is often the most important number when the event is rare.

Frequently Asked Questions

What is the prior probability?
The prior is the probability before you see the new evidence.
What does P(B|A) mean?
It means the probability of seeing evidence B if event A is true.
Why does Bayes’ theorem matter?
It gives a mathematically correct way to update probabilities instead of relying only on intuition.

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.

Binomial Distribution Calculator →Birthday Collision Calculator →Cache Probability Calculator →Math Formula Explorer →