The prevalence of a disease is 1 in 500 There is a test that
The prevalence of a disease is 1 in 500. There is a test that can detect it with a sensitivity of 100% and a specificity of 95%. What is the probability that a person has the disease, given a positive result on the test. Please show every step in the calculation. I
Solution
a)
sesitivity = a / (a+c) = 1......specificity = 0.95 = d / d+b..
a+d / (a+b+c+d) = Accuracy = (sensitivity) (prevalence) + (specificity) (1 - prevalence).....
= 1* (1/500) + 0.95*( 499 / 500 )...... = 0.9501...
a/ (a+c) =1..so, c = 0... d / (b+d) = 0.95...d =19b...
0.9501= a+d /(a+b+c+d) = a+d /( a+b+d) = 1 - b /(a+20b).....
solving, 0.0499 = b / (a+20b).....
so, 0.0499*a + 0.998*b = b......i.e, 0.002*b = 0.0499*a.....i.e, b = 24.95*a.....
prob. [ person has the disease | a positive result ]
= prob. [ person has the disease and a positive result ] / prob.[ a positive result ]
= a / [a+b] = a / [ a + 24.95*a ].......
= a / 25.95*a = 1 / 25.95 = 0.03853565.....
| positive(disease) | negative(disease) | |
| positive (test) | a | b |
| negative (test) | c | d |
