Bayes’ Theorem Calculator
Flip a conditional probability: from P(B|A) to P(A|B), with a tree diagram.
A = hypothesis (e.g. “has the disease”), B = evidence (e.g. “tests positive”).
① Answer
② Steps
③ Why it works
Bayes’ theorem reverses conditioning: P(A|B) = P(B|A)P(A)/P(B). The denominator uses the law of total probability — B can happen via A or via not-A. The classic trap is ignoring the base rate P(A): even a 99%-accurate test is mostly wrong when the disease is rare, because healthy people vastly outnumber sick ones.