Enter P(A), P(B|A) and P(B|not A), and instantly get the revised probability P(A|B) using Bayes’ Theorem.
Bayes’ Theorem Calculator
How It’s Calculated
Bayes’ Theorem revises a probability after new evidence arrives. Start with P(A), your original belief. P(B) is found using the law of total probability — splitting every way B can happen: through A, or through not-A. Then P(A|B) = P(A ∩ B) / P(B) tells you the updated probability of A, now that you know B occurred.
Worked Example
Two bags: Bag A (chosen with probability 0.4) has 8 red balls out of 10 draws (P(B|A) = 0.8). Bag "not A" gives red 30% of the time (P(B|not A) = 0.3). Given a red ball was drawn, P(A|B) = (0.8×0.4) / (0.8×0.4 + 0.3×0.6) = 0.32/0.5 = 0.64.
Frequently Asked Questions
Q: What’s the difference between P(B|A) and P(A|B)?
P(B|A) is the probability of B given A already happened — usually the known, given information. P(A|B) is the reverse — the probability of A given B happened, which is what Bayes’ Theorem solves for. Confusing the two is the single most common Bayes’ Theorem mistake.
Q: Do P(A) and P(not A) always add to 1?
Yes — A and not-A cover every possibility with no overlap, so their probabilities always sum to exactly 1.
Bayes’ Theorem is the capstone of the 2nd PUC Probability chapter, building directly on conditional probability. Try the basic Probability Calculator →