Question 178988
TP = test positive
TN = test negative
D = diseased
O = not diseased

P(TP | D) = 0.95
P(TN | O) = 0.9
P(D) = 0.01

And obviously (probabilities sum to one)

P(TN | D) = 0.05
P(TP | O) = 0.1
P(O) = 0.99

Want to know:

P(D | TP)

By definition of conditional probability

P(D | TP) = P(D ^ TP)/P(TP)

P(TP | D) = P(TP ^ D)/P(D)

P(D | TP) = P(TP | D)*P(D)/P(TP)

From set theory

P(TP) = P(TP ^ O) + P(TP ^ D)

Conditional probability again

P(TP) = P(TP | O)*P(O) + P(TP | D)*P(D)

Substitute

P(D | TP) = P(TP | D)*P(D)/( P(TP | O)*P(O) + P(TP | D)*P(D) )

0.95*0.01 / ( 0.1*0.99 + 0.95*0.01 ) = 19/217

I'm pretty sure that's right, but last time I did this was 1999!