Year 10 Extended · Unit 4 Sets, Venn diagrams and conditional probability · Lesson 6 of 6

A positive test: how much should it change what you believe?

A test result changes what we should believe, but by how much? This lesson reverses a conditional probability with counts and with a tree, and uses it to justify a decision.

Statistics and ProbabilityNo calculator

Warm-up

Three quick ones from earlier work. Try each in your head or on paper before you open the answer.

  1. From lesson 5: P(A) = 0.6 and P(B | A) = 0.5. Find P(A ∩ B).
    Answer0.3. 0.6 × 0.5.
  2. From Year 7: find 8% of 250.
    Answer20. 10% is 25, so 8% is 25 − 5 = 20.
  3. From lesson 4: A and B are independent, P(A) = 0.3 and P(B) = 0.4. Find P(A ∩ B).
    Answer0.12. 0.3 × 0.4.
Words used in this lesson
sensitivity
the share of people with the condition whom the test catches. For example: 90 of every 100 people with it test positive.
false positive
a positive result for a person who does not have the condition. For example: a healthy student told the test is positive.
prevalence
the share of people who have the condition. For example: 1 person in 500.
screening
testing people who have no symptoms to find a condition early. For example: a school health check offered to everyone.
natural frequencies
counts out of a large group instead of probabilities. For example: out of 1000 people, 30 have it.
total probability
the sum over every route of a tree that gives an outcome. For example: P(positive) = true positive route + false positive route.

A positive result

A health service in Johannesburg offers a free test for a condition that affects 1 person in 500. The test gives a positive result for 98% of people who have the condition, and for 3% of people who do not. A student tests positive and is told: “The test is 98% accurate.”

Predict first: out of every 100 people who test positive, about how many do you think actually have the condition? Then use the figure to see how the answer moves when the condition is rarer or more common, and when the false alarm rate changes.

5
90
8
1210test positive
450of them have it
37.2%share who have it

Of 10000 people, 5% have the condition, the test catches 90% and gives a false alarm to 8% of the others: 1210 test positive and 450 of them have it, which is 37.2%.

Show me the steps
  1. Start at 5% with the condition, a test that catches 90% and a false alarm rate of 8%. Of 10000 people, 500 have it and 450 of them test positive. 9500 do not, and 8% of them, 760, also test positive. 450 + 760 = 1210 positives, and 450 of them have the condition: 37.2%.
  2. Set the false alarm rate to 0%: no healthy person tests positive, the 450 positives all have the condition, and the share is 100%.
  3. Put the false alarm rate back to 8% and set the condition to 1%: 100 have it and 90 test positive, but 9900 are healthy and 8% of them, 792, get a false alarm. 90 + 792 = 882 positives and only 10.2% have it. The rarer the condition, the more false alarms swamp the true positives.
  4. Set the condition to 10%, the test to catch 100% and the false alarm rate to 5%: 1000 have it and all 1000 test positive, 9000 are healthy and 450 get a false alarm, so 1000 of 1450 positives, 69%, have it.

Natural frequencies. Imagine a large group, say 10000 people. Split them by the condition. Apply the test rates to each part. Then look only at the people who tested positive and ask what share of them have it.

With a tree. P(has it | positive) = P(has it ∩ positive) ÷ P(positive), where P(positive) is the total of the two routes that end in a positive: P(has it) × P(positive | has it) + P(does not) × P(positive | does not).

The test rates are P(positive | has it) and P(positive | does not). The chance that matters to the person is P(has it | positive). They are different numbers, and the second depends on how common the condition is.

P(positive | has it) is not P(has it | positive). In 1000 people, suppose 10 have a condition and the test finds 9 of them, and it also gives a false alarm to 50 of the 990 who do not. Then 9 + 50 = 59 people test positive, and only 9 of them have it, about 15%. The test finds 90% of cases, yet most positives are false alarms.

Worked examples

1. Of 800 people, 5% have a condition. The test catches 85% of them and gives a false alarm to 10% of the others. Of those who test positive, what share have it?

  1. 5% of 800 = 40 have it, and 85% of 40 = 34 test positive.
  2. 760 do not, and 10% of 760 = 76 test positive.
  3. Positives: 34 + 76 = 110, and the share is 34 ÷ 110 = about 31%.

2. P(has it) = 0.02, P(positive | has it) = 0.9 and P(positive | does not) = 0.05. Find P(has it | positive).

  1. Route 1: 0.02 × 0.9 = 0.018. Route 2: 0.98 × 0.05 = 0.049.
  2. P(positive) = 0.018 + 0.049 = 0.067.
  3. P(has it | positive) = 0.018 ÷ 0.067 = about 0.27.

3. A school screens 5000 students for a condition that affects 2% of them. The test catches 90% and gives a false alarm to 5% of the others. Should every positive student be treated at once?

  1. 100 have it and 90 test positive. 4900 do not, and 5% of them, 245, test positive.
  2. Of 335 positives, 90 have it: 90 ÷ 335, about 27%.
  3. No. About 3 in 4 positives are false alarms, so a positive result should lead to a second, more accurate test before any treatment, and families should be told what a positive result means.

Your go. The first step is given. Of 1000 people, 30 have a condition. The test catches 80% of them and gives a false alarm to 10% of the others. Of those who test positive, what share have it?

  1. 80% of 30 = 24 people with the condition test positive.
  2. Now find the false alarms among the 970 others, add, and divide.
Check the answer

10% of 970 = 97 false alarms, so there are 24 + 97 = 121 positives, and 24 ÷ 121 = about 0.2: one positive in five has it.

Check before you go on

1. In 1000 people, 40 have a condition. The test is positive for 36 of those 40 and for 48 of the 960 who do not. A person tests positive. Which fraction is P(has the condition | positive)?

Your turn

Start at Level 1 and go as far as you can. Type negative numbers with a minus sign, for example -7. A wrong answer gets a reason, not just a cross: read it, then try again.

Level 1 · Getting started

2. Of 500 people, 10% have a condition. The test is positive for 80% of those who have it and for 6% of those who do not. How many of the 500 test positive?

3. Of 1000 people, 20% have a condition. The test is positive for 60% of those who have it and for 5% of those who do not. What is the probability that a person who tests positive has the condition? Give a decimal.

Level 2 · Building

4. P(has it) = 0.1, P(positive | has it) = 0.7 and P(positive | does not) = 0.2. Find P(positive).

5. With the same test, P(has it) = 0.1, P(positive | has it) = 0.7 and P(positive | does not) = 0.2. A person tests positive. Find P(has it | positive).

Level 3 · Stretch

6. A test is positive for 90% of people who have a condition and for 30% of people who do not. What percentage of people must have the condition for exactly half of the positive results to be right?

7. A screening of 10000 people finds a condition that affects 1% of them. The test catches 90% of cases and gives a false alarm to 4% of the others. How many false positives are there for each true positive? Give the answer to one decimal place.

Something to think about

A person tests positive and the chance they have the condition is now 0.27. They take a second, independent test of the same kind (catches 90%, false alarm 5%) and it is also positive. Predict whether the new chance is nearer 0.3, 0.5 or 0.9. Then work it out with a tree whose first branches are 0.27 and 0.73.

One way to think about it

The new chance is 0.27 × 0.9 ÷ (0.27 × 0.9 + 0.73 × 0.05) = 0.243 ÷ (0.243 + 0.0365) = 0.243 ÷ 0.2795, about 0.87. The first positive moved the chance from a small prior to 0.27, and the second moves it from 0.27 to about 0.87. Repeated independent evidence compounds, which is why screening is followed by a second, more accurate test.

Exit ticket

8. A condition affects 0.5% of students. A test catches 90% of cases and gives a false alarm to 5% of the others. A school offers it to all 4000 students. Which statement best justifies what the school should do with a positive result?