joint_trait_prob function

Computes joint probabilities.