A certain virus infects one in every 500 people. A test used to detect the virus in a person is positive 90% of the time if the person has the virus and 10% of the time if the person does not have the virus.

Find the probability that a person does not have the virus given that they have tested negative.

A=infected

~A=not infected
(+)=positive diagnosis
(-)= negative diagnosis
We seek P(~A|(-))
We are given:
P(A) = 1/500 = 0.002
P((+)|A) = 0.9
P((+)|~A) = 0.1
We infer P(~A) = 1 - P(A) = 499/500 = 0.998 and that P((-)|~A) = 1 - P((+)|~A) = 0.9

We now find that:
P(~A|(-)) = P(~A) × P((-)|~A) =
0.998 × 0.9 = 0.898
which is the desired result.

QED

To find the probability that a person does not have the virus given that they have tested negative, we can use Bayes' theorem.

Let's denote the following events:
A: a person has the virus
B: a person tests negative for the virus

We are trying to find P(A' | B), which represents the probability that a person does not have the virus given that they have tested negative.

Bayes' theorem states that P(A' | B) = (P(B | A') * P(A')) / P(B), where P(B) is the probability of testing negative.

To calculate P(B), we need to consider two scenarios:
1) The person has the virus and tests negative (False Negative)
2) The person does not have the virus and tests negative (True Negative)

The probability of testing negative, P(B), is the sum of these two probabilities:
P(B) = P(B | A) * P(A) + P(B | A') * P(A')

From the information given:
- The virus infects one in every 500 people, so P(A) = 1/500.
- The test is positive 90% of the time if a person has the virus, so P(B | A) = 0.9.
- The test is positive 10% of the time if a person does not have the virus, so P(B | A') = 0.1.

With these values, we can calculate P(B):
P(B) = (0.9 * (1/500)) + (0.1 * (499/500))
P(B) = 0.0018 + 0.0998
P(B) = 0.1016

Now we can use Bayes' theorem to find P(A' | B):
P(A' | B) = (P(B | A') * P(A')) / P(B)
P(A' | B) = (0.1 * (499/500)) / 0.1016
P(A' | B) = 0.0498 / 0.1016
P(A' | B) ≈ 0.49

Therefore, the probability that a person does not have the virus given that they have tested negative is approximately 0.49, which means there is still a 49% chance that the person may have the virus despite testing negative.