Four quick ones from earlier work. Try each on paper before you open the answer.
Machine P makes 60% of the items in a factory and 3% of its items are faulty. Machine Q makes the other 40% and 5% of its items are faulty. What is the probability that an item chosen at random is faulty?
Answer
0.6 × 0.03 + 0.4 × 0.05 = 0.018 + 0.02 = 0.038. Add the routes: each branch is a product of the two probabilities along it.
A test gives a positive result for 2% of healthy people. What is the probability that a healthy person tests negative?
Answer
0.98. Given the same condition (healthy), the two outcomes add to 1. The slip is subtracting from the wrong thing, such as using the sensitivity.
P(A ∩ B) = 0.12 and P(B) = 0.3. Find P(A | B).
Answer
0.12 ÷ 0.3 = 0.4. You divide by the probability of the event you were told, here B.
The probabilities of a set of causes that cover every case are 0.35, 0.45 and x. Find x.
Answer
x = 1 − 0.35 − 0.45 = 0.2. Causes that cover every case must add to 1; this is the check the lesson uses on the answers.
Words used in this lesson
prevalence (base rate)
how common the condition is in the whole group. For example: if 5 people in 1000 have it, the prevalence is 0.005.
sensitivity
the chance the test is positive for someone who does have the condition. For example: a test that finds 9 out of every 10 sick people has sensitivity 0.9.
specificity
the chance the test is negative for someone who does not have it. For example: a specificity of 0.97 means 3 in 100 healthy people get a false alarm.
false positive
a positive result for someone who does not have the condition. For example: a fire alarm that rings when there is no fire.
partition
events that do not overlap and between them cover every possibility. For example: “it is Monday”, “it is Tuesday” and so on, for the days of the week.
prior and posterior
the probability before you know the result, and after. For example: P(D) is the prior; P(D | +) is the posterior.
total probability
adding every route to an outcome, each route a product. For example: P(late) = P(rain)P(late | rain) + P(dry)P(late | dry).
given that
you are told this has already happened, so only those cases count. For example: “given that the test is positive”.
interpret
say what the number means in the situation, in words. For example: “about 1 in 25 positives are real” is an interpretation.
hence
use the result you have just found. For example: “find P(B), and hence find P(A | B)”.
Predict first. Before you slide: as the prevalence rises from 1 in 1000, the number of people with the condition (and so true positives) rises. What do you expect to happen to the number of false positives: more, fewer, or about the same? Give a reason.
Then check
Now raise the prevalence and watch both counts in the readouts, not just the verdict. Does the false-positive count do what you predicted? If it surprised you, work out why from how many healthy people there are.
Higher Level
A thousand people. A disease, and a test that is right 99% of the time both
ways. Every dot that tested positive is coloured.
Slide the prevalence and watch which colour there is more of.
1true positives
10false positives
9.1%P(disease | positive)
10 of the 11 positives are wrong. There are simply far more healthy people available to get wrong, and 1% of a large number beats 99% of a tiny one.
Why a good test gives a bad answer
There are far more healthy people to get wrong.
At 1 in 1000, one person in a thousand has it and the test finds them. The other
999 are healthy, and 1% of 999 is about 10 false alarms. So about 10 of the 11
positives are wrong, and a positive result means roughly a 9%
chance, not 99%.
P(D)=0.001 the base rate, or prevalenceP(+ | D)=0.99 sensitivityP(+ | D′)=0.01 1 − specificityP(+)=0.001(0.99) + 0.999(0.01) = 0.01098P(D | +)=0.001 × 0.990.01098
= 0.0902
The rest of this lesson is in the full course
Still to come in this lesson:
The theorem
A second example, finished by you
Check before you go on
Where it decides something
and 4 more
In the full lesson every figure moves as you drag it, and every answer you type is checked, with a note on what each wrong answer means.
IB Diploma plan: AA HL$99Every Diploma lesson in both courses and both levels, so a change of course never locks you out, and every lesson from Year 7 for the refreshers. $99 for 12 months or $149 for 2 years.
One payment. Nothing renews. Full refund within 30 days. Prices are in US$; Gumroad shows your local currency at checkout. Pay by card on Gumroad, then come back here and type the email you paid with: we email you a sign-in link. For a refund, reply to your Gumroad receipt or email hello@ksmaths.com.