The use of linear programming in some common applications of Bayes’ rule