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

In summary, the conversation discusses the accuracy of a virus test and the chances of having the virus given a positive test result. The test is said to be 98% accurate and it is also mentioned that 1 in 10000 people have the virus. The conversation also touches on the concept of sensitivity and specificity in medical testing. The final conclusion is that the probability of having the virus with a positive test result is 0.49%.
  • #1
sessomw5098
8
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
  • #2
In questions like these there are usually two probabilities given - false positive and failure to detect. 98% is one number.
 
  • #3
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:
  • #4
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.
 
  • #5
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:

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

1. What is Bayes Theorem?

Bayes Theorem is a mathematical formula that describes the probability of an event occurring based on prior knowledge or information. It is named after the 18th century statistician Thomas Bayes.

2. How is Bayes Theorem used in science?

Bayes Theorem is used in various fields of science, including biology, medicine, psychology, and artificial intelligence. It is often used to update the probability of an event occurring based on new evidence or information.

3. Can you provide an example of Bayes Theorem in action?

An example of Bayes Theorem in action is in medical diagnosis. A doctor may use the patient's symptoms, medical history, and test results to determine the probability of a certain disease. As more information is gathered, the probability can be updated using Bayes Theorem to make a more accurate diagnosis.

4. What are the assumptions of Bayes Theorem?

Bayes Theorem assumes that the events are independent, meaning that the occurrence of one event does not affect the probability of another event. It also assumes that there is enough prior information available to make accurate predictions.

5. What are the limitations of Bayes Theorem?

One limitation of Bayes Theorem is that it requires accurate and unbiased prior information. If the prior information is incorrect or biased, it can lead to inaccurate predictions. Additionally, Bayes Theorem does not account for all possible factors, so it may not always provide the most accurate results.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
9
Views
491
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
708
  • Set Theory, Logic, Probability, Statistics
Replies
19
Views
1K
  • Biology and Medical
Replies
2
Views
1K
  • Set Theory, Logic, Probability, Statistics
2
Replies
47
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
791
  • Set Theory, Logic, Probability, Statistics
Replies
5
Views
789
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
3K
Replies
14
Views
2K
Back
Top