0
$\begingroup$

I would like to prove (at a certain level) the randomness of a random sequence of N bits. I know that the dieharder battery of tests is supposed to be used to test the generator, not a particular sequence generated by the generator. From the manual:

...dieharder is a tool that tests random number generators, not files of random numbers! It is extremely inappropriate to try to "certify" a file of random numbers as being random just because it fails to "fail" any of the dieharder tests...

What if I treat every single sequence as generated by an independent RNG, although they are the same RNG (TRNG in this case), then reject all the sequences that fail one of the tests.

I know that with this method I will be rejecting good random sequences, but then I would be able to say that the remaining (ie not rejected) sequences has passed the dieharder battery (the sequence has been generated by a perfect random number generator).

$\endgroup$
0

1 Answer 1

1
$\begingroup$

Your question is answered in the passage in the manual immediately following the one you quoted:

To put it bluntly, if one rejects all such files that fail any test at the $0.05$ level (or any other), the one thing one can be certain of is that the files in question are not random, as a truly random sequence would fail any given test at the $0.05$ level $5\%$ of the time!

$\endgroup$
3
  • $\begingroup$ Yes, I read that. But what about the non-rejected sequences (ie the sequences that passed the tests), what can be said about them? Are they "less random" because of rejecting the failing ones? $\endgroup$
    – Victor
    Commented Oct 14, 2015 at 21:57
  • $\begingroup$ @VictorP: Yes, that's exactly what the quote says. I'm afraid I don't know how to put it any more clearly than the quote does. Sequences that never fail an $0.05$ level test are by definition not random. $\endgroup$
    – joriki
    Commented Oct 14, 2015 at 22:00
  • 1
    $\begingroup$ @VictorP: It's roughly as if you were rolling dice, three at at time, and discarding all rolls where all dice are the same, because you believe that those rolls aren't "random enough". The result is a non-uniform sequence of rolls that never has all dice the same, whereas a uniformly random sequence would have all dice the same roughly $1/36$ of the time. $\endgroup$
    – joriki
    Commented Oct 14, 2015 at 22:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .