I know this question has been asked a couple of times, but I'm not sure that I understood the calculation properly. I wanted to get some clarity and make sure I'm doing the calculation correctly. If I am correct, my numeric value does not match the teacher's answer...
A disease has a 6% infectivity rate. The test for the disease has a sensitivity of 98% and a specificity of 97%. If a person has two positive results, what is the probability that they are infected with the disease if we assume independence of the test results?
I have a mock table using some dummy data:
Infected | Not Infected | ||
---|---|---|---|
Positive Test Result | 588 | 282 | Total Positive = 870 |
Negative Test Result | 12 | 9118 | Total Negative = 9130 |
Total Infected = 600 | Total Not Infected = 9400 | Total Subjects = 10000 |
With this data, I was able to calculate the following:
P(positive test)=870/10000=0.087
P(negative test)=9130/10000=0.913
P(infected|positive test)=588/870=0.675862
P(infected|negative test)=12/9130=0.001314
P(not infected|positive test)=282/870=0.324138
P(not infected|negative test)=9118/9130=0.998686
P(positive test|infected)=588/600=0.98 This would be sensitivity.
P(negative test|infected)=12/600=0.02
P(positive test|not infected)=282/9400=0.03
P(negative test|not infected)=9118/9130=0.97 This would be specificity.
Given independence between test results, that means that we can calculate this using Baye's Theorem multiple times:
$$ P(infected|+,+) = \frac{P(+,+|infected) \cdot P(infected)}{P(+,+)}$$
$$ = \frac{P(+|infected)^2 \cdot P(infected)}{P(+|infected)^2 \cdot P(infected) + P(+|\neg infected)^2 \cdot P(\neg infected)} $$
This is where my calculations breakdown, because I cannot get the answer the teacher gets of 0.89.
I get
$$ P(infected|+,+) = \frac{0.98^2 \cdot 0.06}{0.98^2 \cdot 0.06 + 0.03^2 \cdot 0.94} = 0.985531 $$
I'm not sure where I'm going wrong, and where the teacher is getting 0.89... and the teacher doesn't seem to know what he's doing, because he couldn't explain how he got the answer...
Thanks for your time and help.