# Statistical test strange behaviour [closed]

Hi I'm running the dieharder test suite (this) to test an algorithm, but I've found somethings that I don't understand.

This is the command that I run to test my binary file

dieharder -f test -a -g 201


I've tested my algorithm on file of different size: 30Mb, 300Mb, 3Gb and the result are that I fail a lot of test on the 30Mb file, less in the 300 Mb (still a lot), and in the 3Gb I pass all the tests.

Isn't it strange? Shouldn't the tests produce wrost results if the file is larger? (or the weakness become less visible) If it's normal, can this be considered a weakness in the algorithm?

Also shouln't the tests consider the file length? and so "adapt" to it

EDIT: If statistical anomalies also go down if a larger test file is used what is the optimal size that I should use to do the tests?

PS when I talk about weakness I mean that it's weak statistically speaking

• Statistical anomalies also go down if a larger test file is used. That's why you need loads of data for tests such as Dieharder. – Maarten - reinstate Monica Oct 9 '18 at 21:07
• @MaartenBodewes but what size is optimal ? ps so the tests don't take into account the file length – malloc Oct 9 '18 at 21:17
• I'm voting to close this question as off-topic because it is more about general statistical evaluation using a specific program. But it’s not really about how the cryptographic algorithm, protocol or side-channel mitigation works (or the cryptanalysis thereof). The question is somewhere between “interpreting statistical results produced by a specific program” and ”correct program usage” (aka programming) – both off-topic. – e-sushi Oct 10 '18 at 11:02
• @MaartenBodewes Oh it's not frustration. I fully support having a go at an opinion. It's bewilderment as my link points to raw process output clearly demonstrating huge consumption of data. Anonymous objections to highly relevant computer tests is strange, don't you agree? Thanks for dd anyway - running now. – Paul Uszak Oct 10 '18 at 12:00
• You need a lot of data to run the tests, see the question here with the answers of fgrieu & Paul for more information and an indication of the size (>> 1 GB). – Maarten - reinstate Monica Oct 10 '18 at 13:42