Law of Total Probability and Bayes' Formula: Lecture Notes for Math331, Fall 2008, Study notes of Mathematics

Lecture notes on the law of total probability and bayes' formula from a university mathematics course, math331, taught by david anderson in the fall of 2008. The notes include theorems, proofs, examples, and exercises. The law of total probability states that the probability of an event can be calculated as the sum of the probabilities of that event occurring under each mutually exclusive condition. Bayes' formula is a theorem that describes how to update the probability of a hypothesis as more evidence or information becomes available.

Typology: Study notes

Pre 2010

Uploaded on 09/02/2009

koofers-user-jl2
koofers-user-jl2 🇺🇸

9 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Sections 3.3 and 3.4 lecture notes
Math331, Fall 2008
Instructor: David Anderson
Section 3.3
Theorem 1 (Law of total probability).Let Aand Bbe events with P(B)>0. Then
P(A) = P(A|B)P(B) + P(A|Bc)P(Bc).
Proof.
P(A|B)P(B) + P(A|Bc)P(Bc) = P(AB) + P(ABc) = P(A),
where final equality follows from mutual exclusiveness.
Example 1. In a hospital, 35% of those with high blood pressure have had strokes and 20%
of those without high blood pressure have had strokes. If 40% of the patients have high
blood pressure, what percent of the patients have had strokes?
Solution: Let Abe the event of a random patient having had a stroke. Let Bbe the event
that a person had high blood pressure. We want P(A).
P(A) = P(A|B)P(B) + P(A|Bc)P(Bc) = .35 .4 + .2.6 = .14 + .12 = .26.
Definition 1. Let {B1, . . . , Bn}be a set of nonempty subsets of the sample space S. If the
sets Biare mutually exclusive and SBi=Sthen the set {B1,...,Bn}is called a partition
of S.
Theorem 2 (Law of total probability).Let {B1,...,Bn}be a partition of Swith P(Bi)>0.
Then for any A
P(A) = P(A|B1)P(B1) + P(A|B2)P(B2) + ···+P(A|Bn)P(Bn) =
n
X
i=1
P(A|Bi)P(Bi).
Proof.
XP(A|Bi)P(Bi) = XP(ABi) = P(A),
where final equality follows from mutual exclusiveness. (COULD BE INFINITE TOO)
Example 2. An army has 4 sharpshooters. The probabilities of each hitting a target at a
given distance are .4, .6, .35, and .7, respectively. What is the probability that a given target
will be hit if the shooter is chosen randomly?
Solution: Let Abe the event that the target is hit. Let Bibe the probability that the ith
shooter is chosen. Then
P(A) = XP(A|Bi)P(Bi) = .4/4+.6/4+.35/4+.7/4 = (.4+.6+.35+.7)/4 = 2.05/4 = .5125.
Hw pgs. 96 - 97 #’s 1, 7, 9, 13.
1
pf2

Partial preview of the text

Download Law of Total Probability and Bayes' Formula: Lecture Notes for Math331, Fall 2008 and more Study notes Mathematics in PDF only on Docsity!

Sections 3.3 and 3.4 lecture notes Math331, Fall 2008 Instructor: David Anderson

Section 3.

Theorem 1 (Law of total probability). Let A and B be events with P (B) > 0. Then

P (A) = P (A | B)P (B) + P (A | Bc)P (Bc).

Proof. P (A | B)P (B) + P (A | Bc)P (Bc) = P (AB) + P (ABc) = P (A),

where final equality follows from mutual exclusiveness.

Example 1. In a hospital, 35% of those with high blood pressure have had strokes and 20% of those without high blood pressure have had strokes. If 40% of the patients have high blood pressure, what percent of the patients have had strokes?

Solution: Let A be the event of a random patient having had a stroke. Let B be the event that a person had high blood pressure. We want P (A).

P (A) = P (A | B)P (B) + P (A | Bc)P (Bc) =. 35 ∗ .4 +. 2 ∗ .6 = .14 + .12 =. 26.

Definition 1. Let {B 1 ,... , Bn} be a set of nonempty subsets of the sample space S. If the sets Bi are mutually exclusive and

Bi = S then the set {B 1 ,... , Bn} is called a partition of S.

Theorem 2 (Law of total probability). Let {B 1 ,... , Bn} be a partition of S with P (Bi) > 0. Then for any A

P (A) = P (A | B 1 )P (B 1 ) + P (A | B 2 )P (B 2 ) + · · · + P (A | Bn)P (Bn) =

∑^ n

i=

P (A | Bi)P (Bi).

Proof. (^) ∑

P (A | Bi)P (Bi) =

P (ABi) = P (A),

where final equality follows from mutual exclusiveness. (COULD BE INFINITE TOO)

Example 2. An army has 4 sharpshooters. The probabilities of each hitting a target at a given distance are .4, .6, .35, and .7, respectively. What is the probability that a given target will be hit if the shooter is chosen randomly?

Solution: Let A be the event that the target is hit. Let Bi be the probability that the ith shooter is chosen. Then

P (A) =

P (A | Bi)P (Bi) =. 4 /4+. 6 /4+. 35 /4+. 7 /4 = (.4+.6+.35+.7)/4 = 2. 05 /4 =. 5125.

Hw pgs. 96 - 97 #’s 1, 7, 9, 13.

Section 3.4: Bayes’ Formula

Motivation: Suppose that A is an event that typically follows the events B 1 , B 2 ,... , Bn, which we know a lot about, and that are a partition with P (Bi) > 0. Suppose we know P (Bk) and P (A | Bk), for each k. But we want P (Bk | A).

Terminology: Bi’s are the hypotheses, P (Bi) is prior probability of Bi, and P (Bi | A) is called the posterior probability of Bi given A.

What to do?

P (Bk | A) =

P (BkA) P (A)

P (A | Bk)P (Bk) P (A)

=

P (A | Bk)P (Bk) ∑ P (A | Bi)P (Bi)

This is Bayes’ theorem. (DON’T MEMORIZE. SIMPLE TO DERIVE)

Example 3. An army has 4 sharpshooters. The probabilities of each hitting a target at a given distance are .4, .6, .35, and .7, respectively. The shooter is always chosen at random. Suppose that the target is hit. What is the probability the shooter was shooter number 2.

Solution: Let A be the event that the target was hit. Let Bi be the event that the ith shooter was chosen. Then

P (B 2 | A) =

P (A | B 2 )P (B 2 )

P (A | Bi)P (Bi)

Example 4. Suppose that 5% of the men and 2% of the women working at a company make over 100, 000 a year. If 30% of the employees of the company are women, what percent of those who make over 100,000 a year are women?

Solution: Let A be the event that an employee is a woman and B be the event that an employee makes over 100k. Have P (B|Ac) = .05, P (B|A) = .02, P (A) = .3, P (Ac) = .7. Want P (A|B). Using Theorem

P (A|B) =

P (B|A)P (A)

P (B|A)P (A) + P (B|Ac)P (Ac)

Hw: pgs 105 - 106. #’s 1, 2, 8.