Cse 150 HW1
Cse 150 HW1
Cse 150 HW1
Assignment 1
Winter 2015
1.1
Kullback-Leibler distance
Often it is useful to measure the difference between two probability distributions over the same random
variable. For example, as shorthand let
pi = P (X = xi |E),
qi = P (X = xi |E 0 )
denote the conditional distributions over the random variable X for different pieces of evidence E 6= E 0 .
The Kullback-Leibler (KL) distance between these distributions is defined as:
KL(p, q) =
pi log(pi /qi ).
1.2
Conditional independence
Show that the following three statements about random variables X, Y , and Z are equivalent:
P (X, Y |Z) = P (X|Z)P (Y |Z)
P (X|Y, Z) = P (X|Z)
P (Y |X, Z) = P (Y |Z)
In other words, show that each one of these statements implies the other two. You should become fluent
with all these ways of expressing that X is conditionally independent of Y given Z.
1.3
Creative writing
Attach events to the binary random variables X, Y , and Z that are consistent with the following patterns of
commonsense reasoning. You may use different events for the different parts of the problem.
(a) Explaining away:
P (X = 1|Y = 1) > P (X = 1),
P (X = 1|Y = 1, Z = 1) < P (X = 1|Y = 1)
(b) Accumulating evidence:
P (X = 1) > P (X = 1|Y = 1) > P (X = 1|Y = 1, Z = 1)
(c) Conditional independence:
P (X = 1, Y = 1) > P (X = 1)P (Y = 1)
P (X = 1, Y = 1|Z = 1) = P (X = 1|Z = 1)P (Y = 1|Z = 1)
1.4
Probabilistic inference
Recall the probabilistic model that we described in class for the binary random variables {E = Earthquake,
B = Burglary, A = Alarm, J = JohnCalls, M = MaryCalls}. We also expressed this model as a belief
network, with the directed acyclic graph (DAG) and conditional probability tables (CPTs) shown below:
P(E=1) = 0.002
Earthquake
Burglar
Alarm
P(J=1|A=0) = 0.05
P(J=1|A=1) = 0.90
John Calls
P(B=1) = 0.001
P(A=1|E=0,B=0) = 0.001
P(A=1|E=0,B=1) = 0.94
P(A=1|E=1,B=0) = 0.29
P(A=1|E=1,B=1) = 0.95
Mary Calls
P(M=1|A=0) = 0.01
P(M=1|A=1) = 0.70
Compute numeric values for the following probabilities, exploiting relations of conditional independence as
much as possible to simplify your calculations. You may re-use numerical results from lecture, but otherwise
show your work. Be careful not to drop significant digits in your answer.
(a) P (E = 1|A = 1)
(b) P (E = 1|A = 1, B = 1)
(c) P (A = 1|J = 0)
(d) P (A = 1|J = 0, M = 0)
(e) P (A = 1|M = 1)
(f) P (A = 1|M = 1, E = 0)
Consider your results in (b) versus (a), (d) versus (c), and (f) versus (e). Do they seem consistent with
commonsense patterns of reasoning?