Bayes Algorithms add

Calculate the joint probabilities