How to use these solutions
These are full worked solutions to the eight practice questions in Total Probability and Bayes' Theorem. Try each question yourself first, then compare your working step by step. In every question, begin by naming the partition (the possible "causes" ), write their prior probabilities, and write the probability of the observed event under each cause. Total probability and Bayes' theorem then follow almost mechanically.
Question 1: Probability of drawing a gold coin
The problem
Two boxes: box A has gold and silver coins; box B has gold and silver. A box is picked at random and a coin drawn. Find .
Understanding the problem
There are two stages: first a box is chosen, then a coin from that box. The gold coin could come from either box, so both routes must be counted.
The idea
The events = "box A chosen" and = "box B chosen" form a partition. Use the theorem of total probability:
Step-by-step solution
Step 1. Priors: a box is picked at random.
Step 2. Conditional probabilities of gold. Box A has gold out of ; box B has gold out of .
Step 3. Apply total probability.
Checking the answer
With equal chances for the boxes, is the average of and , which is .
Answer
.
Question 2: Which box did the gold coin come from?
The problem
In question 1 the coin is gold. Find the probability it came from box B.
Understanding the problem
Now you know the result (gold) and must reason backwards to the cause (box B). You want .
The idea
Bayes' theorem:
where the denominator was found in Question 1.
Step-by-step solution
Step 1. Numerator: the probability of the route "box B and gold".
Step 2. Denominator, from Question 1: .
Step 3. Divide.
Checking the answer
, and . It also makes sense that box B, with more gold coins, is the likelier source.
Answer
.
Question 3: Hostel or day student?
The problem
of a college's students live in hostels. of hostel students and of day students score an A grade. A student with an A is chosen at random. Find .
Understanding the problem
The partition is = "hostel student" and = "day student". The observed event is = "scores an A grade". You want .
The idea
Use Bayes' theorem with the two causes and .
Step-by-step solution
Step 1. Priors and conditional probabilities.
Step 2. Probability of each route.
Step 3. Total probability of an A grade.
Step 4. Bayes' theorem.
Checking the answer
Hostel students are fewer () but more likely to get an A ( against ). The two effects balance exactly, since both routes give .
Answer
.
Question 4: Which plant made the faulty item?
The problem
A factory's two plants make and of its output; and of their items are faulty. A faulty item is found. Which plant is more likely to have made it?
Understanding the problem
The partition is = "made in plant 1" and = "made in plant 2". The observed event is = "faulty". Compare and .
The idea
In Bayes' theorem both posteriors have the same denominator , so you only need to compare the numerators . Still, compute the actual probabilities to be complete.
Step-by-step solution
Step 1. Numerators.
Step 2. Total probability of a faulty item.
Step 3. Posteriors.
Step 4. Compare: .
Checking the answer
. Plant 2 makes less, but its fault rate is high enough to outweigh that.
Answer
Plant 2 is more likely: against for plant 1.
Question 5: A positive test result
The problem
A test for a condition has detection and a false-positive rate; the condition affects of people. Find the probability a person who tests positive has it.
Understanding the problem
Key terms:
- " detection" means , where = "has the condition".
- " false-positive rate" means : a healthy person tests positive of the time.
- "Affects " means , so .
You want .
The idea
Bayes' theorem with the partition , .
Step-by-step solution
Step 1. Probability of a true positive route.
Step 2. Probability of a false positive route.
Step 3. Total probability of a positive test.
Step 4. Bayes' theorem.
Checking the answer
Think of people: have the condition and about of them test positive; of the healthy people, test positive. So . Same answer.
Answer
.
Common mistake to avoid
Do not answer . That is , the reverse of what is asked.
Question 6: A report that a die showed one
The problem
A woman tells the truth times in . She reports that a die showed a one. Find the probability that it really did.
Understanding the problem
The partition is = "the die showed one" and = "the die did not show one". The observed event is = "she reports a one". She reports a one either when it was a one and she tells the truth, or when it was not a one and she lies.
The idea
Bayes' theorem:
Step-by-step solution
Step 1. Priors from a fair die.
Step 2. Conditional probabilities of the report.
Step 3. Probability of each route.
Step 4. Bayes' theorem.
Checking the answer
Even though she is usually truthful, a one is rare (), so the lie route () is slightly more likely than the truth route (). The answer below makes sense.
Answer
The probability that the die really showed a one is .
Question 7: Three coins, one shows heads
The problem
Of three coins, one is two-headed, one is biased to show heads of the time, and one is fair. A coin is chosen at random and shows heads. Find the probability it is the two-headed coin.
Understanding the problem
The partition is = two-headed coin, = biased coin, = fair coin, each chosen with probability . The observed event is = "heads". You want .
The idea
Bayes' theorem with three causes. Because the priors are all equal, they cancel.
Step-by-step solution
Step 1. Conditional probabilities of heads.
Step 2. Bayes' theorem.
Step 3. Cancel and simplify.
Checking the answer
The other posteriors are and . Then . Correct.
Answer
.
Question 8: Why an accurate test can mislead
The problem
Explain in one sentence why a test with high accuracy can still give mostly false positives.
Understanding the problem
You are asked for a reason, not a number. Think about Example 3 of the lesson and Question 5 above.
The idea
In Bayes' theorem, the number of true positives depends on the prior . When that prior is tiny, the healthy group is huge, and even a small false-positive rate applied to it gives many positives.
Step-by-step solution
Step 1. Recall Example 3: prevalence, detection, false positives. Out of people, about true positives and false positives.
Step 2. So only about of positives are genuine, even though the test itself is accurate.
Step 3. The cause is the rarity of the condition, which makes the healthy group very large.
Checking the answer
If the condition were common (say ), the same test would give . So the prior really is what drives the effect.
Answer
When the condition is rare, the few true positives are outnumbered by the false positives coming from the much larger healthy group.