SOLVER7 Study. Nothing Else.
Chapter 13 Examples Q18

Suppose that the reliability of a HIV test is specified as follows: Of people having HIV, 90% of the test detect the disease but 10% go undetected. Of people free of HIV, 99% of the test are judged HIV–ive but 1% are diagnosed as showing HIV+ive. From a large population of which only 0.1% have HIV, one person is selected at random, given the HIV test, and the pathologist reports him/her as HIV+ive. What is the probability that the person actually has HIV?

CBSE Class 12 Maths · Probability

Solution

👶 Simple Explanation

Simple Explanation

Imagine a town of 1000 people where only 1 person truly has HIV. A test can spot sick people well, but sometimes it also wrongly flags healthy people. Because so many more people are healthy, even rare mistakes pile up fast. So when the test says positive, most of those positives are actually healthy people flagged by mistake. That is why, even with a good test, a positive result does not always mean you are truly sick — the final chance is only about 8 out of 100.

Answer: The probability that the person actually has HIV is \(\dfrac{90}{1089} \approx 0.083\), that is about \(8.3\%\).

📖 HIV Test Reliability — Bayes' Theorem Application

Detailed Explanation

This is a classic Bayes' theorem problem. We are told the result of the test (positive) and asked to find the probability of the actual cause (having HIV). Bayes' theorem lets us reverse conditional probabilities: instead of asking "given HIV, what is the chance of a positive test", we ask "given a positive test, what is the chance of HIV". A key idea is that even a good test can give a low probability of actually being sick when the disease is very rare in the population, because there are so many more healthy people that even a small false-positive rate produces many positive results.

Formula Used

Bayes' theorem: \[P(E_1 \mid A) = \dfrac{P(E_1)\,P(A \mid E_1)}{P(E_1)\,P(A \mid E_1) + P(E_2)\,P(A \mid E_2)}\]

Solution

  1. Step 1: Define the events. Let \(E_1\) be the event that the person has HIV, and \(E_2\) be the event that the person is free of HIV. Let \(A\) be the event that the test reports the person as HIV positive.
  2. Step 2: Write down the prior probabilities from the population data. Since only \(0.1\%\) of the population have HIV: \[P(E_1) = \frac{0.1}{100} = 0.001\] \[P(E_2) = 1 - 0.001 = 0.999\]
  3. Step 3: Write down the conditional probabilities of a positive test. Of people having HIV, \(90\%\) test positive: \[P(A \mid E_1) = \frac{90}{100} = 0.9\] Of people free of HIV, \(1\%\) are wrongly diagnosed as positive: \[P(A \mid E_2) = \frac{1}{100} = 0.01\]
  4. Step 4: We want \(P(E_1 \mid A)\), the probability that the person actually has HIV given a positive report. Apply Bayes' theorem: \[P(E_1 \mid A) = \frac{P(E_1)\,P(A \mid E_1)}{P(E_1)\,P(A \mid E_1) + P(E_2)\,P(A \mid E_2)}\]
  5. Step 5: Substitute all the values: \[P(E_1 \mid A) = \frac{0.001 \times 0.9}{0.001 \times 0.9 + 0.999 \times 0.01}\]
  6. Step 6: Compute the numerator and denominator. Numerator: \[0.001 \times 0.9 = 0.0009\] Denominator: \[0.0009 + 0.999 \times 0.01 = 0.0009 + 0.00999 = 0.01089\]
  7. Step 7: Divide to get the final probability: \[P(E_1 \mid A) = \frac{0.0009}{0.01089} = \frac{90}{1089} = \frac{30}{363} \approx 0.0826\]
  8. Step 8: Interpret the result. Even though the test is quite accurate, the probability that a person reported positive actually has HIV is only about \(8.26\%\). This is because HIV is very rare, so most positive results come from false positives among the huge healthy population.

Final Answer

The probability that the person actually has HIV is \(\dfrac{90}{1089} \approx 0.083\), that is about \(8.3\%\).

Common Mistake

A common mistake is to answer \(0.9\), thinking that because the test detects \(90\%\) of HIV cases the person must have a \(90\%\) chance of being infected. This ignores the prior probability \(P(E_1)\) and the false positives from the large healthy population, which Bayes' theorem correctly accounts for.

🪜 Step-by-step Solution

Step-by-step Solution

  1. Step 1: Name the Events: Define: Let \(E_1\) = event that the person has HIV, \(E_2\) = event that the person does not have HIV, and \(A\) = event that the test result is positive. — Reason: Giving clear names to events avoids confusion when setting up Bayes' theorem.
  2. Step 2: Assign Prior Probabilities from Population Data: Since only \(0.1\%\) of the population carries HIV, the prior probabilities are: \[P(E_1) = \frac{0.1}{100} = 0.001\] and \[P(E_2) = 1 - 0.001 = 0.999\] — Reason: These priors reflect how rare HIV actually is in the population before any test is considered, and they will heavily influence the final answer.
  3. Step 3: Record the Conditional (Likelihood) Probabilities: The test correctly detects HIV in \(90\%\) of infected people, so \[P(A \mid E_1) = \frac{90}{100} = 0.9\] The test wrongly gives a positive result to \(1\%\) of healthy people (false-positive rate), so \[P(A \mid E_2) = \frac{1}{100} = 0.01\] — Reason: These numbers describe how reliable the test is; both the true-positive rate and the false-positive rate are needed for Bayes' theorem.
  4. Step 4: Compute the Total Probability of a Positive Test: Using the law of total probability, the overall chance of testing positive is: \[P(A) = P(E_1)\,P(A \mid E_1) + P(E_2)\,P(A \mid E_2)\] Substituting the values: \[P(A) = (0.001)(0.9) + (0.999)(0.01)\] \[P(A) = 0.0009 + 0.00999 = 0.01089\] — Reason: This denominator accounts for all the ways a positive result can occur, whether the person truly has HIV or is a false positive.
  5. Step 5: Apply Bayes' Theorem: Now compute \(P(E_1 \mid A)\), the probability that the person actually has HIV given a positive test: \[P(E_1 \mid A) = \frac{P(E_1)\,P(A \mid E_1)}{P(A)} = \frac{0.001 \times 0.9}{0.01089}\] \[P(E_1 \mid A) = \frac{0.0009}{0.01089}\] — Reason: Bayes' theorem isolates the specific scenario (HIV + positive test) out of all scenarios that produce a positive test.
  6. Step 6: Simplify to Obtain the Final Fraction: Multiply numerator and denominator by \(10000\) to clear decimals: \[\frac{0.0009}{0.01089} = \frac{9}{108.9} = \frac{90}{1089}\] In decimal form: \[\frac{90}{1089} \approx 0.083\] — Reason: Expressing the answer as both a fraction and a decimal makes it easy to interpret; roughly only \(8.3\%\) of people who test positive actually have HIV.

Final Answer

The probability that the person actually has HIV is \(\dfrac{90}{1089} \approx 0.083\), that is about \(8.3\%\).

Common Mistake

One common mistake: students forget to include the false-positive contribution \(P(E_2)\,P(A \mid E_2)\) in the denominator, writing only \(P(E_1)\,P(A \mid E_1)\) below the fraction line — this misses all the healthy people who also test positive and dramatically overstates the probability of actually having HIV.

✍️ Exam-ready Answer

Exam-ready Answer

  1. Step 1: Assign probabilities: \(P(E_1) = 0.001,\quad P(E_2) = 0.999,\quad P(A \mid E_1) = 0.9,\quad P(A \mid E_2) = 0.01\)
  2. Step 2: Compute total probability of positive test: \(P(A) = (0.001)(0.9) + (0.999)(0.01) = 0.0009 + 0.00999 = 0.01089\)
  3. Step 3: Apply Bayes' theorem: \(P(E_1 \mid A) = \dfrac{(0.001)(0.9)}{0.01089} = \dfrac{0.0009}{0.01089} = \dfrac{90}{1089} \approx 0.083\)

Answer: The probability that the person actually has HIV is \(\dfrac{90}{1089} \approx 0.083\), that is about \(8.3\%\).

➕ More Examples

More Examples

Example 1

Question: A rare genetic disorder affects 0.5% of a large population. A diagnostic test for this disorder is 95% accurate for people who have the disorder (i.e., it correctly identifies 95% of affected individuals as positive, and misses 5%). For people who do not have the disorder, the test correctly gives a negative result 98% of the time, but gives a false positive 2% of the time. A person is chosen at random from the population and tested. The test result comes back positive. Find the probability that the person actually has the genetic disorder.

Solution: Let us define the following events: Let \( H_1 \) = event that the person has the disorder. Let \( H_2 \) = event that the person does not have the disorder. Let \( E \) = event that the test result is positive. Step 1: Write the prior probabilities. \[P(H_1) = \frac{0.5}{100} = 0.005\] \[P(H_2) = 1 - 0.005 = 0.995\] Step 2: Write the likelihoods (conditional probabilities of a positive test). For a person who has the disorder, the test is positive 95% of the time: \[P(E \mid H_1) = \frac{95}{100} = 0.95\] For a person who does not have the disorder, the test gives a false positive 2% of the time: \[P(E \mid H_2) = \frac{2}{100} = 0.02\] Step 3: Use the Total Probability Theorem to find \( P(E) \). \[P(E) = P(H_1) \cdot P(E \mid H_1) + P(H_2) \cdot P(E \mid H_2)\] \[P(E) = (0.005)(0.95) + (0.995)(0.02)\] \[P(E) = 0.00475 + 0.01990 = 0.02465\] Step 4: Apply Bayes' Theorem. \[P(H_1 \mid E) = \frac{P(H_1) \cdot P(E \mid H_1)}{P(E)}\] \[P(H_1 \mid E) = \frac{0.005 \times 0.95}{0.02465}\] \[P(H_1 \mid E) = \frac{0.00475}{0.02465}\] Multiplying numerator and denominator by 100000 to simplify: \[P(H_1 \mid E) = \frac{475}{2465} = \frac{95}{493}\] As a decimal, this is approximately \( 0.1927 \), i.e., about 19.27%.

Answer: \( P(H_1 \mid E) = \dfrac{95}{493} \approx 0.1927 \) (approximately 19.27%)

Example 2

Question: In a factory, machines A and B produce electronic components. Machine A produces 60% of the total output and machine B produces the remaining 40%. Among the components produced by machine A, 3% are defective. Among the components produced by machine B, 5% are defective. A component is chosen at random from the combined output and is found to be defective. Using Bayes' Theorem, find the probability that the defective component was produced by machine B.

Solution: Let us define the following events: Let \( H_1 \) = event that the component was produced by machine A. Let \( H_2 \) = event that the component was produced by machine B. Let \( E \) = event that the component is defective. Step 1: Write the prior probabilities. \[P(H_1) = \frac{60}{100} = 0.6\] \[P(H_2) = \frac{40}{100} = 0.4\] Step 2: Write the likelihoods. \[P(E \mid H_1) = \frac{3}{100} = 0.03\] \[P(E \mid H_2) = \frac{5}{100} = 0.05\] Step 3: Use the Total Probability Theorem to find \( P(E) \). \[P(E) = P(H_1) \cdot P(E \mid H_1) + P(H_2) \cdot P(E \mid H_2)\] \[P(E) = (0.6)(0.03) + (0.4)(0.05)\] \[P(E) = 0.018 + 0.020 = 0.038\] Step 4: Apply Bayes' Theorem to find the probability that the defective component came from machine B. \[P(H_2 \mid E) = \frac{P(H_2) \cdot P(E \mid H_2)}{P(E)}\] \[P(H_2 \mid E) = \frac{0.4 \times 0.05}{0.038}\] \[P(H_2 \mid E) = \frac{0.020}{0.038}\] Multiplying numerator and denominator by 1000: \[P(H_2 \mid E) = \frac{20}{38} = \frac{10}{19}\] As a decimal, this is approximately \( 0.5263 \), i.e., about 52.63%.

Answer: \( P(H_2 \mid E) = \dfrac{10}{19} \approx 0.5263 \) (approximately 52.63%)

🎯 Try a Similar Question

Try a Similar Question

Question: The reliability of a test for a rare blood disorder is as follows: Of people who actually have the disorder, 95% test positive, while 5% go undetected (false negatives). Of people who do not have the disorder, 98% test negative, but 2% are incorrectly diagnosed as positive (false positives). In a large population, only 0.5% of people have this blood disorder. A person is chosen at random, tested, and the result comes back positive. What is the probability that the person actually has the blood disorder?

Solution

  1. Step 1: Define the Events: Let \( E_1 \) be the event that the person has the blood disorder, and \( E_2 \) be the event that the person does not have the blood disorder. Let \( A \) be the event that the test result is positive.
  2. Step 2: Write the Prior Probabilities: Since 0.5% of the population has the disorder: \[ P(E_1) = 0.005 \] and \[ P(E_2) = 1 - 0.005 = 0.995 \]
  3. Step 3: Write the Conditional Probabilities (Likelihoods): The probability of testing positive given the person has the disorder is \( P(A \mid E_1) = 0.95 \). The probability of testing positive given the person does not have the disorder (false positive) is \( P(A \mid E_2) = 0.02 \).
  4. Step 4: Compute the Total Probability of a Positive Test: Using the law of total probability: \[ P(A) = P(E_1) \cdot P(A \mid E_1) + P(E_2) \cdot P(A \mid E_2) \] \[ P(A) = (0.005)(0.95) + (0.995)(0.02) \] \[ P(A) = 0.00475 + 0.01990 = 0.02465 \]
  5. Step 5: Apply Bayes' Theorem: The probability that the person actually has the disorder given a positive test is: \[ P(E_1 \mid A) = \frac{P(E_1) \cdot P(A \mid E_1)}{P(A)} \] \[ P(E_1 \mid A) = \frac{(0.005)(0.95)}{0.02465} = \frac{0.00475}{0.02465} \]
  6. Step 6: Simplify the Result: Converting to fractions for exactness: \( P(E_1) = \frac{5}{1000} \), \( P(A \mid E_1) = \frac{95}{100} \), and \( P(A \mid E_2) = \frac{2}{100} \), \( P(E_2) = \frac{995}{1000} \). So the numerator is \[ \frac{5}{1000} \times \frac{95}{100} = \frac{475}{100000} \] and the denominator is \[ \frac{475}{100000} + \frac{1990}{100000} = \frac{2465}{100000} \] Therefore \[ P(E_1 \mid A) = \frac{475}{2465} = \frac{95}{493} \approx 0.1927 \]

Answer: The probability that the person actually has the blood disorder, given a positive test, is \( \dfrac{95}{493} \approx 0.1927 \), that is approximately \( 19.3\% \).

Everything you get with Solver7

More questions in Probability

Chapter 13 Examples Q1 65/4/1 2022 / Section A Q1 Chapter 13 Examples Q2 65/4/1 2022 / Section A Q2(a) Chapter 13 Examples Q3 65/4/1 2022 / Section A Q2(b) 65/4/2 2024 / Section A Q3 Chapter 13 Examples Q4 65/2/3 2026 / Section A Q4 Chapter 13 Examples Q5 65/2/1 2022 / Section A Q4 Chapter 13 Examples Q6 65/2/1 2022 / Section A Q5 Chapter 13 Examples Q7 Chapter 13 Examples Q8 65/2/2 2023 / Section A Q8 Chapter 13 Examples Q9 Chapter 13 Examples Q10 Chapter 13 Examples Q11 65/1/1 2024 / Section A Q11 65/2/1 2024 / Section A Q11 65/3/1 2024 / Section A Q11 Chapter 13 Examples Q12 65/1/1 2023 / Section A Q12 Chapter 13 Examples Q13 Chapter 13 Examples Q14 65/3/1 2023 / Section A Q14 Chapter 13 Examples Q15 Chapter 13 Examples Q16 65(B) 2026 / Section A Q16 Chapter 13 Examples Q17 65(B) 2026 / Section A Q17 65(B) 2026 / Section A Q18 65/2/1 2022 / Section C Q14(a) 65/3/1 2026 / Section A Q18 65/4/1 2023 / Section A Q18 65/4/1 2026 / Section A Q18 65/5/1 2026 / Section A Q18 Chapter 13 Examples Q19 65/1/1 2026 / Section A Q19 65/2/1 2022 / Section C Q14(b) 65/4/1 2022 / Section C Q14(a) Chapter 13 Examples Q20 65(B) 2026 / Section A Q20 65/4/1 2022 / Section C Q14(b) Chapter 13 Examples Q21 Chapter 13 Miscellaneous Examples Q22 Chapter 13 Miscellaneous Examples Q23 Chapter 13 Miscellaneous Examples Q24 Exercise 13.1 Q1 Exercise 13.1 Q2 Exercise 13.1 Q3(i) Exercise 13.1 Q3(ii) 65/2/3 2026 / Section C Q26(a)i Exercise 13.1 Q3(iii) 65/2/3 2026 / Section C Q26(a)ii Exercise 13.1 Q4 65/2/3 2026 / Section C Q26(b) Exercise 13.1 Q5(i) 65/2/2 2023 / Section C Q28(a)