Problem Statement
A disease has prevalence 1%. A test has sensitivity 99% and specificity 95%. If a person tests positive, what is the approximate probability they actually have the disease?
Explanation
Bayes: P(D|+) = 0.01×0.99 / [0.01×0.99 + 0.99×0.05] = 0.0099 / 0.0594 ≈ 0.167.
Code Solution
SolutionRead Only
0.0099/(0.0099+0.0495)≈0.167
