CS886 (c) 2013 Pascal Poupart
1
Module 2 Probability Theory CS 886 Sequential Decision Making and - - PowerPoint PPT Presentation
Module 2 Probability Theory CS 886 Sequential Decision Making and Reinforcement Learning University of Waterloo 1 CS886 (c) 2013 Pascal Poupart A Decision Making Scenario You are considering to buy a used car Is it in good
CS886 (c) 2013 Pascal Poupart
1
CS886 (c) 2013 Pascal Poupart
2
CS886 (c) 2013 Pascal Poupart
3
CS886 (c) 2013 Pascal Poupart
4
CS886 (c) 2013 Pascal Poupart
5
CS886 (c) 2013 Pascal Poupart
6
incorporation of new evidence
CS886 (c) 2013 Pascal Poupart
7
CS886 (c) 2013 Pascal Poupart
8
CS886 (c) 2013 Pascal Poupart
9
CS886 (c) 2013 Pascal Poupart
10
CS886 (c) 2013 Pascal Poupart
11
CS886 (c) 2013 Pascal Poupart
12
CS886 (c) 2013 Pascal Poupart
13
CS886 (c) 2013 Pascal Poupart
14
CS886 (c) 2013 Pascal Poupart
15
CS886 (c) 2013 Pascal Poupart
16
CS886 (c) 2013 Pascal Poupart
17
CS886 (c) 2013 Pascal Poupart
18
CS886 (c) 2013 Pascal Poupart
19
CS886 (c) 2013 Pascal Poupart
20
CS886 (c) 2013 Pascal Poupart
21
CS886 (c) 2013 Pascal Poupart
22
cold ~cold headache 0.108 0.012 ~headache 0.016 0.064 cold ~cold headache 0.072 0.008 ~headache 0.144 0.576 sunny ~sunny P(headacheΛsunnyΛcold) = 0.108 P(~headacheΛsunnyΛ~cold) = 0.064 P(headacheVsunny) = 0.108 + 0.012 + 0.072 + 0.008 + 0.016 + 0.064 = 0.28 P(headache) = 0.108 + 0.012 + 0.072 + 0.008 = 0.2 marginalization
CS886 (c) 2013 Pascal Poupart
23
H F
H=“Have headache” F=“Have Flu” P(H)=1/10 P(F)=1/40 P(H|F)=1/2 Headaches are rare and flu is rarer, but if you have the flu, then there is a 50-50 chance you will have a headache
CS886 (c) 2013 Pascal Poupart
24
H F
H=“Have headache” F=“Have Flu” P(H)=1/10 P(F)=1/40 P(H|F)=1/2 P(H|F)= Fraction of flu inflicted worlds in which you have a headache =(# worlds with flu and headache)/ (# worlds with flu) = (Area of “H and F” region)/ (Area of “F” region) = P(H Λ F)/ P(F)
CS886 (c) 2013 Pascal Poupart
25
CS886 (c) 2013 Pascal Poupart
26
H F
H=“Have headache” F=“Have Flu” P(H)=1/10 P(F)=1/40 P(H|F)=1/2 One day you wake up with a
headaches so I must have a 50- 50 chance of coming down with the flu”
CS886 (c) 2013 Pascal Poupart
27
H F
H=“Have headache” F=“Have Flu” P(H)=1/10 P(F)=1/40 P(H|F)=1/2 One day you wake up with a
headaches so I must have a 50- 50 chance of coming down with the flu”
CS886 (c) 2013 Pascal Poupart
28
H F
H=“Have headache” F=“Have Flu” P(H)=1/10 P(F)=1/40 P(H|F)=1/2 One day you wake up with a
headaches so I must have a 50- 50 chance of coming down with the flu”
CS886 (c) 2013 Pascal Poupart
29
cold ~cold headache 0.108 0.012 ~headache 0.016 0.064 cold ~cold headache 0.072 0.008 ~headache 0.144 0.576 sunny ~sunny P(headache Λ cold | sunny) = P(headache Λ cold Λ sunny) / P(sunny) = 0.108/(0.108+0.012+0.016+0.064) = 0. 54 P(headache Λ cold | ~sunny) = P(headache Λ cold Λ ~sunny) / P(~sunny) = 0.072/(0.072+0.008+0.144+0.576) = 0.09
CS886 (c) 2013 Pascal Poupart
30
CS886 (c) 2013 Pascal Poupart
31
CS886 (c) 2013 Pascal Poupart
32
CS886 (c) 2013 Pascal Poupart
33
CS886 (c) 2013 Pascal Poupart
34
She knows that if a person is selected at random from the population, they have a 10-7 chance of having Asian flu. 1 in 100 people suffer from a fever.
fever?
Evidence = Symptom (F) Hypothesis = Cause (A)
CS886 (c) 2013 Pascal Poupart
35
CS886 (c) 2013 Pascal Poupart
36
CS886 (c) 2013 Pascal Poupart
37
n
CS886 (c) 2013 Pascal Poupart
38
CS886 (c) 2013 Pascal Poupart
39
CS886 (c) 2013 Pascal Poupart
40
CS886 (c) 2013 Pascal Poupart
41
Such a probability distribution is sometimes called a naïve Bayes model. In practice, they work well – even when the independence assumption is not true