A game to test your ability to pick random numbers

March 18, 2019

Topic

Statistics  /  ,

Compared to a computer’s pseudo-random number generator, we are not good at picking random numbers. Ilya Perederiy made a quick game to show how bad you are:

Your fingers tend to repeat certain patterns even if you don’t notice it. The program keeps a database of each possible combination of 5 presses, and two counters are stored under each entry — one is for every zero that follows the combination, and the other one is for all the ones that follow this combination. So every time you press a key, an entry in the database gets updated. To make a prediction, the program needs only to look up the entry corresponding to the last 5 presses and decide by looking at the counters which key press is more likely to follow. The rest is up to Fortuna (velut luna). I’ve run this script with 200 pseudo-random inputs 100,000 times, and found that the distribution of correct guesses is approximately normal with µ=50% and σ=3.5% (this agrees with the binomial estimation, of course). The probability of the program guessing your inputs >57% (µ+2σ) of the time purely by chance is very slim, which suggests that you really aren’t good at making random choices.