Does anyone have a simple, reasonably fair, method for generating random numbers in their head (or with pen and paper)?

I took a multiple choice test the other day (ok, it was linked from here and the result declared i was the perfect lover boy, but you probably didn't want to know that ;o) and had to select some answers at random. It struck me that I don't know of a good approach for generating sequences of random numbers between 1 and n where n is fixed for a particular sequence and is typically in the range 2 - 10.

The best I could come up with was picking "random" words, then scoring the letters (A=1, Z=26) and calculating the sum mod n. But that seemed pretty complex.

Thinking some more, the only related idea I knew of was the crypto scheme in Cryptonomicon (which used playing cards).

So does anyone know of either a better solution for generating random sequences (or single values), or of related interesting ideas? Thanks.
posted by andrew cooke to Science & Nature (16 answers total) 1 user marked this as a favorite

I've often heard that if you recite a bunch of telephone numbers you'll get something reasonably close to a random sequence, but I've never tested it to see if it works.
posted by nixxon at 11:26 AM on June 24, 2005

Random in this case is probably best understood as not correlated to the event at hand. I would not trust that any string of numbers that you came up with out of your head would be random. What you have to do is look around you for some non-correlated event in which different numbers have an equal probability of occurring, and use the identical process multiple times to generate your string of random numbers. For example, I gather that random.org uses atmospheric static as a seed to generate numbers.

Telephone numbers would not work, as there is the probability of a 0 or 1 occurring is less than the other numbers as phone numbers don't start with those digits.
posted by jasper411 at 11:31 AM on June 24, 2005 [1 favorite]

Whenever I need a coin flip I usually think of a number between 0 and 1, and ask someone else to do the same, and XOR them together. Or add them, mod 2, it's the same thing.

If you have pen and paper, you could write down a bunch of numbers in the correct range, then close your eyes and scribble randomly, picking the closest number.

nixxon: North American telephone numbers definitely have a structure. For example, the first digit of a seven-digit number is never 0 or 1. And if you're only doing numbers for a certain area, there will definitely be some bias in the next two or three digits as well.
posted by grouse at 11:34 AM on June 24, 2005 [1 favorite]

Best answer: Yeah, I know what you mean. Here's what I do:

1. Quickly think of 5 or 6 "random" digits.
2. Take the digit root. (i.e. add them till you are left with a single digit)

Any bias is quickly washed out by the "digit root" process. Takes no more than a few seconds for me to do this in my head.:

Examples:

42713=8
82467=9
11962=1
74201=5
posted by vacapinta at 11:35 AM on June 24, 2005 [1 favorite]

Response by poster: thanks, that's a particularly good one (and reminds me of another item to add to the compulsive behaviour thread - doing that for product barcodes by casting out 9s :o)
posted by andrew cooke at 11:45 AM on June 24, 2005

For generating multiple-choice tests, I use coin flips. 4 answers, so one flip decides A/B versus C/D, and the second decides which of A/B or C/D it'll be. Then LaTeX puts the questions in a pseudo-random order.

For taking a test, I'd just pick a starting point randomly -- you can do this with coin flips before the test starts -- and then go in sequence, or use that value for all "guesses."
posted by ROU_Xenophobe at 12:09 PM on June 24, 2005

After the post on writing down your passwords I came up with a simple method for generating random numbers and letters. All you need is one to three dice. I used three, the one on the left and in the middle after rolling defined the character and the right defined, if a letter, upper or lower case. I rolled again if it wasn't obvious which ones were left, middle, and right. The first two from 11 to 66 defined a number or letter. 11=1, 16=6, 21=7, 24=zero, 25=a, all the way to 66=z. If you need upper and lowercase, the third dice was 1,2,3=lower, 4,5,6=upper. Only use two dice if the case doesn't matter. Of course you can use just one but it will take longer.

I know it's not doing random sequences in your head and is tedious if all you need are numbers but this seemed to me to be the best way to generate compeletely random sequences easily. You can download programs for this but nothing produced on a computer can be completely random.

Let me know if my description needs any clarification or if you want me to type the entire sequence out. Here is a sample 12 digit password: 4T9MTd8lnsna. Not easy to remember or crack!
posted by 6550 at 12:20 PM on June 24, 2005

more on digital root process
posted by roboto at 12:41 PM on June 24, 2005

Couldn't you use just the last four digits of phone numbers?
Avoid businesses, which tend towards repetition or simple sequences.
posted by weapons-grade pandemonium at 1:10 PM on June 24, 2005

Best answer: Whenever I need to shuffle something, I use a Linear Feedback Shift Register of appropriate length.

The output of an LFSR is only pseudo-random, but it is a simple machine and (best of all for the shuffling feature), it will not reproduce a number until it has passed through every number in its range. You can build one with pencil and paper.

This guy describes the LFSR in terms of its state space rather than the more usual approach of describing the output stream, so I think he's also used to using it as a shuffler. He links to a page with a fairly exhaustive list of tap sequences so you can build your own LFSR.
posted by joaquim at 1:39 PM on June 24, 2005

Are the "correct" answers to the test random? Or (since there aren't quite correct answers), are the answers that correspond to "perfect lover boy" and "stinky poo" scrambled?

Because if they are, you can just pick a single letter (for instance, "C") and always answer that. You're depending on the test to be random, while your answers aren't.
That would certainly work on something like the SAT; you would get (on average) 1/4 correct.
posted by metaculpa at 1:43 PM on June 24, 2005

Response by poster: it was one of those "personality type" things where sometimes they ask you to pick one of two choices (say) where both seem perfectly reasonable. so "normal or psycho" is easy enough, but "safety or freedom" forces you into a false dichotomy (i want to be both safe and free, and i don't see why i can't be). i thought answering such questions (the ones where i want to say "both" or "neither") at random would be safest, since it's not obvious that all A answers are for a certain type (in the past i've also tried "balancing" over different types, inferring back from the questions, but the results have sometimes been very odd, although that seems like it might be safer if you're only unsure of a few answers).

but i'm also interested from a more "aesthetic" point of view (the lfsr stuff looks interesting, for example).
posted by andrew cooke at 2:43 PM on June 24, 2005

Response by poster: you know, i really don't like this "best answer" thing for open questions like this. wish i'd not used it. sorry.
posted by andrew cooke at 2:47 PM on June 24, 2005

Don't know if this is relevant but in some cases you may not care what answer you choose but you do want the answer to be "consistent" This is the case where the same answers may appear later in the quiz.

In this case you base the answer you choose on some arbitrary property of the answer itself, such as character length or alphabetical order.

So, if the question asks: Do you consider yourself a) extroverted b) introverted

Then you choose extroverted because it comes first alphabetically. So, its random (or, rather uncorrelated) but it does ensure that if later, you are asked the same question again, you will choose the same answer...
posted by vacapinta at 3:00 PM on June 24, 2005

ummmmm...... 3! Is 3 random enough for ya?
posted by Doohickie at 7:42 PM on June 24, 2005

When i'm taking a multiple choice test and I don't have an answer, I'll look at the clock, or my watch (whichever has a seconds hand). 1-15 seconds is a, 16-30 is b, etc etc. Assuming you don't do this to a bunch of questions in succession is works out as being pretty random.
posted by MostHolyPorcine at 10:21 PM on June 24, 2005

« Older The world of Mad Max 2   |   Apartmenting finding services - worth the money? Newer »