I am playing around with PRNGs (like Mersenne Twister and rand()
function of stdlib) and I would want a good test that would help me ascertain the quality of random data produced by the PRNGs.
I have calculated the value of Pi using random numbers generated by the PRNGs, and I find rand()
and Mersenne Twister to be very close to offer a distinction (do I need to scrutinize after 10 decimal points?).
I do not have much idea about Monte Carlo simulations; please let me know about some algorithm/application (possibly something simple yet which could provide good inferences) that would help me distinguish them in terms of quality.
EDIT 1: I didn't notice before, but there is a similar thread: How to test random numbers?
EDIT 2: I am not able to interprete the results of NIST, as mentioned in one of the comments. I got this idea of visually interpreting the pattern (if any) from random.org and am following that because of it's simplicity. I would be very glad if someone could comment on the process of my testing:
(round(genrand_real1() / rand_0_1()))
then red pixel, else blackAs I understand that this is not a very precise solution, but if this provides a reasonable estimate, then I could live with this at the present moment.
There are two standard test suites for testing random numbers.
There is a R interface to the Dieharder library, called RDieHarder. This library provides an interface to both the NIST and Diehard test suites.