corrected mdm bayes homework2