## Due Date: Due Fri June 6 at 1:30pm in class or through the online dropbox. |

**A. [5pts]** What is the probability that a message contains the word "Pills" and is Spam?

**B. [5pts]** What is the probability that a message is Spam if it is known to contain the word "Pills"?

**C. [5pts]** What is the probability that a message does not contain the word "Pills" or is Spam?

Consider computing the query P(B|W=true)

**A. [5pt] ** Write the set of initial factors that would be created, after incorporating evidence. You do not need to write the full tables of numbers for each factor, just clearly indicate the function signature, e.g. P(X,Y,Z).

**B. [10pt] ** Write, in order, the signatures for the new factors that get created when running the variable elimination algorithm with the variable elimination ordering A, E, R.

**C. [5pt] ** Provide, if possible, a variable ordering that is more comptuationally efficient than the one in part B.

**D. [5pt] ** Provide, if possible, a variable ordering that is less comptuationally efficient than the one in part B.

Consider the Bayes net (from HW1).

The variables are boolean and describe aspects of a court trail. They indicate whether so
meone broke an election law (**B**), was indicted (**I**), whether the prosecutor was politically motivated (**M**), if the person was found guilty (**G**), and if they were ultimately put in jail (**J**).

** A. [10pts]** Describe the process by which you might sample a joint assignment to the variables of this Bayes net, conditioned on the fact that there was a guilty verdict. You can use any of the techniques we described in class, but you should justify your choice.