Questions 1-6 refer to the Bayesian network in Figure 1. Questions 7 and 8 refer to the Bayesian network in Figure 2.

Figure 1: A Bayesian network graph establishing relations between various car problems and their causes.
Answer: A = B, because the "battery age" variable and the "no oil" variable are conditionally independent given the value for the "battery age" variable.
Answer: A = B, because the "battery age" variable and the "no oil" variable are conditionally independent given the value for the "battery age" variable, and the "battery age" variable and the "fanbelt broken" variable are also conditionally independent given the value for the "battery age" variable. Both A and B are equal to P(E | "battery dead" = true).
Answer: A > B. Since "alternator broken" and "fanbelt broken" are both causes of "no charging", given "no charging"=true, knowing that one cause is true makes the other cause less likely.
Answer: A < B. Since "no gas" is a cause of "car won't start", given "car won't start"=true, the cause for that becomes more likely.
Answer: We use the following abbreviations:
ncf stands for "no charging = false"
abt stands for "alternator broken = true"
abf stands for "alternator broken = false"
Using the above abbreviations, we have:
P(ncf) = P(ncf | abt) * P(abt) + P(ncf | abf) * P(abf)
= 0.05 * 0.02 + 0.99 * 0.98 = 0.9712
Answer: We use the following abbreviations:
ba3 stands for "battery age <= 3 years"
ba4 stands for "battery age > 3 years"
bdt stands for "battery dead = true"
Using the above abbreviations, we have:
P(ba3 | bdt) = P(bdt | ba3) * P(ba3) / P(bdt) = 0.02 * 0.7 / P(bdt)
P(bdt) = P(bdt | ba3) * P(ba3) + P(bdt | ba4) * P(ba4)
= 0.02 * 0.7 + 0.1 * 0.3 = 0.044
Consequently, P(ba3 | bdt) = P(bdt | ba3) * P(ba3) / P(bdt) = 0.02 * 0.7 / 0.044 = 0.318.

Figure 2: A Bayesian network establishing relations between events on the burglary-earthquake-alarm domain, together with complete specifications of all probability distributions.
Answer: We use the following abbreviations:
bf stands for "burglary = false"
et stands for "earthquake = true"
af stands for "alarm = false"
jt stands for "JohnCalls = true"
mf stands for "MaryCalls = false"
Using the above abbreviations, we have:
P(bf, et, af, jt, mf) = P(bf) * P(et) * P(af | bf, et) * P(jt | af) * P(mf | af)
= (1 - 0.001) * 0.002 * (1 - 0.29) * 0.05 * (1-0.01) = 7.022 * 10-5
Answer: We use the following abbreviations:
bf stands for "burglary = false"
bt stands for "burglary = true"
et stands for "earthquake = true"
af stands for "alarm = false"
jt stands for "JohnCalls = true"
mf stands for "MaryCalls = false"
Using the above abbreviations, we have:
P(et, af, jt, mf) = P(bf, et, af, jt, mf) + P(bt, et, af, jt, mf)
= P(bf) * P(et) * P(af | bf, et) * P(jt | af) * P(mf | af) + P(bt) * P(et) * P(af | bf, et) * P(jt | af) * P(mf | af)
= (1 - 0.001) * 0.002 * (1 - 0.29) * 0.05 * (1-0.01) + 0.001 * 0.002 * (1 - 0.95) * 0.05 * (1-0.01)
= 7.022 * 10-5 + 4.95 * 10-9

Figure 3: A decision tree for estimating whether the patron will be willing to wait for a table at a restaurant.
Suppose that, on the entire set of training samples available for constructing the decision tree of Figure 3, 80 people decide to wait, and 20 people decide not to wait. What is the initial entropy at node A (before the test is applied)? Write an expression that fully specifies the answer numerically.
Answer: We denote by log2(x) the logarithm base 2 of x. Then:
Entropy(A) = -80/100 * log2(80/100) - 20/100 * log2(20/100) = 0.7219
Answer: The information gain is 0, because all training examples at node D give the same answer (answer=yes) to the question of whether it is weekend.
Answer: Create a classifier H' that, for any basketball game, outputs the opposite of what H outputs. This is easy to do, since we are given classifier H, so we always know what H outputs. Then, the accuracy of H' will be 72%, more than the 60% we were asked to achieve.
In the following questions, you do not have to perform all numerical calculations, but you have to fully specify the numerical value of each answer.
a. Given that the first e-mail you got from sensor S indicates a daily high under 80 degrees, what is the maximum likelihood estimate that sensor S is placed in Maine? Show how you derive your answer.
Answer: The ML estimate is that indeed the sensor S was placed in Maine, since that hypothesis (that the sensor was placed in Maine) maximizes the probability of the data:
P(observation | Maine) = 0.8 > P(observation | Sahara) = 0.1
b. Given that the first e-mail you got from sensor S indicates a daily high under 80 degrees, what is the probability that the sensor is placed in Maine?
Answer: Let o1u80 stand for "first observation = daily high under 80 degrees". We first need to compute P(o1u80):
p(o1u80) = p(o1u80 | Maine) * P(Maine) + p(o1u80 | Sahara) * P(Sahara)
= 0.8 * 0.05 + 0.1 * 0.95 = 0.135
Then, we compute P(Maine | o1u80):
p(Maine | o1u80) = p(o1u80 | Maine) * P(Maine) / P(o1u80)
= 0.8 * 0.05 / 0.135 = 0.2963
c. Given that the first e-mail you got from sensor S indicates a daily high under 80 degrees, what is the probability that the second e-mail also indicates a daily high under 80 degrees?
Answer: We use these abbreviations:
Then, using the answer from Problem 4b, we compute P(o2u80 | o1u80):
p(o2u80 | o1u80) = p(o2u80 | Maine, o1u80) * P(Maine | o1u80) + p(o2u80 | Sahara, o1u80) * P(Sahara | o1u80)
= 0.8 * 0.2963 + 0.1 * (1 - 0.2963) = 0.3074