Professional Documents
Culture Documents
• Teaching assistants:
– Feray Tuncalp, Mert Gurel, Onur Demiray, Syed Adil Abbas
Kazmi, Ibrahim Pehlivan
• Quiz 1: next class on October 8th, Tuesday at 14:30-14:50.
– Make sure to be in class on time!
– All subjects covered in homework 1 and 2 + independence.
• Make-up lecture for last Thursday
– Next Thursday, October 10 at 8:30 in SOSB08
– The time conflicts with some of your programs. It will be
videotaped and uploaded to BB.
• Homework 1&2 are on BB. Homework 3 will be on by
tomorrow.
• Office hours: on BB
1
ENGR 200
Lecture 5: Agenda
1. Review:
a) Conditional probability: total probability
law and Bayes’ rule
b) Independence
2. Conditional independence
3. Independence of many events
2
Definition of Conditional
Probability
A, B : two events
P(A|B) : probability that event A occurs
given event B has already occurred
P(A B)
P( A | B) A
P(B) B
3
The law of total probability
Let A1, A2, … Ak be mutually exclusive
and exhaustive (i.e., Ai =S) and B be
an arbitrary event in S. P(Ai)’s and P(B|
Ai)’s are known. Then the total
probability of B is given by:
k
P ( B ) P ( B | Ai ) P ( Ai )
i 1
Bayes theorem
P( A j B) P B | A j PA j
PA j | B k
j 1,2,..., k
P( B)
PB | A PA
i 1
i i
Conditional Probability in
Pictures
N : event of no virus
P(N) = 0.99
V : event of virus
+: event that the test shows virus P(+|V) = 0.90
- : event that the test shows no virus P(+|N) = 0.10
Interesting Questions:
• Does the person have the virus?
• Does his test result show that he has virus?
• Does the person have the virus when his test result shows that he has virus?
Conditional Probability in
Pictures
After the
test Probability that the person really
shows has the virus given that the test
virus shows virus?
P(S)= P(N)=
10
Class exercise
• Find the probability that a message
is spam given that it is identified as
spam (it contains words in the list),
i.e., find the conditional probability
P(S|A).
11
Two Events are
Independent If…
• When knowing one event does not
alter the probability of the other.
• P(A|B) = P(A)
• P(B|A) = P(B)
13
Conditional Independence
• Two events do not say anything about each other
GIVEN a third:
• P(A∩B | C) = P(A|C) P(B|C)
• P(A | B∩C) = P(A|C)
• P(B | A∩C) = P(B|C)
• Note: everything is the same except the C.
given
P( A1 A2 ) P( A1 ) P( A2 )
P( A1 A3 ) P( A1 ) P( A3 ) Pairwise
Independence
P( A2 A3 ) P( A2 ) P( A3 )
P( A1 A2 A3 ) P( A1 ) P( A2 ) P( A3 )
Are these independent?
• Consider two fair coin tosses:
– H1 = { 1st toss is a head }
– H2 = { 2nd toss is a head }
– D = { the two tosses are different }
Pairwise Independence does
not Imply Independence
• P(D|H1) = P(H1∩D)/P(H1) = ½ = P(D)
• P(H1∩H2∩D) = 0
• P(H1)P(H2)P(D) = ½ x ½ x ½ = 1/8
=> They are not independent
Example
22
Are these independent?
• Consider two rolls of a die.
– A = { 1st roll is 1, 2, or 3 }
– B = { 1st roll is 3, 4, or 5 }
– C = { the sum of the two rolls is 9 }
What did you learn/remember
in this class?
1. Conditional probability
2. Multiplication rule
3. Total probability law
4. Bayes’ rule
5. Conditional independence
6. Independence of many events
24