# Use Bayes Theorem to find P(I|N) when P(P|I), P(I) and P(P|NI) is given

One in every 100 people are infected by a virus. If a person is infected, the test is positive 70% of the time. If a person is not infected, then the test is still positive 10% of the time. If a person tests negative, what is the probability that the person is not infected.

Let Positive=P, Negative=N, Infected= I, Not infected=NI

Given $P(I)=0.01, P(NI)=0.99$

$Given, P(P|NI)=0.10$ and we can deduce $P(N|NI)=0.90$

$Given, P(P|I)=0.70$ and we can deduce $P(N|I)=0.30$

Therefore, $P(N\cap I)=P(N|I)P(I)=0.3*0.01=0.003$

And, $P(N\cap NI)=P(N|NI)P(NI)=0.9*0.99=0.891$

Using Bayes theorem, $P(I|N)= \frac{P(N|I)P(I)}{P(N\cap I)+P(N\cap NI)}=\frac{0.30*0.01}{0.003+0.891}=0.003357$

Am I on the right track or did I over complicate things. Any insight is much appreciated.

• It looks OK to me – Carlos Campos Mar 19 '18 at 18:44
• The Infected = N should be changed to I other than that it looks correct. – The Integrator Mar 19 '18 at 19:05