Can anyone show me how to do this problem?
Question 4: Sampling and Bayesian Network (25 points) We want to study people's exercise habits on sunny and rainy days. Suppose we consider the weather, along with a person's exercise, over the span of two days. We'll have four random variables: W and W stand for the weather on days 1 and 2, which can either be rainy (R) or sunny (S), and the variables E and E represent whether the person exercises on days 1 and 2 or not and take values T (for truly doing exercise) or F. We can model this as the following Dynamic Bayes Net with these probabilities. Note that this is a simple case of DBN and you can consider it as an HMM.
W: P(W=S) = 0.6, P(W=R) = 0.4
W': P(W'=S|W=S) = 0.7, P(W'=R|W=S) = 0.3, P(W'=S|W=R) = 0.5, P(W'=R|W=R) = 0.5
W S
E
P(E|W=T) = 0.9, P(E|W=F) = 0.1, P(E|W=T') = 0.2, P(E|W=F') = 0.8
S
R R
Suppose we produce the following sample of (W,E,W',E') from the exercise model: R,F,R,T S,T,S,T S,T,S,T S,T,R,F R,F,S,T R,F,R,F S,F,S,T S,T,S,T S,T,R,F
a) What is P(W=R), the probability that sampling assigns to the event W=R?
b) Assume we're computing P(W=B=T,E=F). Cross off samples above which are rejected by rejection sampling. 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 and E=F: W,E,W',E' = S,T,R,F S,T,R,F S,T,R,F S,T,R,F S,T,R,F S,T,R,F
c) What is the weight of the first sample (S,T,R,F) above?
d) Using likelihood weighting, estimate P(W=E=T,E=F).