A-11-Exam-Recap

Exam Preparation Class
.
QUESTION 2 on Basic Inference directly from definitions
Given is a Bayesian network A  B where A and B are binary
variables. Variable A stands for type of shirt with values (a0 = Tshirt; a1 = not T-shirt). Variable B stands for color of shirt with
values (b0 = red; b1 = purple). Denote z = p(a0).
Let P(b0|a0)=0.5 and let P(b0|a1)=0.25.
An observer examines a shirt color. Denote by e the process of
examination (which is influenced by internal conceptions and
laboratory light conditions). The observer declares: “the
likelihood of red is twice the likelihood of purple.
Provide a formula for the posterior probability of A after the
evidence is given. Namely, a formula for p(a0|e) (as a function of
z).
.
Answer:
Use the network A  BE
Set E=e.
Set P(e|b0) / P(e/b1) = 2.
Write a formula directly from the definition of Bayes network for
p(a0,e)= p(a0,b,e)= z p(b0|a0) p(e|b0) + z p(b1|a0) p(e|b1)
and for
p(a1,e) = p(a1,b,e)= (1-z) p(b0|a1) p(e|b0) + (1-z) p(b1|a1) p(e|b1)
Divide the two formulae.
It is a function of z.
Use the relationship p(a0,e)=1-p(a0,e) to obtain the answer.
QUESTION 3 on d-separation
Describe a linear algorithm for the following task.
Input: a Bayesian Network D=(V,E), a set of nodes J, and a set
of nodes Z.
Output: The set of all nodes X that are d-separated from J by Z.
(P.S. Due to soundness and completeness theorems, X is the largest set of variables that can be
shown to be conditionally independent of J, given Z, based on the graph structure alone.)
.
Answer (d-separation: from theorems to algorithms):
Use BFS with minor changes and linear preprocessing.
Consider a set of legal pairs of edges u – v –w according to dseparation. Namely, a pair is legal if edges meet head-to-head
and v is in Z or has a descendant in Z - or - the pair of edges do
not meet head-to-head and v is not in Z.
Construct a table:
Z
Set false in all entries. Set true for all v in Z. Iterate to their parents.
.
.
QUESTION 1: conditional independence properties (I(X,Z,Y)
.