Bayes theorem calculator
Update P(A) after observing B using likelihoods for A and its complement. Enter all probabilities as percentages.
Formula
P(B)=P(A)P(B|A)+P(not A)P(B|not A); P(A|B)=P(A)P(B|A)/P(B).
Evidence P(B) ≈ ((20)×(80)+(100-(20))×(20))÷100 · Posterior P(A|B) ≈ (20)×(80)÷(32)
How to use
- Enter prior P(A) as a percentage.
- Enter P(B|A) and P(B|not A).
- Read posterior P(A|B) and evidence P(B).
Examples
- Prior 20%, likelihood 80%, alternative likelihood 20% give posterior 50%.
Frequently asked questions
What does not A mean?
The complement of A, covering every outcome where A does not occur.
Are the events assumed independent?
No. The two conditional probabilities describe how B depends on A.
What if P(B) is zero?
The conditional probability is undefined; the calculator reports an error.
Sources
Updated: