Presentation is loading. Please wait.

Presentation is loading. Please wait.

Bayes Net Lab. 1. Absolute Independence vs. Conditional Independence For any three random variables X, Y, and Z, a)is it true that if X  Y, then X 

Similar presentations


Presentation on theme: "Bayes Net Lab. 1. Absolute Independence vs. Conditional Independence For any three random variables X, Y, and Z, a)is it true that if X  Y, then X "— Presentation transcript:

1 Bayes Net Lab

2 1. Absolute Independence vs. Conditional Independence For any three random variables X, Y, and Z, a)is it true that if X  Y, then X  Y | Z? b)is it true that if X  Y | Z, then X  Y?

3 2. Valid Bayes Nets Below are four graphs. For each one, indicate whether this graph can be used to define a valid Bayes Net, or not. A BC D A BC D A BC D A BC D

4 3. Variable Elimination For the Bayes Net below, show the steps involved in variable elimination to compute P(C). You should eliminate first A, then B. A BC AP(A) +a.6 -a.4 ABP(B|A) +a+b.6 +a-b.4 -a+b.7 -a-b.3 BCP(C|B) +b+c.8 +b-c.2 -b+c.3 -b-c.7 CP(C) +c -c Compute:

5 4. Generating Samples Suppose your random number generator provides the following sequences of random numbers. Indicate which samples would be generated for this Bayes Net. Generate variable A before variable B. C A B D AP(A) +a.6 BP(B) +b.2 ABCP(C|A,B) +a+b+c.5 +a-b+c.6 -a+b+c.2 -a-b+c.3 CDP(D|C) +c+d.7 -c+d.6 Random Number Sequence 1:.1,.9,.4,.4 Sample generated: Random Number Sequence 2:.8,.9,.1,.7 Sample generated:

6 5. Rejection Sampling Suppose a sampling technique has generated the following counts for random variables A, B, C. Use rejection sampling to compute approximate values for the probabilities below. ABCCount +a+b+c200 +a+b-c240 +a-b+c320 +a-b-c110 -a+b+c40 -a+b-c1020 -a-b+c280 -a-b-c360 1.P(+a, +b, -c)? 2.P(+b, -c)? 3.P(-a | +b, -c)? 4.P(-c | -b)?

7 6. Likelihood Weighting For the query P(-b | +d, -a), generate samples using the random number sequences below. If there are too many random numbers in a sequence, ignore the extras. C A B D AP(A) +a.6 BP(B) +b.2 ABCP(C|A,B) +a+b+c.5 +a-b+c.6 -a+b+c.2 -a-b+c.3 CDP(D|C) +c+d.7 -c+d.6 Random Number Sequence 1:.1,.9,.4,.4 Sample generated, and its probability: Random Number Sequence 2:.8,.9,.1,.7 Sample generated, and its probability: Query of Interest: P(-b | +d, -a)

8 7. Gibbs Sampling Query: P(-b | +d, -a). Initial random sample: {-a, -b, +d, +c} C A B D AP(A) +a.6 BP(B) +b.2 ABCP(C|A,B) +a+b+c.5 +a-b+c.6 -a+b+c.2 -a-b+c.3 CDP(D|C) +c+d.7 -c+d.6 Variable chosen: B, r  0.3 Sample generated: Variable chosen: C, r  0.8 Sample generated: Query of Interest: P(-b | +d, -a)

9 8. Markov Blanket For the variables below, what are their Markov Blankets? Battery Dead: No gas: Fan belt broken: Battery dead Battery age Fan belt broken Battery meter No oil Battery flat Alternator broken Not charging No gas Starter broken Fuel line blocked Lights Gas gauge Oil light Car won’t start dipstick

10 9. The Monty Hall Problem Extra Credit (5 points) This is a challenge problem, based on a game that used to be played on a TV program hosted by Monty Hall. There are three doors. Behind two of them, there is a small prize (some chewing gum). Behind the third one is a large prize ($10,000). Your job is to guess which door has the big prize, but there are multiple steps to the guessing.

11 9. The Monty Hall Problem (continued) Door 1Door 2Door 3 Game rules: 1.You select a door (but you don’t get to see what’s behind it yet). 2.Monty Hall selects a door that you have not selected (always one with a small prize), and shows you what’s behind it. 3.You get to stick with your door, or choose the other unopened door.

12 9. The Monty Hall Problem (continued) Door 1Door 2Door 3 For example: You first choose 1 Monty Hall shows you that there is chewing gum behind door 3. After you see what’s behind Door 3, you may choose to open Door 1 or Door 2.

13 9. The Monty Hall Problem (continued) Door 1Door 2Door 3 You first choose 1 Monty Hall shows you that there is chewing gum behind door 3. Make the following assumptions: a.The big prize was initially assigned with 1/3 probability for each door. b.Monty Hall never reveals the door for the big prize in the second step. Problem: What is the probability that the big prize is behind door 1, and what is the probability that the big prize is behind door 2?


Download ppt "Bayes Net Lab. 1. Absolute Independence vs. Conditional Independence For any three random variables X, Y, and Z, a)is it true that if X  Y, then X "

Similar presentations


Ads by Google