Probability Calculator

For two events: the chance of A or B, A given B and whether they are independent. Also Bayes' theorem.

How it works

For two events give P(A), P(B) and, if you know it, P(A and B). Leave P(A and B) empty if the events are independent. The tool gives the union, the chance of neither, conditional chances and whether they are independent. Bayes mode updates a prior after seeing evidence.

The formula

P(A or B) = P(A) + P(B) - P(A and B)
P(A given B) = P(A and B) / P(B)
Bayes: P(H given E) = P(E given H) P(H) / P(E)

Worked example

A disease affects 1% of people. A test catches 90% of cases and gives a false alarm to 5% of healthy people. A positive test means only about a 15% chance of disease.

Good to know

Common questions

Are mutually exclusive events independent?
No. If they cannot both happen, P(A and B) is 0, which is not P(A) x P(B) unless one of them is 0.
What if I only know P(A given B)?
Multiply it by P(B) to get P(A and B), then type that.
Why is the Bayes answer small?
Because the prior is small. The evidence has to beat it.

More in Math, Science & Engineering.