Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let’s assume, you are in a rush and you need a random number: What is the best way to produce a high-quality, uniformly distributed random integer number between 0 and 9, ideally using only mental math or, less ideally, tools that are commonly available (except for computers, calculators, smartphones and books, of course).

share|cite|improve this question
Is this common? – Amzoti Jan 18 '14 at 2:06
Look at a digital clock and use the ones digit of the minute? – Brad Jan 18 '14 at 2:06
How fast are you with scissors and glue? :-D – J. W. Perry Jan 18 '14 at 2:40
This is more pencil-and-paper rather than mental, but: – vadim123 Jan 18 '14 at 2:58
up vote 3 down vote accepted

Toss a fair coin four times. Put a 1 if the toss is a head and a 0 otherwise. Make the four tosses into a string of 0s and 1s of length 4. For example you might get 0110. Convert this binary number to decimal; in the example you got 6. Toss it out and try again if the number is > 9.

share|cite|improve this answer
For repeated tries, you can increase the efficiency by throwing 10 coins to produce 3 digits (try again if the number is in the (1000-1023 range) – leonbloy Jan 18 '14 at 3:48
C'est vrai; I was shooting for absolute minimality. – ncmathsadist Jan 18 '14 at 23:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.