Bayes Disease Test D67Aa9
1. **Problem statement:** We have a disease with prevalence $P(D) = \frac{1}{1000} = 0.001$. The test is 99% accurate, meaning $P(\text{Positive}|D) = 0.99$ (true positive rate) and $P(\text{Negative}|\neg D) = 0.99$ (true negative rate).
2. **Definitions:**
- False positive: test is positive but no disease, $P(\text{Positive}|\neg D) = 1 - P(\text{Negative}|\neg D) = 0.01$.
- False negative: test is negative but disease present, $P(\text{Negative}|D) = 1 - P(\text{Positive}|D) = 0.01$.
3. **Bayes' theorem:** To find the probability of having the disease given a positive test, $P(D|\text{Positive})$, use
$$
P(D|\text{Positive}) = \frac{P(\text{Positive}|D)P(D)}{P(\text{Positive})}
$$
where
$$
P(\text{Positive}) = P(\text{Positive}|D)P(D) + P(\text{Positive}|\neg D)P(\neg D)
$$
4. **Calculate $P(\text{Positive})$:**
$$
P(\text{Positive}) = 0.99 \times 0.001 + 0.01 \times 0.999 = 0.00099 + 0.00999 = 0.01098
$$
5. **Calculate $P(D|\text{Positive})$ (probability of true positive given positive test):**
$$
P(D|\text{Positive}) = \frac{0.99 \times 0.001}{0.01098} = \frac{0.00099}{0.01098} \approx 0.09016
$$
6. **Interpretation:**
- False positive rate is $P(\text{Positive}|\neg D) = 0.01$ or 1%.
- False negative rate is $P(\text{Negative}|D) = 0.01$ or 1%.
- Despite high accuracy, the probability of actually having the disease given a positive test is about 9.0% due to low prevalence.
**Final answers:**
- False positive probability: 0.01
- False negative probability: 0.01
- Probability of disease given positive test: approximately 0.09016