Download university of illinois at urbana-champaign and more Exercises Probability and Statistics in PDF only on Docsity! UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN Department of Electrical and Computer Engineering CS 440/ECE 448 Artificial Intelligence Spring 2020 SAMPLE EXAM 2 Actual Exam will be held on Compass, Monday, March 30, 2020 • This is will be an OPEN BOOK exam. You will be allowed to use textbook, notes, and calculator. • You will NOT be allowed to use internet search, or to consult with any other human being, while taking the exam. • You will need to install Proctorio. See instructons on the course web page or on piazza. • There will be 40 points on the exam: 8 problems, with 1 or (usually) 2 parts each. Name: netid: NAME: Sample Exam 2 Page 2 Problem 1 (5 points) Consider three binary events, A, B, and C, with probabilities given by P (A) = 0.7, P (B) = 0.4, and P (C) = 0.3. (a) What’s the smallest possible P (B ∧ C)? Solution: B and C could be mutually exclusive, so minP (B ∧ C) = 0 (b) If A and B are independent, what’s P ((¬A) ∧B)? Solution: P (¬A ∧B) = P (¬A)P (B) = (0.3)(0.4) = 0.12 NAME: Sample Exam 2 Page 5 Problem 4 (5 points) Consider the following Bayes network (all variables are binary): A B C P (A) = 0.4 A P (B|A) False 0.1 True 0.2 A,B P (C|A,B) False,False 0.9 False,True 0.3 True,False 0.7 True,True 0.5 (a) What is P (C)? Write your answer in numerical form, but you don’t need to simplify. Solution: P (C) = P (¬A,¬B,C) + P (¬A,B,C) + P (A,¬B,C) + P (A,B,C) = (0.6)(0.9)(0.9) + (0.6)(0.1)(0.3) + (0.4)(0.8)(0.7) + (0.4)(0.2)(0.5) (b) What is P (A|B = True, C = True)? Write your answer in numerical form, but you don’t need to simplify. Solution: P (A|B,C) = P (A,B,C) P (A,B,C) + P (¬A,B,C) = (0.4)(0.2)(0.5) (0.4)(0.2)(0.5) + (0.6)(0.1)(0.3) NAME: Sample Exam 2 Page 6 Problem 5 (5 points) Consider the following Bayes network (all variables are binary): A B C You’ve been asked to re-estimate the parameters of the network based on the following obser- vations: Observation A B C 1 True True False 2 False True True 3 False True False 4 False False True (a) Given the data in the table, what are the maximum likelihood estimates of the model parameters? If there is a model parameter that cannot be estimated from these data, mark it “UNKNOWN.” Solution: P (A) = 1/4 P (B|¬A) = 2/3 P (B|A) = 1/1 P (C|¬A,¬B) = 1/1 P (C|¬A,B) = 1/2 P (C|A,¬B) = UNKNOWN P (C|A,B) = 0/1 (b) Use the table of data, but this time, estimate the data using Laplace smoothing, with a smoothing parameter of k = 1. NAME: Sample Exam 2 Page 7 Solution: P (A) = 2/6 P (B|¬A) = 3/5 P (B|A) = 2/3 P (C|¬A,¬B) = 2/3 P (C|¬A,B) = 2/4 P (C|A,¬B) = 1/2 P (C|A,B) = 1/3