Being the RNG

How would you generate a sequence of random numbers, if you didn’t have a computer or calculator? Each time you typ rng default or random.randint, numbers get drawn from precise observations of some natural process or special algorithms to produce sequences of numbers with certain properties of randomness. But what if your laptop died, your phone had no reception, or you’d suddenly find yourself transported 50 years back in time? How could you approximate random sampling from different distributions just using pen, paper, and whatever you could find in your house?

I thought of three categories (to start with): A. human-made randomization gadgets, B. measurement, C. just you in an empty room.
Rules: Please share your best guesses and intuitions and limitations of each method. If you know what exact distribution can be approximated with each process, please let me know – I’ll update the post as more ideas come in. Do not Google (or be honest if you did). Let’s play!

Update: see the Twitter thread for a bunch of interesting responses and suggestions – I’ve copied some of those into the list of suggestions below (no guarantees).

A. human-made randomization gadgets

  • Deck of cards: keep only the numbered cards and Ace, ignore color and shape. Shuffle well, draw a card, and write down the number from 0-9 (where 10 = 1 and Ace = 0). Put the card back, and repeat. Assumes: that you can shuffle the cards sufficiently well. Approximates: discrete uniform distribution from 0-9; probably the most common interpretation of ‘a sequence of random numbers’.
  • Coin: flip the coin repeatedly, and down write the sequence of heads (= 0) and tails (= 1). Assumes: coin is fair. Approximates: Binomial distribution.
  • Coin 2: do n coin flips, write 1s and 0s on paper in a row of cells. next row: 1 when only the cell or one of its neighbors is 1, or the cell and its right neighbor are 1; 0 otherwise (left-most neighbors right-most). Repeat. Approximates: sequence of numbers discrete uniform 0 to 2^n-1. Suggested by @HazemToutounji.
  • Die/dice: throw the dice repeatedly, write down the sequence. Approximates: discrete uniform distribution from 1-6.
    • Question: how could you transform the sequence from base 6 to base 10? Answer: Roll die and flip coin. Take die score minus one. If heads, add five. If die rolls six, discard and start again. Will generate uniform numbers 0-9. Assumes: that you’re willing to discard 1/6th of your samples. Suggested by @TomRhysMarshall.
  • Lava lamps: described here. Suggested by @felixtaschbach.
  • 10 sided die; transform thresholded b/w pixels from TV static signal from bin to dec (bonus you can pick your precision); similar transformation of static from am radio;  random selection of recorded neurons firing (these should all have different distributions). Suggested by @nbonacchi.

B. measurement

  • Stopwatch: close your eyes, start timer, count to 10, stop timer. Ignore the seconds and the first decimal number; write down whichever numbers are behind that. Then repeat, but each time counting to the last number shown on the stopwatch. Assumes: that your stopwatch has more than 1 decimal (i.e. 100ms) precision, and that you have some timing and motor variability. The latter may not hold if you’re a professional percussionist. Approximates: discrete uniform distribution.
  • Stopwatch 2: count to 50 and write down the integer humber on the stopwatch (without the decibels) to get a normal distribution. Compute average and subtract to center it at zero. Suggested by @jjfahrenfort.
  • Kitchen scale: weigh each egg in your fridge, potato or apple in the bowl, or beans in that bag you got pre-lockdown. Grains of rice are too light for most kitchen scales. Assumes: that the very large or very small have not been removed (by the farmer or supermarket), and that you have a sufficiently well-stocked pantry. Approximates: normal distribution.
  • Counting page numbers: open a book at any page, write down the last digit of the page number. Repeat. Assumes: your book has at least 9 pages, and you can open it at a random place (may be easier if you switch books each time). Approximates: discrete uniform distribution from 0-9.
  • Tape measure: measure the length of each branch of a tree. Assumes: that you can climb trees with a measuring tape in your pocket. Approximates: power law distribution (or 1/f), where the range of sampling will be truncated by your eyesight or the precision of your measuring tape.
  • Rice: drop rice (or other grains) on paper and see how many pieces land on each line or sections of the paper. Suggested by @bettina_nb.
  • Darts/roulette: draw numbers/outcomes on a sort of dart board that can spin like a roulette wheel, spin that shit, then chuck some darts (while blindfolded). Suggested by @willjharrison and @ChrizKlink.
  • Measure distance of visible stars; count grains of rice in various samplings of a handful;  measure the intensity of wave sounds crashing on a mountain; record the sound of the wind and threshold it’s power spectrum (bonus points if leaves sound is captured). Suggested by @nbonacchi.

C. just you

  • Memory: unfortunately, humans are notoriously bad at self-generating random number sequences. The best I could come up with: take all the phone numbers you remember from childhood, remove area codes, and write them in a sequence. Assumes: that you were born before smartphones. Approximates: discrete uniform distribution.
  • Memory 2: think of full names of celebrities and count how many letters in the name: odd or even. Approximates binomial. Not sure what assumptions though. Suggested by @stevenmweisberg.
  • Your body: breathing is too controllable, but heartbeats may have sufficient variability. If you still have your stopwatch, time the interval between each pair of heartbeats. Assumes: you don’t have any cardiac abnormalities. Approximates: gamma distribution (looked this one up).

Extra trick for the truly dedicated (suggested by @BenjoCowley and @jehosafet): if you can draw from a uniform distribution between 0 and 1, you can draw from any distribution using its CDF. This will require you to have memorized all CDFs, for which the only solution seems to be to tattoo them on your arm.

Notes

  • Further reading: Nickerson, R. S. (2002). The production and perception of randomness. Psychological Review, 109(2), 330–357. [pdf]
  • Thanks to the amazing #NeuroMatchAcademy BirdBrains pod: Akshi, Alish, Yash and Kanishk, who triggered this stream of thought with their excellent questions about determinism.
  • If you’re anything like me, this exercise is awful against insomnia. Try at your own risk.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s