This estimator generalizes the estimator of the mean for samples drawn from an arbitrary distribution. Therefore, when π π ( r ) is a uniform distribution, it corresponds the one used on a uniform sampling above.