4 ms·
Do you have any references on the statistical properties of the primes % 4 sequence? When converted to coin flips, primes % 4 fails the statistical randomness t
by bumbledraven 10y ago
Do you have any references on the statistical properties of the primes % 4 sequence? When converted to coin flips, primes % 4 fails the statistical randomness tests at http://faculty.rhodes.edu/wetzel/random/mainbody.html http://faculty.rhodes.edu/wetzel/random/mainbody.html
See results at http://imgur.com/iaHBNNr http://imgur.com/iaHBNNr ("Your nth attempt" is primes % 4, "Coin nth attempt" is the Marsaglia PRNG). Note that primes % 4 has too many runs, its prob(H given H) is too low, and its prob(H given T) is too high.
- avip 10y agoIt was meant to be read a question, not statement ("are you aware of a simpler PRNG I could pull from the top of my head, using basic arithmetics?"). Maybe a collatz sequence? You're right, apparently it's called Chebyshev's bias.
- bumbledraven 10y agoI'm not aware of a simpler PRNG. It took me quite a search to find Marsaglia's.