First we define {A} as the accurate, {P} as the positive and {I} for when one is ill: P{A}=0.95, because there is a 95% possibility that the test accurate {A}. Moreover, we know that there is a possibility of 0.1% that one may become ill {I}, which we define as P{I}=0.001 (0.1/100). We can now see that the possibility for a positive test {P} when someone is ill {I}, is exactly the same as the chance for an accurate test {A}:
P{P|I} = P{A} (we define P{P|I} as the possibility for one to get positive test when he is ill)
There are two chances for a positive test {P}: If one is ill {I} and the result was accurate {A}, or if one was not ill {I} and the result was not accurate {A}:
P{P} = P{I} x P{A} + !P{I} x !P{A} = P{I} x P{P|I} + !P{I} x !P{P|I}
The sign ! means .NOT.
We want to see what is the chance for John to be infected by the virus and if John should really worry about the positive outcome of the test. We want to calculate in other words, the possibility P{I|P}. P{I|P} is the opposite of P{P|I}! P{I|P} is the chance of one being Ill {I} when he gets a positive test {P} while P{P|I} is the possibility for one to get positive test when he is ill. There is a simple way to calculate it using the
Bayes' theorem.
P{I|P} = P{P|I} x P{I} / P{P}
we know that:
P{P|I} = P{A} = 0.95%
P{I} = 0.001
P{P} = P{I} x P{P|I} + !P{I} x !P{P|I} = 0.001 x 0.95 + (1-0.001) x (1-0.95) = 0.00095 + 0.04995 = 0.0509
So we substitute to the previous equation:
P{I|P} = P{P|I} x P{I} / P{P} = 0.95 x 0.001 / 0.0509 => P[I|P] = 0.0186
We only need to multiply this by 100 to get the %. So John should not really worry about the positive result, since there is only 1.86% to be Ill...