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

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 probablity 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:
Hi all, I've been a roulette player for more than 10 years (although I took time off here and there) and it's only now that I'm trying to understand the physics of the game. Basically my strategy in roulette is to divide the wheel roughly into two halves (let's call them A and B). My theory is that in roulette there will invariably be variance. In other words, if A comes up 5 times in a row, B will be due to come up soon. However I have been proven wrong many times, and I have seen some...
Thread 'Detail of Diagonalization Lemma'
The following is more or less taken from page 6 of C. Smorynski's "Self-Reference and Modal Logic". (Springer, 1985) (I couldn't get raised brackets to indicate codification (Gödel numbering), so I use a box. The overline is assigning a name. The detail I would like clarification on is in the second step in the last line, where we have an m-overlined, and we substitute the expression for m. Are we saying that the name of a coded term is the same as the coded term? Thanks in advance.

Similar threads

Back
Top