Added function to compute probabilities of target values