Elementary and Conditional Probability
Senior 5 · Mathematics
Elementary and Conditional Probability
Lesson 4 of 4
45 min
A screening test for a disease is 95% accurate on sick people and 90% accurate on healthy ones (illustrative figures). A person tests positive. Most people guess that the chance of disease is about 90%. The true answer, for a disease that affects 2% of people, is about 16%. The tool that gets it right reverses a conditional probability: from , which the test maker knows, to , which the patient wants. It is named after Thomas Bayes, whose essay on it was published in 1763, after his death.
Definition
Events form a partition of if they are mutually exclusive, cover (), and each has . Exactly one of them occurs. The simplest partition is and .
Important
Law of total probability. If is a partition, then for any event
Reason. is the union of the non-overlapping pieces , and . In a tree diagram, this adds the paths that end in .
Bayes' theorem. For each ,
Reason. ; write the numerator with the multiplication rule and the denominator with the law of total probability. is called the prior probability and the posterior probability, after the evidence .
Worked example 1: seed from three suppliers
A cooperative buys maize seed from three suppliers: 40% from , 35% from and 25% from . The proportions of seeds that fail to germinate are 5%, 4% and 10% (illustrative). (a) Find the probability that a seed chosen at random fails. (b) A seed fails. Find the probability that it came from .
Solution. Let = "fails". (a) By the law of total probability,
(b) By Bayes' theorem, . Although supplies only a quarter of the seed, it is responsible for about 42% of the failures. (Similarly and ; the three add to 1.)
Bayes' theorem is easiest to trust when probabilities are turned into counts of an imagined group, "natural frequencies".
Worked example 2: the medical test
A disease affects 2% of a population. A test is positive for 95% of people with the disease and for 10% of people without it (illustrative). A person tests positive. Find the probability that the person has the disease.
Solution. Let = "has the disease" and = "tests positive". The partition is with , .
Only about 16%. The figure shows why: the healthy group is so large that its 10% of false positives (980 people) outnumbers the true positives (190).
Worked example 3: a second test updates the first
The person in worked example 2 takes a second, independent test of the same kind, and it is also positive. Find the new probability of disease.
Solution. Use the posterior from the first test, 0.162, as the new prior:
Two positive results raise the probability to about 65%. This is why doctors confirm a positive screening test with a second test.
Worked example 4: which box?
Box 1 holds 3 red and 2 blue balls; box 2 holds 1 red and 4 blue. A fair coin decides the box, then one ball is drawn. It is red. Find the probability that it came from box 1.
Solution. , so . Seeing red makes box 1 three times as likely as box 2.
Warning
Tip
Stuck? Imagine 10,000 people (or 1,000 seeds), split them along the tree, and count. The final answer is "the paths you want" divided by "all the paths that match the evidence".
3Blue1Brown: Bayes theorem, the geometry of changing beliefs (about 15 min). Watch the evidence shrink the space of possibilities, just like the natural-frequency tree in this lesson.
Practice
Questions 1 to 3 are routine; 4 to 6 need more care; 7 asks for a proof.
Further reading for this unit
Sources and credits