2.5 Bayes' Theorem

Bayes' Theorem

We can find the conditional probability that an event F occurs, given that event E has occurred, when we know P(E|F), P(E|F) and P(F)

Suppose that E and F are event from a sample space S such that P(E)>0 and P(F)>0. Then
P(F|E)=P(E|F)P(F)P(E|F)P(F)+P(E|F)P(F)


Example

Suppose that one person in 100,000 has a particular rare disease for which there is a fairly accurate diagnostic test. This test is correct 99% of the time when given to a person selected at random that has the disease; it is correct 99.5% of the time when given to a person selected at random who does not have the disease. Given this information can we find

  1. The probability that a person who tests positive for the disease has the disease?
  2. The probability that a person who tests negative for the disease does not have the disease?

Should a person who tests positive be very concerned that they have the disease?

F= The event that a person selected at random has the disease
E= The event that a person selected at random tests positive for the disease

  1. We want P(F|E) (The probability that a person who tests positive for the disease actually has the disease)

P(E|F)=99% That a diseased person tests positive
P(E|F)=0.5% That a healthy person tests positive
P(F)=1100,000 That a person is diseased

By Bayes' Theorem, P(F|E)=P(E|F)P(F)P(E|F)P(F)+P(E|F)P(F)

P(F|E)=0.99×0.000010.99(0.00001)+0.005(10.00001)0.002

  1. We want P(F|E) (The probability that a person is healthy given they tested negative)

P(E|F)=99.5% That a healthy person tests negative
P(E|F)=1% That a diseased person tests negative
P(F)=11100,000 That a person is healthy

By Bayes' Theorem, P(F|E)=P(E|F)P(F)P(E|F)P(F)+P(E|F)P(F)

P(F|E)=0.995(10.00001)0.995(10.00001)+0.01(0.00001)0.9999999

By part 1., only 0.2% of people who test positive actually have the disease. Because the disease is extremely rare, the number of people of false positives is far greater than the number of true positive, making the percentage of people who test positive and actually have the disease extremely small. People who test positive should not be overly concerned that they actually have the disease.