A certain virus infects one in every 600 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. Let A be the event "the person is infected" and B be the event "the person tests positive."

(a) Find the probability that a person has the virus given that they have tested positive.

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

See similar problem here:

http://www.jiskha.com/display.cgi?id=1481848396

To find the probability that a person has the virus given that they have tested positive (part (a)), we can use Bayes' theorem.

Bayes' theorem states that P(A|B) = (P(B|A) * P(A)) / P(B), where P(A|B) is the probability of A happening given that B has happened, P(B|A) is the probability of B happening given that A has happened, P(A) is the probability of A happening, and P(B) is the probability of B happening.

In this case:
- P(A) is the probability that a person has the virus, which is given as one in every 600 people or 1/600.
- P(B|A) is the probability that a person tests positive given that they have the virus, which is given as 90% or 0.9.
- P(B) is the probability that a person tests positive. We need to calculate this probability.

To find P(B), we need to consider both scenarios:
1. The person has the virus and tests positive (A and B both occur).
2. The person does not have the virus but tests positive (A does not occur, but B occurs).

The probability of scenario 1 happening is P(A) * P(B|A), which is (1/600) * 0.9.
The probability of scenario 2 happening is (1 - P(A)) * P(B|not A), where P(B|not A) is the probability of testing positive given that the person does not have the virus. It is given as 10% or 0.1.

Therefore, P(B) = P(A) * P(B|A) + P(not A) * P(B|not A) = (1/600) * 0.9 + (599/600) * 0.1.

Now, we can substitute the known values into Bayes' theorem and calculate P(A|B):

P(A|B) = (P(B|A) * P(A)) / P(B) = (0.9 * 1/600) / [(1/600) * 0.9 + (599/600) * 0.1].

To find the probability that a person does not have the virus given that they have tested negative (part (b)), we can use a similar approach. Again, we will use Bayes' theorem:

P(not A|not B) = (P(not B|not A) * P(not A)) / P(not B).

Here, P(not A) is the probability that a person does not have the virus, which is (599/600), and P(not B|not A) is the probability of testing negative given that the person does not have the virus.

To calculate P(not B), we need to consider both scenarios:
1. The person does not have the virus and tests negative (not A and not B both occur).
2. The person has the virus but tests negative (not A does not occur, but not B occurs).

The probability of scenario 1 happening is P(not A) * P(not B|not A).
The probability of scenario 2 happening is (1 - P(not A)) * P(not B|A), where P(not B|A) is the probability of testing negative given that the person has the virus.

Therefore, P(not B) = P(not A) * P(not B|not A) + P(A) * P(not B|A).
Now, we can substitute the known values into Bayes' theorem and calculate P(not A|not B).