Answer:
a) We can use Bayes' theorem to find the probability that a person has the virus given that they have tested positive:
P(A|B) = P(B|A) * P(A) / P(B)
where P(B|A) is the probability of testing positive given that the person has the virus, P(A) is the prior probability of a person having the virus (1/300), and P(B) is the total probability of testing positive.
P(B|A) = 0.8 (given in the problem)
P(A) = 1/300
P(B) = P(B|A) * P(A) + P(B|A') * P(A')
= 0.8 * 1/300 + 0.1 * 299/300 (using the law of total probability)
≈ 0.1033
Therefore,
P(A|B) = 0.8 * 1/300 / 0.1033
≈ 0.0245
So the probability that a person has the virus given that they have tested positive is about 2.5%.
b) Similarly, we can find the probability that a person does not have the virus given that they test negative:
P(A'|B') = P(B'|A') * P(A') / P(B')
where P(B'|A') is the probability of testing negative given that the person does not have the virus, P(A') is the prior probability of a person not having the virus (299/300), and P(B') is the total probability of testing negative.
P(B'|A') = 0.9 (given in the problem)
P(A') = 299/300
P(B') = P(B'|A') * P(A') + P(B'|A) * P(A)
= 0.9 * 299/300 + 0.2 * 1/300 (using the law of total probability)
≈ 0.9977
Therefore,
P(A'|B') = 0.9 * 299/300 / 0.9977
≈ 0.9978
So the probability that a person does not have the virus given that they test negative is about 99.8%.