105k views
2 votes
A certain virus infects one in every 300 people. A test used to detect the virus in a person is positive 90% of the time if the person has the virus and 8% of the time if the person does not have the virus. (This 8% 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)=
8.70
Incorrect%

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') =

User Nivash
by
5.0k points

2 Answers

6 votes

Answer:

P(A|B) = 3.6%
P(A'|B') = 100% (actually 99.96%)

Explanation:

These kind of problems are best solved through the construction of contingency tables

A contingency table lists possible outcomes for two or more events in the form of a 2-D table. The entries relate to the number of possible outcomes for each event independently and for joint events

We will start with an assumption of the total of all totals in this case, the total population. Choose something divisible by 3 because we have 300 in the denominator for the probability of infection (1/300). I have chosen 30,000 as the total population to get whole numbers

The events are
A = total number infected
A' = total number not infected (also called the complement of A

B = total who test positive
B' = total who test negative (also called the complement of B)

Let's start computing numbers. Sometimes it is better to fill all the values of the cells for clarity

Total Number who are infected

  • This is the set A
  • The infection probability = 1/300 of the entire population
    = 1/300 x 30,000 = 100

Total number who are infected and who test positive (true positive)

  • This will be the set A∩B which is the cell at the intersection of row A, col B
  • Given 90% of those infected test positive, this number would be
    = 0.9 x 100 = 90. This is also called a true positive


Total number who are infected and who test negative (false negative)

  • set A∩B', the intersection of row A and col B'
  • = 100 - 90 = 10

Total Number who are not infected

  • This is the set A'
  • Total Population - Total number infected
    = => 30,000 - 100 = 29,900


Total number who are not infected but test positive (false positive)

  • This is the set A' ∩ B
  • This is the cell at the intersection of row A' and column B.
  • Since 8% is the false positive rate, this value = 0.08 x total not infected = 0.08 x 29,900 = 2,392

Total number who test positive

  • This is the set B
  • and is the total of column B entries = 90 + 2392 = 2,482

Total number who are not infected and test negative

  • This is a true negative
  • Intersection of row A' and col B' = 27,508

Total number who test negative

  • This is event B'
  • = Total for column B
    = Total population - Total who test positive
    = 30,000 - 2482
    = 27,518


We could compute the individual probabilities related to total population but since the denominator of 30,000 is the same, we can ignore these as we compute probabilities

a) True Positive probability


\textsf P(A|B) = (P(A\cap B))/(P(B)) \\\\= (90)/(2482) = 0.036261 = 3.6261\% \\\\= 3.6\% \textsf{ rounded to one decimal place}

b) True negative probability


\textsf P(A'|B') = (P(A'\cap B'))/(P(B')) \\\\ = (27508)/(2482) = .0.99964 = 99.964 \% \\\\= 99.96\%

Rounding this to 1 decimal place will make it 100% so better to leave it as 99.96% which indicates almost 100% probability that the test detects true negatives

The attached image shows the contingency table with a summarization of the various values. Kinda messy but it will help you with problems of this type in future

Hope that helps :)

A certain virus infects one in every 300 people. A test used to detect the virus in-example-1
User Jason Cust
by
4.8k points
4 votes

Part (a)

Consider a town of 30,000 people.

The virus infects one out of every 300 people, which means (1/300)*(30000) = 100 is the expected number of people with the virus.

The test is able to catch 90% of these cases, so the test will say "positive" for 90 of these people with the virus. These are true positives.

The remaining 100-90 = 10 people with the virus will get false negatives.

The 30,000 - 100 = 29,900 people who don't have the virus will have the test give a false positive 8% of the time, so 0.08*29900 = 2392 people will get a false positive, and the remaining 29900-2392 = 27508 people will get true negatives.

Check out the chart in the diagram below. It shows all the values mentioned but in a more organized fashion.

Now we're told that "given that they have tested positive". So we'll focus solely on the people that tested positive. That would be the 90+2392 = 2482 in the first column.

We have 90 people who actually have the virus out of 2482 positive tests. Those values divide to 90/2482 = 0.03626 approximately

This converts to 3.626% and then that rounds to 3.6%

So about 3.6% of the positive test cases are correct (in stating the person has the virus).

Answer: 3.6

You won't need to type in the percent sign.

=======================================================

Part (b)

We'll refer to the chart made in part (a) earlier.

This time we're told that "given they tested negative". Focus solely on the "negative test" column.

We have 27508 people who don't have the virus out of 27518 people who tested negative.

The probability of not having the virus, given the test was negative, is 27508/27518 = 0.9996 approximately

This converts over to 99.96% and then rounds to 100.0% or 100% when rounding to the nearest tenth of a percent

Of course, it's impossible to have 100% of the negative cases where no one got the virus, since 10 people with the virus tested negative (false negatives). This is one drawback of rounding and why it could be misleading.

Answer: 100

A certain virus infects one in every 300 people. A test used to detect the virus in-example-1
User Noshitsherlock
by
4.7k points