I am using the NIST randomness test suite which checks whether a bit sequence is random over 15 different tests. I have problems in verifying if this suite works fine. The situation is that if I input, for example, 10000 sequences of the same length (e.g., 1000) and generated by rand
function of MATLAB, sometimes it passes the basic tests I use, i.e., frequency, runs, block frequency, cumulative sums. However, sometimes it fails the basic frequency test and cumulative sums test in terms of p-value of p-values but not in terms of proportion.
I have two questions. The general one is how can I generate uniformly distributed random bits from MATLAB? The second is, why the problem mentioned above happens in NIST randomness suite, can anyone help me to verify if it works fine?
For reference document : http://csrc.nist.gov/groups/ST/toolkit/rng/documents/SP800-22rev1a.pdf