Finding conditional probability of being affected by virus

812 Views Asked by At

I have a problem I have been asked to solve. I have tested positive for a virus affects 1 in 10000 people. The lab report says the test correctly identifies positive cases 99% of the time and correctly identifyies negative cases 90% of the time. Let D be the event that you have the disease and T be the event that you test positive for the disease.

I have to find all of the conditional probabilities in terms of D and T:

I came up with

P(D|T) = .99
P(D complement | T) = .01
P(D|T complement) = .90

Do I also need to take into consideration the fact that 1/10000 people are affected by this?

so that P(D) = .001, but do I need this? Is this important in finding the probability that I have this virus?

1

There are 1 best solutions below

2
On BEST ANSWER

Yes. The probability you want is $\Pr[D \mid T]$, the probability you actually have the disease given that you tested positive. However, your identification of the other probabilities is incorrect. The test has a sensitivity of 99%, meaning that, given the individual has the disease the test will be positive; i.e., $\Pr[T \mid D] = 0.99$. The test also has a specificity of 90%, meaning that, given the individual does NOT have the disease, the test will be negative: $\Pr[\bar T \mid \bar D] = 0.90$. The prevalence of the disease is the overall occurrence of the disease among the population; here, it is $\Pr[D] = \frac{1}{10000} = 0.0001$ (you wrote $0.001 = \frac{1}{1000}$).

The way to understand sensitivity and specificity is that they are probabilities conditioned on the true disease status of the individual being tested. The test is simply a procedure that makes a decision, which may or may not actually be consistent with the actual disease status.

Now that we have correctly established what probabilities you know and what probability you want, the rest is computation: we recall Bayes' theorem: $$\Pr[D \mid T] = \frac{\Pr[T \mid D]\Pr[D]}{\Pr[T]}.$$ We have both terms of the numerator, but we don't yet have the unconditional probability of testing positive. To find this, we also need the law of total probability: $$\Pr[T] = \Pr[T \mid D]\Pr[D] + \Pr[T \mid \bar D]\Pr[\bar D],$$ where $\bar D$ is the complementary event of being disease free, so $$\begin{align*} \Pr[T \mid \bar D] &= 1 - \Pr[\bar T \mid \bar D], \\ \Pr[\bar D] &= 1 - \Pr[D]. \end{align*}$$ Put all together, we get $$\Pr[D \mid T] = \frac{\Pr[T \mid D]\Pr[D]}{\Pr[T \mid D]\Pr[D] + (1 - \Pr[\bar T \mid \bar D])(1 - \Pr[D])},$$ and since we know what each of these values is, it is now easy to calculate the desired probability.