Bayes Theorem

Download as xlsx, pdf, or txt
Download as xlsx, pdf, or txt
You are on page 1of 2

Cancer Screening

Objective To illustrate Bayes' Theorem.


Definitions:
Given:
C = event that the patient has cancer
Experience shows that 3 percent of the patients who are given a screening C' = event that the patient has no cancer
test actually have cancer. If a patient has cancer, the test will yield a positive T = event that the screening test is positive
result 98% of the time and a negative result 2% of the time (a "false
negative"). If a patient has no cancer, the test will yield a negative result T' = event that the screening test is negative
96% of the time, and a positive result 4% of the time (a "false positive").

Given (in symbolic form):


Question:
P(C) = 0.03 Þ P(C') = 0.97
Suppose the test is positive. What is the probability P(T|C) = 0.98 Þ P(T'|C) = 0.02
that the patient actually has cancer? P(T|C’) = 0.04 Þ P(T'|C') = 0.96

Method 1: Bayes' Theorem:


Bayes' Theorem says: Comment
P(Cancer | Positive Test) = P(Positive Test | Cancer) P(Cancer) / P(Positive Test) P(C|P) is lower than
P(Positive Test) = P(Positive Test | Cancer) P(Cancer) + P(Positive Test | No Cancer) P(No Cancer) you might expect.
P(Positive Test) = (0.98)(0.03) + (0.04)(0.97) = .0294 + .0388 = 0.0682
So P(Cancer | Positive Test) = (0.98)(0.03)/( 0.0682) = (0.0294)/(0.0682) = 0.4311 or 43.11%

Method 2: Create a hypothetical frequency table


Construct a hypothetical table of frequencies assuming 10,000 Definitions:
patients. Then P(Cancer | Positive Test) = 294 / 682 = 0.4311 C = event that the patient has cancer
C' = event that the patient has no cancer
T = event that the screening test is positive
Positive Test (T) Negative Test (T') Row Total T' = event that the screening test is negative
Cancer (C) 294 6 300
No Cancer (C') 388 9,312 9,700 Given (in symbolic form):
Col Total 682 9,318 10,000
P(C) = 0.03 Þ P(C') = 0.97
P(T|C) = 0.98 Þ P(T'|C) = 0.02
P(T|C’) = 0.04 Þ P(T'|C') = 0.96
The Bottom Line
Bayes' formula is the "right" way to do this type of
problem, yet many people feel that Bayes' formula is a Table Frequencies
little hard to understand. The table method offers an 0.03 x 10,000=300 0.97 x 10,000 = 9700
appealing heuristic. 0.98 x 300= 294 0.02 x 300 = 6
0.04 x 9,700=388 0.96 x 9,700 = 9,312
Hospital Litigation
Objective To illustrate Bayes' Theorem. Definitions:
Given: M = event that a malpractice suit is filed
Three hospitals centers have 50%, 30% and 20% of the patients, M' = event that a malpractice suit is not filed
respectively. Experience shows that malpractice suits are filed with H1 = event that the case is from hospital 1
respective probabilities of .001, .005, and .008. H2 = event that the case is from hospital 2
H3 = event that the case is from hospital 3

Question: Given (in symbolic form):


If a malpractice suit is filed, what is the P(H1) = 0.50 P(M | H1) = 0.001
probability that it originated in hospital 1? P(H2) = 0.30 P(M | H2) = 0.005
P(H1) = 0.20 P(M | H3) = 0.008
Method 1: Bayes' Theorem:
Bayes Theorem says:
P(H1 | M) = P(M | H1) P(H1) / S P(M | Hj) P(Hj)
P(H1 | M) = P(M | H1) P(H1) / [ P(M | H1) P(H1) + P(M | H2) P(H2) + P(M | H3) P(H3) ]
P(H1 | M) = (0.001)(0.50) / [ (0.001)(0.50) + (0.005)(0.30) + (0.008)(0.20) ]
P(H1 | M) = 0.0005 / [ 0.0005 + 0.0015 + 0.0016 ]
P(H1 | M) = 0.0005 / 0.0036
P(H1 | M) = 0.1389 or 13.89%

Method 2: Create a hypothetical frequency table Definitions:


Construct a hypothetical table of frequencies assuming 10,000 patients. Then M = event that a malpractice suit is filed
P(Hospital 1 | Malpractice Suit Filed) =P(H1 | M) = 5/36 = 0.1389 M' = event that a malpractice suit is not filed
H1 = event that the case is from hospital 1
H2 = event that the case is from hospital 2
H3 = event that the case is from hospital 3
Malpractice Suit (M) No Malpractice Suit (M') Row Total
Hospital 1 (H1) 5 4,995 5,000
Hospital 2 (H2) 15 2,985 3,000
Hospital 3 (H3) 16 1,984 2,000 Given (in symbolic form):
36 9,964 10,000
P(H1) = 0.50 P(M | H1) = 0.001
P(H2) = 0.30 P(M | H2) = 0.005
The Bottom Line P(H1) = 0.20 P(M | H3) = 0.008
Comment Bayes' formula is the "right" way to do this type of
problem, but many people feel that Bayes' formula is a little
hard to understand. The table method is a heuristic method with Table Frequencies
intuitive appeal. 0.50 x 10,000=5000 0.001 x 5,000 = 5
0.30 x 10,000=3000 0.005 x 3,000 = 15
0.20 x 10,000=2000 0.008 x 2,000 = 16

You might also like