Consider a medical testing scenario where a disease affects 1% of the population. A test for this disease is 90% accurate; that is, it correctly identifies 90% of those who have the disease (true positive rate) and has a false positive rate of 5% (correctly identifying 95% of those without the disease). If a person tests positive for the disease, what is the probability that the person actually has the disease? Use Bayes’s Theorem to compute the answer.
Let:
- $A$: the event that a person has the disease.
- $B$: the event that a person tests positive for the disease.
According to Bayes's theorem, we need to find $P(A|B)$, which is given by the formula:
$P(A|B) = \frac{P(B|A) \cdot P(A)}{P(B)}$
Where:
- $P(A) = 0.01$
- $P(B|A) = 0.9$
- $P(B|\neg A) = 0.05$
We first need to compute $P(B)$ using the law of total probability:
$P(B) = P(B|A) \cdot P(A) + P(B|\neg A) \cdot P(\neg A)$