P(A|B)Bayes Theorem Calculator
Classic medical screening example: what is the probability of disease given a positive test?
Population prevalence
P(+|Disease)
P(−|No disease)
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.
- 1P(A|B) = P(B|A) × P(A) / P(B)
- 2P(A) = prior probability (before evidence)
- 3P(B|A) = likelihood (probability of evidence given hypothesis)
- 4P(A|B) = posterior probability (after evidence)
- 5P(B) = P(B|A)×P(A) + P(B|¬A)×P(¬A) — the total probability
Disease prevalence 1%, test sensitivity 99%, specificity 95%=P(disease | positive test) ≈ 16.7%Despite 99% accuracy, only 1 in 6 positives are true positives
Prevalence 10%, same test=P(disease | positive) ≈ 68.8%Higher base rate dramatically changes posterior
| Term | Symbol | Meaning |
|---|---|---|
| Prior | P(D) | Probability of disease before testing |
| Sensitivity | P(+|D) | True positive rate |
| Specificity | P(−|¬D) | True negative rate |
| False positive rate | P(+|¬D) | 1 − specificity |
| Posterior | P(D|+) | Probability of disease given positive test |
| Positive predictive value | PPV = P(D|+) | Clinical relevance of a positive result |
🔒
100% मुफ़्त
कोई साइनअप नहीं
✓
सटीक
सत्यापित सूत्र
⚡
तत्काल
तुरंत परिणाम
📱
मोबाइल अनुकूल
सभी उपकरण