Conditional probability formula
P(A | B) = P(A and B) ÷ P(B)
Example: 30% of students take Spanish (B), and 12% take Spanish and play an instrument (A and B). The chance a Spanish student plays an instrument is 0.12 ÷ 0.30 = 0.4, or 40%.
Bayes' theorem, with a worked example
A condition affects 1% of people. A test catches 90% of cases, but also flags 9% of healthy people. If you test positive, what's the chance you have it?
- Out of 10,000 people, 100 have the condition; 90 of them test positive.
- Of the 9,900 without it, 9% (891) also test positive.
- So 90 of the 981 positives are real: 90 ÷ 981 ≈ 9.2%.
That surprising result is why screening tests are followed up with a second, more specific test. The calculator does the same math in "Bayes' theorem" mode. For the whole picture across several groups, see the law of total probability.
For independent events, where B doesn't change the chance of A, the basic probability calculator is enough.