Calculate mean and variance of uniform (#869)