Overview
Decision theory example
Probability basics
Conditional probability
Axioms of probability
Joint probability distribution
Bayes rule
Bayes rule: Example
Tip: for efcient Lisp code, see
http://www.cs.utexas.edu/users/novak/lispeff.html
1
Decision Theory: Example
Decision theory = Probability theory + Utility theory
Utility of Resulting State
Probability
Action 1
10
0.2
Action 2
10000
0.001
Action 3
5
0.799
Which action would an optimal Decision Theoretic Agent take?
2
Decision Theory: Example
Decision theory = Probability theory + Utility theory
Utility of Resulting State
Probability
Expected Utility
Action 1
10
0.2
2
Action 2
1000
0.001
1
Action 3
5
0.799
3.995 Action 3 has the maximum expected utility, thus action 3 will be carried
out.
3
Probability: Notations
a
Random variable: variable that can take on different values
–
A;B;:::
: boolean values (
T
or
F
).
–
X;Y;:::
: numerical values or other multivalued
enumerations (1, 2, 0.5, Cloudy, Rainy, Sunny, ...)
P(X=v)
:probabilityof the variable
X
having value
v.
–This can be viewed as an
event
.
–For boolean variables,
P(A)
means
P(A=T)
, and
P(:A)
means
P(A=F)
.
P(X)
:probability distribution, a full list of probabilities for all
possible values that
X
can take (note that
P
is inbold.
aAll conventions follow Russel & Norvig
4
Examples
Boolean: P(I nf ected)=0:01
,P(:I nf ected)=0:99
.
Multivalued: P(D ice=1)=
1
6
;P(D ice=2)=
1
6
;:::
Multivalued: P(W eather=S unny)=0:7; P(W eather=R ainy)=0:2;:::
5
Logical Connectives and Conditional Probability
Logical connectives can be used: P(A_B);P(A^:B);P(C av ity^:Insured);
etc.
Conditional Probability
P(AjB)
(read
probability of
A
given
B
):
P(CavityjT oothache)=0:8
As new evidence comes in, the conditional probability gets
updated:
P(C av ityjT oothache^B adB r eath |
{z
}
)
6
Conditional Probability
A
B
A/\B
= P(A|B) = P(A/\B)
P(B)
U
Think about theareaoccupied by each event.
The bounding rectangle
U
has an area of 1, thus
P(A)=
Area of
A
Area of
U
=
Area of
A
1
=
Area of
A P(AjB)
means
B
now takes on the role of
U. Within this
limited event space, what is the probability of
A.
7
The Axioms of Probability
All axioms
1. All probabilities are between 0 and 1
0P(A)1
2. For a valid proposition A (
T
under all interpretations):
P(A)=1;
and for a inconsistent proposition A (
F
under all
interpretations):
P(A)=0
.
3.
P(A_B)=P(A)+P(B)P(A^B)
Other properties follow from these three axioms.
8
Other Properties
From the axioms,
P(A_:A)=P(A)+P(:A)P(A^:A) P(T)=P(A)+P(:A)P(F) 1=P(A)+P(:A) P(:A)=1P(A)
More generally, thesumof probabilities
P(X=v)
is 1, for all
values
vthe random variable
X
can take:
2 4
X v2V
P(X=v)
3 5=1;
where
V
is the set of all possible values
X
can take.
9
Joint Probability Distribution
For random variables
X1
;X2
;:::;Xn
,
Anatomic eventis an assignment of particular values to each
random variable.
Thejoint probability distribution
P(X1
;X2
;:::;Xn
)
completely species the probabilities of allatomic events.
Thus, 2 4
X (v1
;v2
;:::;vn
)2V
P(X1
=v1
;X2
=v2
;:::;Xn
=vn
)
3 5=1; where
V
is a set of all possible
n
vectors that the vector
(X1
;X2
;::;Xn
)
can assume..
10
Joint Probability Distribution: Example
Toothache
:Toothache
Sum
Cavity
0:040:06
P(C)=0:1
:Cavity
0:010:89
P(:C)=0:9
Sum
P(T)=0:05P(:T)=0:95
P=1:0
Abbreviations:
C=C av ity
,T=T oothache P(C_T)=P(C)+P(T)P(C^T) =0:1+0:050:04=0:11 P(CjT)=
P(C^T)
P(T)
=
0:04
0:05
=0:8 P(TjC)=
P(C^T)
P(C)
=
0:04
0:1
=0:5
In practice,