CS471- Homework 5
Due date: Feb ??th at 11:59pm EST
Introduction
The objective of this assignment is to get familiar with Probability and Bayesian Networks.
Submission
Your homework must be typed and must contain yo
...
CS471- Homework 5
Due date: Feb ??th at 11:59pm EST
Introduction
The objective of this assignment is to get familiar with Probability and Bayesian Networks.
Submission
Your homework must be typed and must contain your name and Purdue ID. To submit your
assignment, log into data.cs.purdue.edu (physically go to the lab or use ssh remotely)
and follow these steps:
1. To ssh use the command: ssh
[email protected]
2. Make a directory named username-hw5 (all letters in lower case)
3. Copy your PDF and code inside it. To do it remotely use the comand from your
computer:
scp ./path/to/your-file.pdf
[email protected]:./remote/path/from-home-dir/
4. Go to the directory containing username-hw5 (e.g., if the files are in /homes/aporco/aporcohw5, go to /homes/aporco), and execute the following command:
turnin -c cs471 -p hw5 username-hw5
(e.g. Aldo would use: turnin -c cs471 -p hw5 aporco-hw5 to submit his work)
5. To overwrite an old submission, simply execute this command again.
6. To verify the contents of your submission, execute the following command:
turnin -v -c cs471 -p hw5
Required files
You will need to submit 1 file:
• The PDF containing your typed answers.
1Problem Set
Problem 1: Give a joint distribution for Boolean random variables A, B, and C for each
scenario. Give a brief intuitive interpretation of the variables. The notation i(x; y) means
that x and y are independent.
a. i(A; B), i(A; C), and i(B; C).
b. i(A; B) and i(A; C), but not i(B; C).
c. i(A; B) and i(A; C), but not i(A; B ^ C).
Problem 2: Given the full joint distribution shown in Figure 13.3, calculate the following:
a. P(toothache)
P(toothache) = 0:108 + 0:012 + 0:016 + 0:064 = 0:2
b. P(Cavity)
This asks for the vector of probability values for the random variable Cavity. It has two values, which we list in the order htrue; falsei. First add up 0:108+0:012+0:072+0:008 = 0:2.
Then we have, P(Cavity) = h0:2; 0:8i.
c. P(T oothache j cavity)
This asks for the vector of probability values for Toothache, given that Cavity is true.
P(T oothache j cavity) = h(:108 + :012)=0:2; (0:072 + 0:008)=0:2i = h0:6; 0:4i
d. P(Cavity j toothache _ catch)
This asks for the vector of probability values for Cavity, given that either Toothache or
Catch is true. First compute P(toothache_catch) = 0:108+0:012+0:016+0:064+0:072+
0:144 = 0:416. Then P(Cavity j toothache_catch) = h(0:108+0:012+0:072)=0:416; (0:016+
0:064 + 0:144)=0:416i = h0:4615; 0:5384i
Problem 3: Suppose you are a witness to a nighttime hit-and-run accident involving a
taxi in Athens. All taxis in Athens are blue or green. You swear, under oath, that the taxi
was blue. Extensive testing shows that, under the dim lighting conditions, discrimination
between blue and green is 70% reliable.
a. Is it possible to calculate the most likely color for the taxi? (Hint: distinguish carefully between the proposition that the taxi is blue and the proposition that it appears blue.)
[Show More]