How to find the mean of a probability distribution?