Free Bayes Theorem Calculator

Apply Bayes' theorem to compute posterior probability from prior probability, likelihood, and evidence.

P(A|B) - Posterior

0.153846

Posterior (%)15.3846
P(B) - Total Evidence0.058500

P(A|B) - Posterior vs P(A) - Prior

How to Apply Bayes' Theorem

Formula

P(AB) = P(BA) * P(A) / P(B)

where P(B) = P(BA)*P(A) + P(Bnot A)*P(not A)

Bayes' theorem updates a prior belief P(A) after observing evidence B. The likelihood P(BA) measures how probable the evidence is if A is true. The denominator P(B) normalizes the result.

Example Calculation

A disease affects 1% of the population. A test is 90% sensitive and has a 5% false positive rate. If someone tests positive, what is the probability they have the disease?

  1. 01P(A) = 0.01 (prior: disease prevalence)
  2. 02P(B|A) = 0.9 (sensitivity)
  3. 03P(B|not A) = 0.05 (false positive rate)
  4. 04P(B) = 0.9 * 0.01 + 0.05 * 0.99 = 0.009 + 0.0495 = 0.0585
  5. 05P(A|B) = (0.9 * 0.01) / 0.0585 = 0.009 / 0.0585 ≈ 0.1538
  6. 06Despite a positive test, there is only about a 15.4% chance of having the disease.

Frequently Asked Questions

Learn More

Understanding the Normal Distribution

Learn what the normal distribution is, why it matters in statistics, and how to use the bell curve for probability calculations, z-scores, and real-world data analysis.

Related Calculators