A certain virus infects one in every 300 people. A test used to detect the virus in a person is positive 80% of the time if the person has the virus and 5% of the time if the person does not have the virus. (This 5% result is called a false positive.) 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, i.e. find P(A|B). Round your answer to the nearest tenth of a percent and do not include a percent sign.
P(A|B)= %

b) Find the probability that a person does not have the virus given that they test negative, i.e. find P(A'|B'). Round your answer to the nearest tenth of a percent and do not include a percent sign.
P(A'|B') =

To solve these problems, we can use Bayes' theorem, which states:

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

where P(A|B) is the probability of event A happening given that event B has happened, P(B|A) is the probability of event B happening given that event A has happened, P(A) is the probability of event A happening, and P(B) is the probability of event B happening.

Now let's apply this theorem to the given problem:

a) Find the probability that a person has the virus given that they have tested positive, i.e. find P(A|B).

We are given P(A) = 1/300 (the probability that a person has the virus) and P(B|A) = 0.8 (the probability that a person tests positive given that they have the virus).

To find P(B), we need to consider two cases: a person has the virus (A) and a person does not have the virus (A').

For a person to test positive (B), two conditions must be satisfied: they have the virus (A) and they do not have the virus (A'). These two cases are mutually exclusive.

The probability of a false positive (testing positive given not having the virus) is given as 5%, so P(B|A') = 0.05.

Thus, we can calculate P(B) using the law of total probability:
P(B) = P(A) * P(B|A) + P(A') * P(B|A')
= (1/300) * 0.8 + (299/300) * 0.05

Finally, we can apply Bayes' theorem to find P(A|B):
P(A|B) = (P(B|A) * P(A)) / P(B)

Let's calculate it:

P(B) = (1/300) * 0.8 + (299/300) * 0.05
= 0.0026667 + 0.1498333
= 0.1525

P(A|B) = (0.8 * 1/300) / 0.1525
≈ 0.00133 / 0.1525
≈ 0.0087

Therefore, P(A|B) ≈ 0.87%.

b) Find the probability that a person does not have the virus given that they test negative, i.e. find P(A'|B').

To solve this, we can use the complement rule:

P(A'|B') = 1 - P(A|B)

We already calculated P(A|B) in part a), which is approximately 0.0087. Therefore:

P(A'|B') = 1 - 0.0087
≈ 0.9913

Therefore, P(A'|B') ≈ 99.1%.

To find the probability that a person has the virus given that they have tested positive, P(A|B), we can use Bayes' theorem. Bayes' theorem states:

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

Where:
P(A|B) is the probability of A given B (the probability that a person has the virus given that they have tested positive)
P(B|A) is the probability of B given A (the probability that a person tests positive given that they have the virus)
P(A) is the probability of A (the probability that a person has the virus)
P(B) is the probability of B (the probability that a person tests positive)

Given:
P(B|A) = 0.8 (the probability of testing positive given that a person has the virus)
P(A) = 1/300 (the probability of a person having the virus)
P(B) = ?

We need to find the probability of a person testing positive, P(B). This can be calculated using the law of total probability:

P(B) = P(A) * P(B|A) + P(A') * P(B|A')

Where:
P(A') is the probability of not having the virus (1 - P(A))
P(B|A') is the probability of testing positive given that a person does not have the virus (the false positive rate, 0.05)

P(A') = 1 - 1/300 = 299/300
P(B|A') = 0.05

Plugging in these values, we can calculate P(B):

P(B) = (1/300 * 0.8) + (299/300 * 0.05) = 0.0026667 + 0.0149667 = 0.0176334

Now we can use Bayes' theorem to find P(A|B):

P(A|B) = (P(B|A) * P(A)) / P(B) = (0.8 * 1/300) / 0.0176334 ≈ 0.4534

Therefore, the probability that a person has the virus given that they have tested positive, P(A|B), is approximately 0.4534, or 45.3%.

-----------------------------------------------------------------------------------------------

To find the probability that a person does not have the virus given that they test negative, P(A'|B'), we can use a similar approach.

P(A'|B') = (P(B'|A') * P(A')) / P(B')

Where:
P(A'|B') is the probability of not having the virus given that a person tests negative
P(B'|A') is the probability of testing negative given that a person does not have the virus
P(A') is the probability of not having the virus
P(B') is the probability of testing negative

Given:
P(B'|A') = 1 - P(B|A') = 1 - 0.05 = 0.95 (the probability of testing negative given that a person does not have the virus)

Using the law of total probability again, we can find P(B'):

P(B') = P(A) * P(B|A) + P(A') * P(B|A')

Plugging in the values, we get:

P(B') = (1/300 * 0.2) + (299/300 * 0.95) = 0.002 + 0.9466667 = 0.9486667

Now we can use the formula to find P(A'|B'):

P(A'|B') = (P(B'|A') * P(A')) / P(B') = (0.95 * 299/300) / 0.9486667 ≈ 0.9522

Therefore, the probability that a person does not have the virus given that they test negative, P(A'|B'), is approximately 0.9522, or 95.2%.

See similar problem here:

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