Q.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 HIVive but 1% are diagnosed as showing HIVive. 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 HIVive. What is the probability that the person actually has HIV?
You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.
Start your 14-day free trial to unlock the full solution →This is a classic Bayes' theorem problem. We are given the test's sensitivity (90% true positive rate) and specificity (99% true negative rate), and a very low disease prevalence (0.1%). Even with a positive test result, the probability that the person actually has HIV is only about 8.3% — because the false positives from the huge healthy population swamp the true positives.
Why Bayes' theorem is the natural tool
We want . That's a conditional probability where the condition (the test result) is observed, but we need to reverse the direction of the given conditional probabilities. The test tells us and , but we need the inverse.
Bayes' theorem is exactly the formula for this reversal. It combines:
- The prior probability of having HIV (the population prevalence: 0.1%)
- The likelihood of a positive test given HIV (90%)
- The total probability of a positive test (which includes both true positives and false positives)
The result is the posterior probability — our updated belief after seeing the positive test.
Step-by-step solution
1. Define the events clearly
Let = person has HIV, and = test reports positive.
From the problem:
- (prevalence)
- (sensitivity — true positive rate)
- (specificity — true negative rate)
Therefore:
- (false positive rate)
2. Find the total probability of a positive test
A positive test can happen in two ways:
- The person has HIV and the test correctly detects it:
- The person does not have HIV and the test falsely says positive:
By the law of total probability:
Substitute the numbers:
Compute each term:
- True positives:
- False positives:
So:
Notice that false positives (0.00999) are more than 11 times the true positives (0.0009). This is the key reason the posterior probability is so low — the healthy population is huge, so even a tiny false positive rate produces many false positives.
3. Apply Bayes' theorem
We want :
…
Unlock everything free for 14 days
- Full step-by-step solutions
- Concept-first explanations
- Methods, shortcuts & mistakes
- PYQ mapping + timed mock tests
Full access for 14 days. No credit card required.