A Good and SIMPLE Measure of Randomness

Your question answers itself. “If I were to pass the first 100,000 digits of Pi to the function, it should give a number very close to 1”, except the digits of Pi are not random numbers so if your algorithm does not recognise a very specific sequence as being non-random then it’s not very good.

The problem here is there are many types of non random-ness:-
eg. “121,351,991,7898651,12398469018461” or “33,27,99,3000,63,231” or even “14297141600464,14344872783104,819534228736,3490442496” are definitely not random.

I think what you need to do is identify the aspects of randomness that are important to you-
distribution, distribution of digits, lack of common factors, the expected number of primes, Fibonacci and other “special” numbers etc. etc.

PS. The Quick and Dirty (and very effective) test of randomness does the file end up roughly the same size after you gzip it.

Leave a Comment