Class 12 Maths, Worked in Full Past papersGet updates
Chapter 13 · Probability

Exercise 13.3 · Q5: Blood test: has the disease, given a positive result, P=22133P = \frac{22}{133}

Exercise 13.3Bayes' theorem · Section 13.5
The question

A laboratory blood test is 99% effective in detecting a certain disease when it is in fact, present. However, the test also yields a false positive result for 0.5% of the healthy person tested (i.e. if a healthy person is tested, then, with probability 0.005, the test will imply he has the disease). If 0.1 percent of the population actually has the disease, what is the probability that a person has the disease given that his test result is positive ?

Exam answer

Let E1E_1⁠: the person has the disease, E2E_2⁠: the person does not have the disease, and AA⁠: the test result is positive.

E1E_1 and E2E_2 form a partition of the sample space (a person either has the disease or not).

P(E1)=0.1%=11000P(E_1) = 0.1\% = \frac{1}{1000}

P(E2)=1−11000=9991000P(E_2) = 1 - \frac{1}{1000} = \frac{999}{1000}

P(A∣E1)=99%=99100P(A|E_1) = 99\% = \frac{99}{100}

P(A∣E2)=0.5%=1200P(A|E_2) = 0.5\% = \frac{1}{200}

By the theorem of total probability,

P(A)=P(E1)P(A∣E1)+P(E2)P(A∣E2)=11000⋅99100+9991000⋅1200=198200000+999200000=1197200000\begin{aligned} P(A) &= P(E_1)P(A|E_1) \\ &\quad + P(E_2)P(A|E_2) \\ &= \frac{1}{1000}\cdot\frac{99}{100} \\ &\quad + \frac{999}{1000}\cdot\frac{1}{200} \\ &= \frac{198}{200000} + \frac{999}{200000} \\ &= \frac{1197}{200000} \end{aligned}

By Bayes' theorem,

P(E1∣A)=P(E1)P(A∣E1)P(A)=198200000÷1197200000=1981197\begin{aligned} P(E_1|A) &= \frac{P(E_1)P(A|E_1)}{P(A)} \\ &= \frac{198}{200000} \div \frac{1197}{200000} \\ &= \frac{198}{1197} \end{aligned}

∴\therefore The probability that the person has the disease, given a positive result, is 1981197=22133\dfrac{198}{1197} = \dfrac{22}{133} (dividing by 9).

Want the reason behind every step, the basics and the checks?

The one idea this problem is built on

A positive result can come from a sick person (the test works) or from a healthy person (a false positive). The test is very good, but the disease is very rare: there are about a thousand healthy people for every sick one. So the few false positives among the many healthy people outnumber the true positives, and a positive result still leaves the disease fairly unlikely. Bayes' theorem puts an exact number on this.

Given, to find, and the plan
Given
0.1% of the population has the disease. The test is positive for 99% of people with the disease and for 0.5% of healthy people.
To find
The probability that a person has the disease, given that the test is positive: P(E1∣A)P(E_1|A)⁠.
Plan
(1) Name the events; check the partition. (2) Turn the percentages into fractions. (3) Total probability for P(A)P(A)⁠. (4) Bayes' theorem, then simplify.

Basics you need

1Percentages and decimals as fractions

x%=x100x\% = \frac{x}{100}⁠; so 0.1%=0.1100=110000.1\% = \frac{0.1}{100} = \frac{1}{1000} and 0.5%=0.005=12000.5\% = 0.005 = \frac{1}{200}⁠. Basics: classical probability

2Reading test data as conditional probabilities (Section 13.2)

"99% effective when the disease is present" is P(positive∣disease)P(\text{positive} \mid \text{disease})⁠; a "false positive for 0.5% of the healthy" is P(positive∣healthy)P(\text{positive} \mid \text{healthy})⁠. Lesson: conditional probability

3Complement

P(E′)=1−P(E)P(E') = 1 - P(E)⁠: the healthy share is 1−110001 - \frac{1}{1000}⁠. Basics: rules of probability

4Total probability and Bayes' theorem (Section 13.5)

P(A)P(A) is the sum of the paths to AA⁠; P(E1∣A)P(E_1|A) is the E1E_1 path divided by P(A)P(A)⁠. Lesson: Bayes' theorem

Solution

  1. Name the events

    Let

    • E1E_1⁠: the person tested has the disease;
    • E2E_2⁠: the person tested does not have the disease (is healthy);
    • AA⁠: the test result is positive.

    E1E_1 and E2E_2 form a partition of the sample space: E2E_2 is the complement of E1E_1⁠, and both have nonzero probability.

    "Has the disease" and "healthy" are the two possible causes; the positive result is what we observe. An event and its complement form a partition when both have nonzero probability (Section 13.5.1), as here: 11000\frac{1}{1000} and 9991000\frac{999}{1000}⁠.
    {E,E′}\{E, E'\} is a partition when EE is neither impossible nor certain. Lesson: Bayes' theorem
  2. Every number as a fraction

    P(E1)=0.1%=0.1100=11000,P(E2)=1−11000=9991000,P(A∣E1)=99%=99100,P(A∣E2)=0.5%=0.005=1200.\begin{aligned} P(E_1) &= 0.1\% = \frac{0.1}{100} = \frac{1}{1000}, \\ P(E_2) &= 1 - \frac{1}{1000} = \frac{999}{1000}, \\ P(A|E_1) &= 99\% = \frac{99}{100}, \\ P(A|E_2) &= 0.5\% = 0.005 = \frac{1}{200}. \end{aligned}
    "0.1 percent of the population actually has the disease" gives the chance that a person picked from the population has it. "99% effective in detecting" is about people who have the disease, so it is P(A∣E1)P(A|E_1)⁠. The false-positive rate is about healthy people, so it is P(A∣E2)P(A|E_2)⁠; the book itself writes it as the probability 0.005. Fractions keep everything exact: 0.005=51000=12000.005 = \frac{5}{1000} = \frac{1}{200}⁠.
    x%=x100x\% = \frac{x}{100}⁠, and P(E′)=1−P(E)P(E') = 1 - P(E)⁠. Basics: rules of probability
  3. The chance of a positive result

    Since E1E_1 and E2E_2 form a partition, by the theorem of total probability

    P(A)=P(E1)P(A∣E1)+P(E2)P(A∣E2)=11000⋅99100+9991000⋅1200=99100000+999200000=198200000+999200000=1197200000.\begin{aligned} P(A) &= P(E_1)P(A|E_1) \\ &\quad + P(E_2)P(A|E_2) \\ &= \frac{1}{1000}\cdot\frac{99}{100} + \frac{999}{1000}\cdot\frac{1}{200} \\ &= \frac{99}{100000} + \frac{999}{200000} \\ &= \frac{198}{200000} + \frac{999}{200000} \\ &= \frac{1197}{200000}. \end{aligned}
    start health test result multiply along the path person E₁: disease A: positive 1/1000 × 99/100 A′: negative 1/1000 × 1/100 E₂: healthy A: positive 999/1000 × 1/200 A′: negative 999/1000 × 199/200 1/1000 99/100 1/100 999/1000 1/200 199/200
    The tree for Question 5. The rose path (disease, then positive) has product 99100000\frac{99}{100000}⁠; the green path (healthy, then a false positive) has 999200000\frac{999}{200000}⁠, about five times as much.
    A positive result happens through a true positive or a false positive, never both, so the two path probabilities add. To add them, write 99100000\frac{99}{100000} as 198200000\frac{198}{200000}⁠.
    Multiply along a path, add the paths. Basics: tree diagrams
  4. Has the disease, given positive: Bayes' theorem

    By Bayes' theorem,

    P(E1∣A)=P(E1)P(A∣E1)P(A)=198200000÷1197200000=1981197.\begin{aligned} P(E_1|A) &= \frac{P(E_1)P(A|E_1)}{P(A)} \\ &= \frac{198}{200000} \div \frac{1197}{200000} \\ &= \frac{198}{1197}. \end{aligned}

    Both 198 and 1197 are divisible by 9: 198=9×22198 = 9 \times 22 and 1197=9×1331197 = 9 \times 133⁠. So

    P(E1∣A)=22133≈0.165.P(E_1|A) = \frac{22}{133} \approx 0.165.
    The top is the true-positive path; the bottom is all positive results. The common denominator 200000 cancels. No further cancelling is possible: 22=2×1122 = 2 \times 11 and 133=7×19133 = 7 \times 19 have no common factor.
    Simplify by the highest common factor, here 9. Basics: working with fractions
  5. What the answer means

    Only about 16.5% of people who test positive actually have the disease. The other positives (about 83.5%) are false alarms: P(E2∣A)=9991197=111133P(E_2|A) = \frac{999}{1197} = \frac{111}{133}⁠, and 22133+111133=1\frac{22}{133} + \frac{111}{133} = 1⁠.

    The test is not useless: it raised the chance of disease from 11000\frac{1}{1000} to 22133\frac{22}{133}⁠, more than 160 times. But the disease is so rare that a positive result calls for a second test, not a diagnosis.

    A healthy person is about 1000 times as common as a sick one, and a false positive happens for 1 healthy person in 200. Those false positives outnumber the true ones about 5 to 1.
    P(E1∣A)+P(E2∣A)=1P(E_1|A) + P(E_2|A) = 1 for a partition. Lesson: Bayes' theorem
Result

The probability that a person has the disease, given that the test is positive, is 22133\frac{22}{133} (about 0.165). (Textbook answer: 22133\frac{22}{133}⁠.)

Check it with numbers

Picture 1 000 000 people. 0.1%0.1\% of them, 1000, have the disease, and 99% of these, 990, test positive. The other 999 000 are healthy, and 0.5% of them, 4995, test positive too. So 990+4995=5985990 + 4995 = 5985 people test positive, and only 990 of them are ill: 9905985≈0.16541\frac{990}{5985} \approx 0.16541⁠, the same as 22133≈0.16541\frac{22}{133} \approx 0.16541⁠.

Common mistakes
  1. Answering 0.99. 99% is P(A∣E1)P(A|E_1)⁠, the chance of a positive test for a sick person. The question asks for P(E1∣A)P(E_1|A)⁠, the chance of being sick for a person who tests positive.
  2. Writing 0.1% as 1100\frac{1}{100}⁠. 0.1%=0.1100=110000.1\% = \frac{0.1}{100} = \frac{1}{1000}⁠.
  3. Forgetting the false positives. P(A)P(A) must include the healthy people who test positive, 9991000⋅1200\frac{999}{1000} \cdot \frac{1}{200}⁠; without them the answer would wrongly be 1.
  4. Leaving 1981197\frac{198}{1197} unsimplified. Divide by 9 to get 22133\frac{22}{133}⁠.
What to take away
  1. For a rare condition, even a very accurate test gives many false positives, because there are so many healthy people. Bayes' theorem shows this exactly.
  2. Picturing a large round population (here a million) turns the question into counting and is a quick check.
  3. Book Example 18 (an HIV test, Examples 15 to 21) shows the same effect. For a cause that is common and nearly always gives the result, see Question 4.

Every fact used, and where it comes from

FactUsed inSource
An event and its complement form a partitionStep 1Section 13.5.1 (Lesson: Bayes' theorem)
x%=x100x\% = \frac{x}{100} and P(E′)=1−P(E)P(E') = 1 - P(E)Step 2Class XI (Basics: rules of probability)
Conditional probability P(A∣E)P(A|E)Step 2Section 13.2 (Lesson: conditional probability)
Theorem of total probabilityStep 3Section 13.5.2 (Lesson: Bayes' theorem)
Bayes' theoremSteps 4, 5Section 13.5; Example 18 is a similar test question (Examples 15 to 21)
Cancelling a common factorStep 4Arithmetic (Basics: working with fractions)
Found an error, or want more?

Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →