ChiSquare (VSL_RNG_METHOD_CHISQUARE_CHI2GAMMA)
Random number generator of the chi-square distribution with degrees of freedom
v
. You can generate any successful random number
x
of the chi-square distribution as follows:
- Ifv= 1 andv= 3, a chi-square distributed number is generated as a sum of squares ofvindependent normal random numbers with parameter mean valuea= 0 and standard deviationσ= 1.
- Ifvis even and 2 ≤v≤ 16, a chi-square distributed random number is generated according to the formula:, whereuiis a vector of successive random numbers uniformly distributed over the interval (0, 1).
- Ifv≥ 17 orvis odd and 5 ≤v≤ 15, the ChiSquare distribution is reduced to Gamma distribution with parameters shapeα=v/2, offseta= 0, and scalefactorβ= 2. Random numbers of the Gamma distribution are generated using method VSL_RNG_METHOD_GAMMA_GNORM.
See
Intel® oneAPI Math Kernel Library Vector Statistics Random Number Generator Performance Data for test results summary and performance graphs.