乱数ライブラリー

Uniformity test in d-dimensional

For the set of d-dimensional pseudo random sequence of the $N$ generated is a uniform pseudo-random sequence, It can be ascertained by testing the nature of the equal probability of the frequency distribution of the random number in the $d$ dimensional hypercubes which are the small cubes of equal volume of $k^d$ pieces.

$\left.\left.\left.(x_0,x_1,\ldots ,x_{d-1}\right),(x_d,x_{d+1},\ldots ,x_{2 d-1}\right),\ldots ,(x_{d N-d},x_{d N-d+1},\ldots ,x_{d N-1}\right)$


Chi square goodness-of-fit test in d-dimensional

The frequencies of random numbers in each small cube are ${f_1,f_2,…,f_{k^d }}$. At this time, if the pseudo-random number sequence is uniform, $\chi^2$ statistic approaches to the $\chi^2$ distribution with $(k^d-1)$ degrees of freedom asymptotically.

$\chi ^2=\sum _{i=1}^{k^d} \frac{\left(f_i-N k^{-d}\right){}^2}{N k^{-d}}$


Reference:
  • JIS Z 9031:2012, Procedure for random number generation and randomization.



Back to this TOP