# Probability - Testing for diseases

I am just learning probability in my Discrete Structures class and am very lost. This is the example given in the book and I have no idea how to solve this problem.

Problem: Suppose one in 1000 people have a certain disease. Suppose medical testing is not perfect (as is the case in real life) and consequently, only 99% of the people with the disease are tested positive. Suppose 2% of the people who don’t have the disease also test positive. What is the probability of actually having the disease, given someone tests positive?

Things I do know:

• People with disease = 1/1000
• Tested positive with disease = 99/100
• People tested positive who don't have disease = 2/100

I'm not sure where to got from here with the information that I know. What are the next steps?

• You want to use Bayes' theorem: $P(A|B) = \frac{P(B|A)P(A)}{P(B)}$ – nomen Dec 6 '13 at 5:20

As nomen pointed out, you need Bayes' Theorem here but you will find it helpful the expand the denominator as follows

$P(A|B) = \frac{P(B|A)P(A)}{P(B|A)P(A) + P(B|\bar{A})P(\bar{A})}$

where the bars indicate complements. In particular, let A be having the disease and B be testing positive. Then

$P(B|A) = \frac{99}{100}$

$P(A) = \frac{1}{1000}$

$P(B|\bar{A}) = \frac{2}{100}$

$P(\bar{A}) = 1 - P(A)$

Plug and chug from here.

• Thanks for the help. So I used what you gave me to get (0.99 * 0.001) / ((0.99*0.001) + (.999*.02)) = .04721 Sorry I don't know how to format the math problem. Now I am working on this problem: Redo the Medical Testing problem, as follows. Suppose Pr(Dis) = x, with everything else being the same. For what value of x is it the case that Pr(Dis | Pos) is 0.5? – ztoolson Dec 10 '13 at 3:19