182k views
0 votes
A certain virus infects one in every 2000 people. a test used to detect the virus in a person is positive 96% of the time if the person has the virus and 4% 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, i.e. find p(a | b).
b. find the probability that a person does not have the virus given that they test negative, i.e. find p(not a | not b).

User Joe Almore
by
7.5k points

1 Answer

3 votes

Final answer:

To find the probability that a person has the virus given a positive test result, use Bayes' theorem with the relevant probabilities. Similarly, to find the probability that a person doesn't have the virus given a negative test result, apply Bayes' theorem with the probability of not testing positive.

Step-by-step explanation:

A certain virus infects 1 in every 2000 people, and we have a test that detects it with certain probabilities. To calculate the probability that a person has the virus given that they have tested positive, denoted as P(A | B), we'll use Bayes' theorem. Bayes' theorem relates the conditional and marginal probabilities of stochastic events.


First, we need to identify the following probabilities:

  • P(A), the probability of being infected, which is 1/2000.
  • P(B | A), the probability of testing positive if the person is infected, which is 96% or 0.96.
  • P(B | not A), the probability of testing positive if the person is not infected (false positive rate), which is 4% or 0.04.
  • P(not A), the probability of not being infected, which is 1 - (1/2000).

Bayes' theorem is given by:

P(A | B) = [P(B | A) * P(A)] / P(B), where P(B) is the total probability of testing positive. We calculate P(B) by:

P(B) = [P(B | A) * P(A)] + [P(B | not A) * P(not A)]

After calculating P(B), we plug it into the Bayes' theorem equation to find P(A | B).

To find the probability that a person does not have the virus given that they test negative, denoted as P(not A | not B), we again use Bayes' theorem in a similar fashion and calculate the probability of not testing positive:

P(not B) = 1 - P(B), which is the probability of any person testing negative. Then we use the ratio of the probability of a non-infected person testing negative to the total probability of testing negative to find P(not A | not B).

User Joe Hankin
by
7.7k points