adapted statismoReducedVariance to upstream changes