# Bayesian Inference and Disease Testing

I've been working my way through an introduction to Bayesian Inference in a Statistical Physics textbook (Tobochnik and Gould, 2010 - available online, excellent book). I've run across a problem that I can't quite wrap my head around, though I believed I understood Bayesian Inference up to that point (just before this was an amazing explanation of the Monty Hall problem using Bayes' Theorem).

What is happening here? I thought the chance of the test being right was 98%? Why would Bayes Theorem tell us that the chance of you actually having the disease given the positive result is less than 1 percent? What does that mean we're saying when we say that the test is 98% accurate? Does it have something to do with the fact that the disease is so rare?

• It is imprecise to call such a screening test 'accurate'. Certainly one would like P(pos test | disease) and P(neg test | no disease) both to be near 1. Those are strictly properties of the test itself. Then when one gets the 'predictive power of a positive test' P(disease | pos test) and 'predictive power of a negative test' P(no disease | neg test}, one can wish for high probabilities, but these 'reverse' conditional probabilities depend on the population in which the test is administered as well as on properties of the test. Medical policy makers need to know some probability. – BruceET Oct 18 '15 at 6:40
• I'm having trouble understanding how P(pos. test | disease) can be so high (98%) while P(disease | pos. test) can be so low (0.47%). Are they really that tenuously connected with each other? And why would the rarity of the disease within the population affect their connectedness so drastically? – D. W. Oct 18 '15 at 6:46
• Conditional probabilities are ratios. Both of the ones you ask about have P(Pos test and Disease) in the numerator. Denominators differ depending on whether your population is people with the disease or people with positive tests. Bayes' theorem is involved in getting from P(pos test | disease) to P(disease | pos test). Check Wikipedia on 'screening test'. There are also other discussions of your basic question on this site (unfortunately some in which wrong answers have been up-voted by people who prefer mindless simplicity to a somewhat more complicated correct answer). – BruceET Oct 18 '15 at 6:58
• Sorry, Wikipedia seems to have changed a bit since I last looked. Their best article (and other interesting ones) can now be accessed by googling 'sensitivity and specificity'. Sensitity = P(pos test | disease); Specificity = P(neg test | no disease). – BruceET Oct 18 '15 at 7:08

• @D.W. It's the Red area. As the blue and purple region gets narrower, then the red area gets longer. $$\mathsf P(+\cap \neg D) = \mathsf P(+\mid \neg D)\,\mathsf P(\neg D) = 2\%\,P(\neg D)$$ The Blue area is $\mathsf P(+\cap D) = 98\% \mathsf P(D)$ . – Graham Kemp Oct 18 '15 at 6:25
• Look at it in terms of areas. If the total area is 1, the area of the red-purple stripe (incorrect test result) is fixed at 0.02. The blue-purple stripe is the proportion of the population that has the disease. As the incidence rate goes down, that stripe gets narrower. In the example, it’s extremely thin, with a total area of 0.0001, with the blue (have disease and test agrees) accounting for most of it. The red area (false positive) is very slightly less less than 0.02—around 200 times bigger than the blue area, so $P(D|+)$ is about 0.5%. – amd Oct 18 '15 at 16:56