Bayes Theorem Calculator
Calculate posterior probability using Bayes' theorem to update probabilities based on new evidence.
Enter Your Values
Table of Contents
Bayes' Theorem Formula
Bayes' theorem is a mathematical formula used to update probabilities based on new evidence. It helps us revise our beliefs about the probability of an event occurring.
Where:
- P(A|B) is the posterior probability
- P(B|A) is the likelihood
- P(A) is the prior probability
- P(B) is the evidence
How to Use Bayes' Theorem
To use Bayes' theorem, follow these steps:
-
1Determine the prior probability (P(A))
-
2Calculate the likelihood (P(B|A))
-
3Determine the evidence (P(B))
-
4Apply Bayes' theorem to calculate the posterior probability
Interpreting Results
Understanding what the posterior probability tells you:
-
1High Posterior Probability (> 0.7):
Strong evidence in favor of the hypothesis.
-
2Moderate Posterior Probability (0.3-0.7):
Some evidence, but not conclusive.
-
3Low Posterior Probability (< 0.3):
Weak evidence against the hypothesis.
Practical Examples
Example 1 Medical Diagnosis
Prior probability of disease: 0.01
Test sensitivity: 0.95
Test specificity: 0.90
Posterior Probability ≈ 0.087
Even with a positive test, the probability of having the disease is still relatively low.
Example 2 Weather Prediction
Prior probability of rain: 0.3
Cloud cover probability: 0.8
Cloud cover given rain: 0.9
Posterior Probability ≈ 0.337
The probability of rain increases slightly with cloud cover.
Example 3 Spam Detection
Prior probability of spam: 0.5
Word "free" in spam: 0.8
Word "free" in non-spam: 0.2
Posterior Probability ≈ 0.8
High probability of spam when the word "free" is present.