File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -521,8 +521,18 @@ legend("topright",
521521### Mersenne-Twister RNG (R’s default RNG)
522522
523523- Pseudorandom number generator developed in 1997 by Matsumoto and Nishimura
524- - Period: 2^19937 − 1
524+ - Period: ` 2^19937 − 1 `
525+ - Pseudo-RNG is good as long as it has an extremely long period (cycle)
525526- Seed: a 624-dimensional set of 32-bit integers plus a current position in that set
526527- The Mersenne Twister is designed with Monte Carlo simulations and other statistical simulations in mind
527528- For non-parallel RNG, this is probably the best RNG
528529- http://en.wikipedia.org/wiki/Mersenne_twister
530+
531+ ### Quality of RNG
532+
533+ Since a RNG normally uses a deterministic algorithm, its randomness property is important.
534+
535+ - Kolmogorov-Smirnov test: Goodness-of-fit test; test uniform distribution
536+ - ` R ` function ` ks.test `
537+ - Try: ` x = seq(0, 1, length = 10000) `
538+ - The longest runs of head
You can’t perform that action at this time.
0 commit comments