Description
Questions
This will be a noncoding homework. Please upload a digital copy of your solution on CCLE. Submitted les can be in either PDF or plain text. You may also submit a scanned PDF of a handwritten solution, but please ensure that the scanned le is clearly legible.

Consider the following:
An oil well may be drilled on Mr. G’s farm in LA. Based on what has happened to similar farms, we judge the probability of only oil being present to be .3, the probability of only natural gas being present to be .2, and the probability of neither being present to be .5. Oil and gas never occur together. If oil is present, a geological test will give a positive result with probability .8; if natural gas is present, it will give a positive result with probability .2; and if neither are present, the test will be positive with probability .1.


Model this problem as a Bayesian network over three variables: Oil, Gas, and Test.



Suppose the test comes back positive. What’s the probability that oil is present?


Consider the Bayesian network in Figure 1:


Express Pr(A; B; C; D; E; F; G; H) as a multiplication of conditional and marginal probabilities, according to the factorization encoded in the network structure.



Express Pr(E; F; G; H) in terms of factors instead of (conditional) probabilities.



Express Pr(a; :b; c; d; :e; f; :g; h) in terms of the parameters in the CPTs (a denotes A = 1 and

:a denotes A = 0). Use placeholder symbols for the parameters that are not shown in the CPTs.


Compute Pr(:a; b) and Pr(:e j a). Justify your answers. Hint: leaf nodes that are not part of the probability query can be removed from the network without a ecting the computed probability.



List the Markovian assumptions (also known as topological semantics) encoded in the Bayesian network structure.



Provide the Markov blanket for variable D.



Multiply the factors (tables) corresponding to Pr(DjAB) and Pr(EjB).



Sum out D from the factor (table) computed above.

Submission
Submit all solution les on Gradescope.
Submit your solution in a le named hw6.pdf .
1

B
C D E
F

H

A
Pr(A)
B
Pr(B)
B
E
Pr(EjB)
1
1
.1
1
.1
1
.6
1
0
.9
0
.9
0
.4
0
1
.8
0
0
.2
Pr(DjAB)
A
B
D
1
1
1
.7
1
1
0
.3
1
0
1
.6
1
0
0
.4
0
1
1
.2
0
1
0
.8
0
0
1
.8
0
0
0
.2
Figure 1: A Bayesian network with some of its CPTs.
By submitting this homework, you agree to the following honor code.
You are encouraged to work on your own in this class. If you get stuck, you may discuss the problem with up to two other students, PROVIDED THAT YOU SUBMIT THEIR NAMES ALONG WITH YOUR ASSIGNMENT. ALL SOLUTIONS MUST BE WRITTEN UP INDEPENDENTLY, HOWEVER. This means that you should never see another student’s solution before submitting your own. You may always discuss any problem with me or the TAs. YOU MAY NOT USE OLD SOLUTION SETS UNDER ANY CIRCUMSTANCES. Making your solutions available to other students, EVEN INADVERTENTLY (e.g., by keeping backups on github), is aiding academic fraud, and will be treated as a violation of this honor code.
You are expected to subscribe to the highest standards of academic honesty. This means that every idea that is not your own must be explicitly credited to its author. Failure to do this constitutes plagiarism. Plagiarism includes using ideas, code, data, text, or analyses from any other students or individuals, or any sources other than the course notes, without crediting these sources by name. Any
2
verbatim text that comes from another source must appear in quotes with the reference or citation immediately following. Academic dishonesty will not be tolerated in this class. Any student suspected of academic dishonesty will be reported to the Dean of Students. A typical penalty for a rst plagiarism o ense is suspension for one quarter. A second o ense usually results in dismissal from the University of California.
3