Escolar Documentos
Profissional Documentos
Cultura Documentos
k
i
i i
A P A B P B P
1
) ( ) | ( ) (
BAYES THEOREM
k
i
i i
j j j
j
A P A B P
A P A B P
B P
B A P
B A P
1
) ( ) | (
) ( ) | (
) (
) (
) | (
P (A
i
) : prior probabilities
P (B | A
i
) : conditional probabilities
P (A
j
| B) : posterior probabilities
Diagnosis of Illness
A prime example is the diagnosis of illness (though it relates
to using any signs for evaluation)
Assume 1 in 200 adults is afflicted with a disease
A test is available, when an individual has the disease a
positive result will occur 99%
An individual without the disease will show positive 2% of
the time
If an individual shows positive, what is the probability they
are ill? (How many events?)
Let A = {individual has disease}, A = {individual does not}
B = {positive test result}
Probabilities? P(A), P(A), P(B|A), P(B|A)??
P(A) = .005 P(A) = .995
P(B|A) = .99 P(B|A) = .02
What do we want to find??
P(A|B)?
Diagnosis of Illness
Let A = {individual has disease}, A = {individual does not}
B = {positive test result}
P(A) = .005 P(A) = .995
P(B|A) = .99 P(B|A) = .02
P(A|B) = ?
= P(A B) / P(B) = (Bayes)
P(A B) = ?
= P(B | A) P(A) = .00495 (also Bayes rearranged)
P(B)= ?
=P(B|A) P(A) + P(B|A) P(A) (LTP)
= .00495 + .0199 = .02485
P(A|B) = P(A B) / P(B) = .00495 / .02485 = .199
INDEPENDENCE
Conditional probability allows us to revise prior
probabilities, P(A) , as new information is available
(event B occurred), & obtain new, more accurate
posterior probabilities, P(A|B). Occurrence of B tells us
something about A.
Two events A & B are independent if:
P (A | B) = P (A)
Question: what about P(B|A)?
If A & B are independent, so are (i) A & B, (ii) A & B,
& (iii) A & B.
Independence (contd.)
A & B two mutually exclusive events (example?). Are they
independent? Why?
If B occurs, then A cannot occur so:
P(A | B) = 0 P (A), so if two events are mutually
exclusive, they cannot be independent
Proposition: A & B are independent iff:
Proof: P(A B) = P(A|B) P(B) = P(A) P(B)
So whats the probability of flipping tails with a quarter and
rolling a 6 on a die?
) ( ) ( B P A P B A P
Extension: Independence of
more than two events
If A B and C are independent
P ( A B C) = P(A) P(B) P(C)
P(A B) = P(A) P(B)
P(B C) = P(B) P(C)
P(A C) = P(A) P(C)
Extension: Independence of
more than two events
Events A
1
, A
2
, , A
n
are mutually independent if for
every k (2, 3, , n) & every subset of indices
i
1
, i
2
, , i
k
, then
In words: the events are mutually independent if the
probability of the intersection of any subset of the n
events is equal to the product of the individual
probabilities.
k k
A P A P A A P
i i i 1
1 1
Component Failure
Consider the braking system on a very unsafe roller coaster
consisting of 4 components (A,B,C,D)
During each run, any number of components may fail
The components are grouped into two sub-systems
(A,B) and (C,D)
The system functions (i.e., youll live) as long as at least one
component in each sub-system works
All component failure is independent
The probability that the system will still work after one run?
Example
The system functions as long as at least (A or B) and (C or
D) work
Probability of failures:
P(A)=.1 P(B)=.2 P(C)=.05 P(D)=.3
Failure after one run:
(A and B fails) or (C and D fails)
P( (A B) (C D) ) =
P(A)*P(B) + P(C)*P(D) ?
P(A)*P(B) + P(C)*P(D) P(A)*P(B)*P(C)*P(D)
.02 + .015 - .003 = .0347