Event Probabilities

Worked example: a positive medical test

A condition affects 1% of people. A test detects 90% of true cases and gives a false positive for 5% of healthy people. If someone tests positive, how likely is it that they have the condition?

  1. Let A = has the condition, B = tests positive. P(A) = 0.01, P(B | A) = 0.90 and P(B | not A) = 0.05.
  2. P(A and B) = 0.01 × 0.90 = 0.009.
  3. P(B) = 0.009 + 0.99 × 0.05 = 0.009 + 0.0495 = 0.0585.
  4. P(A | B) = P(A and B) / P(B) = 0.009 / 0.0585 = 0.154.

Only about 15% of positive results are true cases, even though the test is “90% accurate”. Because the condition is rare, false positives from the large healthy group outnumber the true positives. Enter P(A) = 0.01, P(B) = 0.0585 and P(A and B) = 0.009 above to see the same result as a Venn diagram.

Worked example: “at least one”

What is the chance of at least one six in four rolls of a die? Counting the cases with one, two, three or four sixes is tedious; the complement is easy. The chance of no six in one roll is 5/6, so in four independent rolls it is (5/6)4 = 0.482, and the chance of at least one six is 1 − 0.482 = 0.518.

Guide: Combining Probabilities

P(A and B) — the intersection — is the probability that both events happen.

P(A or B) — the union — is the probability that at least one happens, and equals P(A) + P(B) − P(A and B). You subtract the overlap so it isn't double-counted.

Independent: one event happening doesn't change the other's probability, so P(A and B) = P(A)·P(B). Example: two separate coin flips.

Mutually exclusive: the events cannot both happen, so P(A and B) = 0. Example: a single die showing both a 3 and a 5. These are not the same thing — in fact mutually exclusive events are strongly dependent (if one happens, the other definitely didn't).

P(A|B) is the probability of A given that B has occurred. It's calculated as P(A and B) / P(B) — you restrict attention to the world where B happened. If A and B are independent, P(A|B) = P(A), because knowing B tells you nothing about A.

For two events, P(at least one) = P(A or B) = P(A) + P(B) − P(A and B). For many independent events, the fastest route is the complement rule: P(at least one) = 1 − P(none happen). For example, the chance of at least one head in 3 fair coin flips is 1 − (½)³ = 0.875.

Probabilities have to be internally consistent. In general mode, P(A and B) can't exceed either P(A) or P(B), and P(A or B) can't exceed 1. If your numbers break these rules, no real pair of events could produce them, so the calculator flags it.

Related Tools

Permutations & Combinations Binomial Distribution Z-Score All calculators