0% found this document useful (0 votes)
28 views4 pages

Ai HW-4

Uploaded by

Zulfiyye Aliyeva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views4 pages

Ai HW-4

Uploaded by

Zulfiyye Aliyeva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Homework assignment-4

Probability and Bayes Nets


1. Given Bayes Net
+g -g G
P(G) 0.1 0.9

P(+m | G) P(-m | G)
+g 0.667 0.333
-g 0.25 0.75
M

a) Fill in the joint probability table over G and M.

G M P(G,
+g +m M)
+g -m
-g +m
-g -m

b) What is P(+m) ?

c) P(+g | +m) ?

2. Given Bayes Net and full joint distribution


G M B C P (G, M, B, C) G M B C P (G, M, B, C)
+ + + + 1/150 - + + + 9/400
+ + + - 1/50 - + + - 27/400
+ + - + 1/100 - + - + 27/800
+ + - - 3/100 - + - - 81/800
+ - + + 1/300 - - + + 27/400
+ - + - 1/300 - - + - 27/400
+ - - + 1/75 - - - + 27/100
+ - - - 1/75 - - - - 27/100

Compute the following quantities. You may use either the full joint distribution
or the conditional tables, whichever is more convenient.
a) P(+b | +m) =

b) P(+b | +m, +g) =

c) P(+b) =

d) P(+c | +b) =

3. Given Bayes net

Based on the structure, which of the following are guaranteed to be true, and which are
guaranteed to be false?
(a) B ⊥G
(b) C ⊥ G | M
(c) G ⊥ S
(d) G ⊥ S | M
(e) G ⊥ S | B
(f) B ⊥ C
(g) B ⊥ C | G
Sampling and Dynamic Bayes Nets

Many people would prefer to eat ice cream on a sunny day than on a rainy day. We can model
this situation with a Bayesian network. Suppose we consider the weather, along with a person's
ice-cream eating, over the span of two days. We'll have four random variables: W 1 and W2 stand
for the weather on days 1 and 2, which can either be rainy R or sunny S, and the variables I 1 and
I2 represent whether or not the person ate ice cream on days 1 and 2, and take values T (for truly
eating ice cream) or F.

1. Suppose you decide to assume for modeling purposes that the weather on each day might
depend on the previous day's weather, but that ice cream consumption on day i is
independent of ice cream consumption on day i-1, conditioned on the weather on day i .
Draw a Bayes net encoding these independence assumptions.

2. Suppose you are given the following conditional probability distributions:

W 2 = S W2 = R I=T I=F

W 1 = S W1 = R

W1 = S .7 .3 W=S .9 .1
.6 .4
W1 = R .5 .5 W=R .2 .8

(a) P(W1)
(b) P(W2 | W1) (c) P(I | W)
Together with the graph you drew above, these distributions fully specify a joint probability
distribution for the four variables. Now we want to do inference, and in particular we'll try
approximate inference through sampling. Suppose we sample from the prior to produce the
following samples of (W1; I1; W2; I2) from the ice-cream model:

R, F, R, F R, F, R, F S, F, S, T S, T, S, T S, T, R, F
R, F, R, T S, T, S, T S, T, S, T S, T, R, F R, F, S, T

(c) What is ^
P(W2 = R), the probability that sampling assigns to the event W2 = R?
(d) Cross off samples rejected by rejection sampling if we're computing P(W2|I1 =T;I2= F)

Rejection sampling seems to be wasting a lot of effort, so we decide to switch to likelihood


weighting. Assume we generate the following six samples given the evidence I1 = T and I2 = F:

(W1; I1; W2; I2) = { <S; T; R; F>; <R; T; R; F>; <S; T; R; F>; <S; T; S; F>; <S; T; S; F>; <R; T;
S; F> }

(e) What is the weight of the first sample (S, T, R, F) above?

(f) Use likelihood weighting to estimate ^


P (W2 | I1 = T; I2 = F)

Variable Elimination

For the Bayes' net below, we are given the query P (Y | +z). All variables have binary domains.

a) Compute P (Y | +z) by variable elimination ordering: X, T, U, V, W.

b) What is the size of the largest factor that gets generated during the above process?

c) Does there exist a better elimination ordering (one which generates smaller largest
factors)?

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy