# mxnet.test_utils.var_check¶

mxnet.test_utils.var_check(generator, sigma, nsamples=1000000)[source]

Test the generator by matching the variance. It will need a large number of samples and is not recommended to use

We test the sample variance by checking if it falls inside the range
(sigma^2 - 3 * sqrt(2 * sigma^4 / (n-1)), sigma^2 + 3 * sqrt(2 * sigma^4 / (n-1)))

References:

@incollection{goucher2009beautiful,
title={Beautiful Testing: Leading Professionals Reveal How They Improve Software},

generator = lambda x: np.random.normal(0, 1.0, size=x)