1.5.1 Law of Total Probability and Bayes Formula
1.5.1 Law of Total Probability and Bayes Formula
5 Lecture 3
1.5.1 Law of Total Probability and Bayes Formula
P(A B)
P(B|A) =
P(A)
P(A B) = P(A|B)P(B),
Proof. 1. To proof the multiplicative law for sets A, B and C, one simply apply consecutively the
denition of conditional probability and write
2. To proof the additive law for two sets, we write AB = A(Ac B) and B = (AB)(Ac B)
which are both the union of disjoint sets. Then from Lemma 1.12. 1. we have
and by the second equation into the rst equation, we have P(A B) = P(A) + P(B) P(A B).
Remark 1.22. Recall that one use to multiply down the tree diagram. The RHS of the multiplica-
tive law is exactly what you are computing when doing that.
Lemma 1.23. (Law of Total Probability) Suppose (Ai )i=1,...,k are mutually exclusive and exhaustive
k
of , that is i=1 Ai = , then for any event B, we have
k
P(B) = P(B|Ai )P(Ai )
i=1
Proof. It is easy to see that B = B and by using the fact that (Ai )i=1,...k is exhaustive of , we
can writ e
B =B
k
=B Ai
i=1
k
(By distributive law) = (B Ai )
i=1
9
Then by noticing that (B Ai )i=1,...,k are again disjoint sets and using the denition of conditional
probability, we have
k k
P(B) = P(B Ai ) = P(B|Ai )P(Ai )
i=1 i=1
then by applying the law of total probability to P(B) in the denominator, we have
P(B|A)P(A)
P(A|B) = k
i=1 P(B|Ai )P(Ai )
If the patient has the disease, the the test will be shown positive with probability 0.9.
If the patient does not have disease, the the test will show negative with probability 0.9.
P(B|A)P(A)
P(A|B) =
P(B|A)P(A) + P(B|Ac )P(Ac )
One needs only to compute the right hand side.
From the problem, we know that P(B|A) = 0.9, P(A) = 0.01, P(Ac ) = 0.01 and P(B c |Ac ) = 0.9.
To compute P(B|Ac ), we only need to notice that
P(B c |Ac ) + P(B|Ac ) = 1 (which can proven from the denition of conditional probability).
10