Calculate mean of continuous random variable (#861)