I try to measure the randomness of data using the runs test (beside the chi square test). I get following values for a file produced by /dev/urandom:
79881944 Bits (total)
39933862 zeroes
39948082 ones
0.546894 variance
39940971 expected
39941409 runs
===================
Runs value: 591.281
I read the value must be between -1,96 and +1,96 to talk about randomness. Can anyone tell me why this is impossible to reach!?
thanks in advance!
Rit can be implemented asn1<-39933862; n2<-39948082; n<-n1+n2; mu<-2*n1*n2/n+1; s2<-(mu-1)*(mu-2)/(n-1), giving 19970484.4843298. All you have to do is check your arithmetic, it seems. – whuber♦ Sep 21 '12 at 15:36