CS计算机代考程序代写 Bayesian Bayesian network Name: SUID:

Name: SUID:

AA228/CS238: Decision Making under Uncertainty
Autumn 2020
Prof. Mykel J. Kochenderfer • Remote • email:

MIDTERM 1 Due date: October 2, 2020 (5pm)

You have 90 minutes to complete this exam. This exam is electronically timed; you do not have to
keep track of your own time. To accommodate those in other timezones and complex working situations,
you may choose any 90 minute window between 5pm PDT October 1, 2020 and 5pm PDT October 2, 2020
to take the exam. Answer all questions. You may consult any material (e.g., books, calculators, computer
programs, and online resources), but you may not consult other people inside or outside of the class. If you
need clarification on a question, please make a private post on Piazza. Only what is submitted prior to
the deadline will be graded.

Question 1. (2pts) The following graph encodes a Markov equivalence class:

A B C

D E

a) (1pt) How many members are in this class?

b) (1pt) Give the Markov blanket of node C.

Question 2. (4pts) Anna and Emma are shooting basketball free throws. In their game, they take four shots
each, and the one who makes the most baskets wins. Before we see them play, we start with independent
uniform priors over each player successfully making a basket with their shot. After taking three shots each,
Anna made two baskets and Emma made three. What is the probability that their game results in a tie?

Question 3. (7pts) We have the following Bayesian network with binary variables and dataset D consisting
of five samples, where b2, b5, c2, d3 represent missing entries:

A

B

C

D E

D =

A 1 1 0 1 0
B 1 b2 0 0 b5
C 1 c2 1 0 1
D 0 0 d3 1 1
E 0 1 1 1 1

a) (5pts) Perform a single iteration of expectation maximization given the priors P (b0|a1) = 0.7, P (b0|a0) =
0.5, P (c1) = 0.2, P (d1|c1) = P (e1|c1) = 0.6, P (d1|c0) = P (e1|c0) = 0.25. You only need to solve for θb
and θd. [For partial credit, please show your work by listing your sample weights.]

b) (2pts) Use the posterior mode to infer missing data entries b5 and d3 using the result from (a).

Question 4. (7pts) We would like to predict whether there will be a storm tomorrow based on historical
data. We have three variables we have observed in the past: a binary variable S that indicates whether there
was a storm coming, a binary variable W that indicates whether there was high wind, and a binary variable
H that indicates for whether there was high humidity. Counts from our observations are shown in the table
below:

1

S W H count

0 0 0 30
0 0 1 15
0 1 0 25
0 1 1 5
1 0 0 0
1 0 1 5
1 1 0 5
1 1 1 15

We decide to use a naive Bayes model, where S is the class, and W and H are the observations.

1. Taking a maximum likelihood estimation approach and using the counts in the table, compute the
parameters of the class prior distribution and the class conditional distributions.

2. Find the probability that there will be a storm tomorrow given that we observe high winds and high
humidity.

2