Skip to main content

learn.howToCalculate

learn.whatIsHeading

Bayes' Theorem describes how to update the probability of a hypothesis given new evidence. Named after Rev. Thomas Bayes (1702–1761), it is the mathematical foundation of Bayesian statistics and is central to medical diagnosis, spam filtering, machine learning, and forensic science. The theorem shows why even a highly accurate test can produce mostly false positives when the disease is rare — this is the base rate fallacy.

Fórmula

P(B) = P(B|A)×P(A) + P(B|¬A)×P(¬A) — the total probability
P
P(B|A)×P(A) + P(B|¬A)×P(¬A) — the total probability — P(B|A)×P(A) + P(B|¬A)×P(¬A) — the total probability
B
P(B|A)×P(A) + P(B|¬A)×P(¬A) — the total probability — P(B|A)×P(A) + P(B|¬A)×P(¬A) — the total probability
A
posterior probability (after evidence) — posterior probability (after evidence)

Guia passo a passo

  1. 1P(A|B) = P(B|A) × P(A) / P(B)
  2. 2P(A) = prior probability (before evidence)
  3. 3P(B|A) = likelihood (probability of evidence given hypothesis)
  4. 4P(A|B) = posterior probability (after evidence)
  5. 5P(B) = P(B|A)×P(A) + P(B|¬A)×P(¬A) — the total probability

Exemplos resolvidos

Entrada
Disease prevalence 1%, test sensitivity 99%, specificity 95%
Resultado
P(disease | positive test) ≈ 16.7%
Despite 99% accuracy, only 1 in 6 positives are true positives
Entrada
Prevalence 10%, same test
Resultado
P(disease | positive) ≈ 68.8%
Higher base rate dramatically changes posterior

Perguntas frequentes

What is Bayes Theorem?

Bayes' Theorem describes how to update the probability of a hypothesis given new evidence. Named after Rev

How accurate is the Bayes Theorem calculator?

The calculator uses the standard published formula for bayes theorem. Results are accurate to the precision of the inputs you provide. For financial, medical, or legal decisions, always verify with a qualified professional.

What units does the Bayes Theorem calculator use?

This calculator works with inches. You can enter values in the units shown — the calculator handles all conversions internally.

What formula does the Bayes Theorem calculator use?

The core formula is: P(A|B) = P(B|A) × P(A) / P(B). Each step in the calculation is shown so you can verify the result manually.

Pronto para calcular? Experimente a calculadora Bayes Theorem gratuita

Experimente você mesmo →

Configurações

PrivacidadeTermosSobre© 2026 PrimeCalcPro