What are the Odds of Having the Virus if the Test is Positive?

  • Context: Undergrad 
  • Thread starter Thread starter sessomw5098
  • Start date Start date
  • Tags Tags
    Bayes theorem Theorem
Click For Summary

Discussion Overview

The discussion revolves around the probabilities associated with a positive result from a virus test that is reported to be 98% accurate, in the context of Bayes' Theorem. Participants explore how to calculate the probability of actually having the virus given a positive test result, considering factors such as false positives and false negatives.

Discussion Character

  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant suggests using Bayes' Theorem to find the probability of having the virus given a positive test result, but expresses uncertainty about calculating the overall probability of a positive test.
  • Another participant notes that the term "98% accurate" needs clarification regarding its implications for false positives and false negatives.
  • A different participant assumes that "98% accurate" implies a 2% chance of both false positives and false negatives, and proposes a hypothetical population to illustrate the calculation of probabilities based on these assumptions.
  • This same participant calculates that, in a population of 1,000,000, the probability of actually having the virus given a positive test result is approximately 0.49%, which is higher than the base rate of 0.01% without the test.
  • Another participant disagrees with the previous calculation, asserting that the probability of having the disease given a positive test should be considered as 0.98, based on the accuracy of the test, and questions the validity of the earlier reasoning.

Areas of Agreement / Disagreement

Participants express differing views on the interpretation of the test's accuracy and the resulting probabilities. There is no consensus on the correct approach to calculating the probability of having the virus given a positive test result, with multiple competing interpretations presented.

Contextual Notes

Participants highlight the need for clarity on the definitions of true positive and false positive rates, as well as the implications of the test's accuracy. The discussion reveals that assumptions about the test's characteristics significantly influence the calculations and interpretations.

sessomw5098
Messages
7
Reaction score
0
Hey,

A virus test is 98% accurate and 1 in 10000 people have the virus. Given that the test is positive, what are the chances that you have the virus?

This is what I've got:
Since keyword “given,” I’m assuming Bayes Theorem. So, let A be the event that you have the virus. Let B be the event that the test is positive. So, I have P(A|B). But, my problem is how do I find P(B)? In other words, P(B) is the probability of a virus test 98% accurate and 1 in 10000 people have the virus. Would I have to break event B into two separate events? For example, let C = virus test is 98% accurate and D = 1 in 10000 people have the virus. Then, P(B) = P(C AND D). So, P(A | (C AND D))? Would this be the right approach? Any leads would be greatly appreciated.

Thanks
 
Physics news on Phys.org
In questions like these there are usually two probabilities given - false positive and failure to detect. 98% is one number.
 
sessomw5098 said:
Hey,

A virus test is 98% accurate and 1 in 10000 people have the virus. Given that the test is positive, what are the chances that you have the virus?

Thanks

If the test is positive, you are concerned with the probabilities of a true positive vs a false positive. If the test is 98% accurate, what is the probability you have the virus? What does 98% 'accurate' mean here?

To answer this question you need to know the true positive and false positive rate as well as the true and false negative rate. A test like this can have a high true positive rate if the disease is present (high sensitivity) but also have a high false positive rate (low specificity). "Accuracy" is the percentage of test results where the test is positive when the disease is present and negative when the disease is absent i.e.,the probability that the test is correct. If that's in fact what you are being given, the answer should be obvious. The perfect test has 100% sensitivity and 100% specificity.
 
Last edited:
I am going to assume that "98% accurate" means that it gives false positives and false negatives 2% of the time. (As mathman indicates, it would be unusual for those two probabilities to be the same. Since a "false negative" could have worse consequences than a "false positive", steps are typically take to reduce the probability of a false negative as much as possible- and those steps typically increase the probability of false positives.)

In any case, just because I dislike working with percentages, start by assuming a population of 1000000 people who take the test. "1 in 10000" or 100 people actually have the virus, 999900 people do not. Of the 100 people who have the virus, 98% or 98 of them have a positive test. Of the 999900 peple who do not have the virus, 2% or 19998 have a positive test.

That makes a total of 20096 who have a positive test and 98 0f them have the virus. That means that if your test is positive you have a 98/20096= 0.0049 or .49% probability of actually having the virus. That's not very high but it is still higher than the 1/10000= .01% chance without the test.
 
HallsofIvy said:
That makes a total of 20096 who have a positive test and 98 0f them have the virus. That means that if your test is positive you have a 98/20096= 0.0049 or .49% probability of actually having the virus. That's not very high but it is still higher than the 1/10000= .01% chance without the test.

I disagree. P(D|T) is given as 0.98 (D=disease, T=positive test). We don't know P(T|D) in general. In a random single test of this population (which is what we are talking about), the probability that a person with the disease is tested is .0001. However, the probability of being tested in this example is unity. Therefore, with 0.98 probability that the test is accurate (the test is correct), the P(D)=0.98 given a positive test.

If this were not the case, testing for diseases would be worthless.
 
Last edited:

Similar threads

  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 19 ·
Replies
19
Views
3K
  • · Replies 47 ·
2
Replies
47
Views
5K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 7 ·
Replies
7
Views
1K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K