Document Sample

```					Bayes’ Theorem
• Bayes’ Theorem allows us to calculate the
conditional probability one way (e.g., P(B|A)
when we know the conditional probability the
other way (P(A|B).
Bayes’ Theorem
•   We use the following logic:
•   P(A ∩ B) = P(A) * P(B|A)
•   P(A ∩ B) = P(B) * P(A|B)
•   Thus, P(A) * P(B|A) = P(B) * P(A|B)

• And P(B|A) = P(B) * P(A|B)
P(A)
Bayes’ Theorem
• All that remains is to figure out P(A) for the
denominator.
• In the simplest case, there are two ways A
could happen: A and B, or A and B’.
• P(A) = P(A ∩ B) + P(A ∩ B’)
• By the formula for conditional probability:
• P(A) = P(B)*P(A|B) + P(B’)*P(A|B’)
Bayes’ theorem
• P(B|A) = P(B) * P(A|B)
P(A)
• P(A) = P(B)*P(A|B) + P(B)*P(A|B’)

• This leads us to Bayes’ Theorem:
P(B|A) =         P(B) * P(A|B)
P(B)*P(A|B) + P(B)*P(A|B’)
Bayes’ Theorem – Example
• It is known that at any one time, one person in
200 has a given disease. A new test for this
disease is developed and a study of this test’s
reliability is performed, using samples of people
known to have or known not to have the disease.
Of 1000 people known to have the disease, 990
test positive. Of 5000 people known not to have
the disease, 250 test positive. What is the
probability that a randomly-selected person from
the general population has the disease, given that
they test positive?
Bayes’ Theorem – Example
• What we know from the question:

Ill         Not Ill
Test +         990 (99%)    250 (5%)
Test –           10 (1%)   4750 (95%)
1000        5000
Bayes’ Theorem – Example
• What is the probability that a randomly-
selected person from the general population
has the disease, given that they test positive?
P(Ill) = 1/200 = .005       P(Not Ill) = 1 – .005 = .995
P(T+ |Ill) = .99            P(T+|Not Ill) = .05

P(Ill | T+) =               P(Ill)* P(T+|Ill)
P(Ill)*P(T+|Ill) + P(Not Ill)* P(T+|Not Ill)
Bayes’ Theorem – Example
P(Ill|T+) =         (.005)(.99)
(.005)(.099) + (.995)(.05)

=             .00495
(.00495) + (.04975)

=        .0905
Bayes’ Theorem – Example
• We can generalize this approach to cases
where B consists of 3 or more mutually
exclusive, exhaustive events:

P(Bi|A) =             P(Bi) P(A|Bi)
P(B1)P(A|B1)+P(B2)P(A|B2)+ …+ P(Bk)P(A|Bk)

```
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
 views: 67 posted: 3/11/2012 language: English pages: 9
How are you planning on using Docstoc?