A woman lives in a country where only 1 out of 1000 people has the virus. There is a test available that is positive 5% of the time when the patient does not have it, negative 1% of the time when the patient does have it, and otherwise correct. Recall that we computed that the woman’s chance of having the virus, conditional on a positive test, is less than 1.9%. (In Bayesian parlance, we call the initial, unconditional, probability the “prior” and the resulting conditional probability, after updating based on observations, the “posterior.”)

Let the conditional probability we computed (1.9%) serve the role as the new prior. Compute the new probability that she has the virus (new posterior) based on her getting a second positive test.

If the results were independent, the answer would be straightforward 0.019. However, I know that if we go sequentially, Probability( the person has virus | when the result declared is positive) will keep increasing; but I am unable to write the Bayesian formula in this case. Please help.


Let A be the event that she has the disease. Let B, be the event that she tests positive. $$\Pr(A|B)=\frac{\Pr(B|A)\Pr(A)}{\Pr(B|A)\Pr(A)+\Pr(B|A')\Pr(A')}$$

Notice that





If we want the probability she has the disease given she 'tests positive twice' ( event C).


  • $\begingroup$ But the question says we have already got a positive result in the first test and we need to consider that as our prior condition. We are supposed to find the P(A|B) in the second attempt, given that the first test was already positive. What you have written is the condition when both tests are independent of each other. Please correct me if I am wrong. $\endgroup$ – Kong Sep 25 '18 at 7:01
  • $\begingroup$ Do you mean like independence? Could let C be the event that she has the disease given she tested positive twice. The probability that she would test positive twice given she has the disease and the probability she tests positive twice given she does not have the disease could be computed assuming independence $\endgroup$ – Quality Sep 25 '18 at 7:05
  • $\begingroup$ The edited expression that you've written is P(C|A) which is probability that the test is tested positive twice given that she has the disease, not the other way round. Please check again. $\endgroup$ – Kong Sep 25 '18 at 7:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.