Practice: Conditional Probability, Total Probability and Bayes' Rule
Question
Direct application
Among 100 students:
| Passed | Failed | |
|---|---|---|
| Studied | 45 | 15 |
| Did not study | 10 | 30 |
What is
Enter the value. It is checked against the answer and the precision this task asks for.
2 hints available, least help first.
Hint 1: Retrieval cue
Conditioning on 'studied' means only the students in that row are still in play.
Hint 2: Concept cue
How many students are in the 'studied' row altogether, and how many of those passed?
Interpretation
A condition affects 2% of a population. A test detects it in 90% of those who have it, and gives a false positive for 10% of those who do not.
Someone tests positive. Roughly how likely are they to have the condition?
2 hints available, least help first.
Hint 1: Retrieval cue
Take 1000 people and count how many land in each of the four categories.
Hint 2: Concept cue
Of everyone who tests positive, what fraction actually has the condition? Compare the true positives with the false ones.
Classification · Error diagnosis
A screening programme reports: "Of the people who have the condition, 80% are correctly flagged by our test."
A newspaper summarises this as: "If you are flagged, there is an 80% chance you have the condition."
Which statement correctly identifies the difference between the two claims?
2 hints available, least help first.
Hint 1: Retrieval cue
For each claim, ask: which group of people is the percentage taken out of?
Hint 2: Concept cue
Write each claim as
Construction · Direct application · Explanation
(a) From this table of 100 students, studied/passed 45, studied/failed 15, did not study/passed 10, did not study/failed 30, compute
(b) Decide whether studying and passing are independent, and verify your answer by the law of total probability.
(c) A disease affects 1% of a population; a test has 99% sensitivity and 95% specificity. Compute
(d) Recompute the posterior in (c) for a population where the disease affects 50%, and say what that implies about reporting a posterior.
Write your answer, then compare it with the worked solution.
3 hints available, least help first.
Hint 1: Retrieval cue
In (a), ask what set each question restricts attention to before dividing anything.
Hint 2: Concept cue
In (c), count a concrete population of 10,000 rather than reaching for the formula.
Hint 3: Strategy cue
In (d), change only the base rate and keep both likelihoods fixed.
Compare with the worked solution
Comparing does not record a result. Judging your own written answer cannot show that you can do this without help.
(a) The table, both directions. Row totals: studied
Conditioning on studying discards the other row and renormalises within the 60 that remain:
Conditioning the other way divides by the column of 55 instead:
Same numerator 45, different denominators 60 and 55. The first divides by a row total, the second by a column total, and that is the whole of the asymmetry: conditioning on an event means dividing by that event's probability, so changing which event is conditioned on changes the denominator. Dividing by the grand total of 100 instead would give the joint probability
(b) Independence. It would require
Not equal, so they are dependent ✓. The conditionals say the same thing more vividly:
Check by total probability: studying and not studying partition the students, so
matching the column total exactly.
(c) The positive test. Base rate first:
By natural frequencies, over 10,000 people:
| Test + | Test − | Total | |
|---|---|---|---|
| Disease | 99 | 1 | 100 |
| No disease | 495 | 9,405 | 9,900 |
| Total | 594 | 9,406 | 10,000 |
1% of 10,000 is 100 diseased, and 99% of them test positive: 99. Of the 9,900 healthy, 5% test positive anyway: 495. Conditioning on a positive result restricts to the 594 in that column:
By Bayes' rule. The denominator comes from total probability:
Same answer exactly, since they are the same computation, with the table making the denominator visible as a count.
Why so far from 99%. Two reasons, both structural. First, 99% was the wrong conditional:
(d) The same test, a different population. With a 50% base rate the likelihoods are unchanged but the weights are not:
about 95% rather than 17%. Identical test, identical sensitivity and specificity, different population, and the posterior moves by a factor of more than five.
So a posterior is not a property of the test. It is a property of the test and the population it was applied to, which is why it must be reported with the base rate it assumes. A screening figure quoted in a symptomatic clinic, or the reverse, is not a conservative approximation; it is a different number answering a different question.
A complete answer does each of these:
- computes conditional
- tracks conditioning direction
- applies bayes
Session complete
Every question in this set has been through once. What you can do now depends on how it went — practising again is worth more than moving on if any of it was uncertain.
Practice data
Your practice record is stored in this browser only. Clearing it removes every answer and every scheduled review, and cannot be undone.