Understanding Bayes' rule