Implement Bayes Theorem.