##### ScienceSkepticism

# A Million Random Digits

Cross-posted on my geology blog Georneys.

**Edited to add:** One of the readers of my geology blog sent me a link to this great BBC radio program (programme?) on “Random and Pseudorandom.” I just listened to this while working in lab, and I highly recommend it!

I promise this will be my last post on statistics… for awhile :-).

First page of random digits in “A Million Random Digits” book. Image taken from Amazon.com. |

Earlier this evening I met up with three classmates (all girls, by the way; my statistics class is about 90% female) to work on programming our latest statistics homework into MATLAB. Working in a group is easier as four pairs of eyes tend to catch code errors faster than one pair of eyes. Also, we can eat Chinese food and giggle and have fun as we work.

One of the things we had to do this evening was use the “rand” function in MATLAB. This function calls upon a computer algorithm that generates random– or really pseudorandom since they’re calculated by a computer– numbers. The “rand” function calls upon a random number between 0 and 1 as a default, though you can tell it to use other ranges. Random numbers are very important for many types of statistical analyses and numerical simulations. These days, many computer programs, such as MATLAB, have pseudorandom number generators built in. For most types of applications in mathematics and science, a pseduorandom number is nearly as good as a random number.

But what if you need *actual *random numbers?

And how did people generate random numbers before computers became fancy enough to generate pseudorandom numbers?

We started wondering about these two questions this evening. During our discussion about this, one of my classmates said, “Have you ever heard of that book that is nothing but random numbers?”

Of course, we had to immediately google this book, procrastinating our coding for a few minutes.

Cover of the book “A Million Random Digits.” Image taken from here. |

Indeed, there is a book that contains nothing but a short introduction and then page after page of random numbers– 1 million of them, in fact! The book is titled “A Million Random Digits with 100,000 Normal Deviates.”

This book was first published by the RAND Corporation in 1955. If you go to the RAND website about the book, you can actually download the book for free. The text parts of the book come as PDF files and you can download the million random numbers as a data file. In the old computing days, you could order punch cards with these million random numbers. If you want a hard copy of this book (magicians and mentalists– wouldn’t this book make a great prop for your shows?), you can order it either from the RAND website or from Amazon.com.

A book of random numbers might seem incredibly boring; you wouldn’t want to read this book cover-to-cover, that’s for sure. Yet however boring, this book is very useful. Even though pseudorandom number generators are much easier and more commonly used these days, there are still times when mathematicians and scientists need truly random numbers. And for this, the RAND compilation remains the largest published source of random digits.

You might be wondering how these million random digits were generated. If you read the introduction to the book, the method of number generating is explained in detail. Basically, the numbers were generated on a roulette wheel. So, if you went to Las Vegas and played roulette for days (years?), you could generate a million random numbers, assuming there are no biases in the wheel.

Roulette Wheel. Image taken from wikipedia here. |

The wheel that was used to generate the random numbers was actually an electronic roulette wheel that was hooked up to a very early computer. At first, the numbers looked random, based on various statistical tests. However, after awhile the RAND employees evaluating the randomness of the numbers realized that their electronic roulette wheel wasn’t perfectly random– there was some drift over time, probably as the machine aged and changed slightly in operation. You can read more about the biases of the electronic roulette machine here. To make the numbers truly random, the RAND employees- to put it simplistically- shuffled them up a bit.

I think this book of numbers is really great. I’m even tempted order this book as a coffee table book. I can just imagine my in-laws (who already think I’m strange) picking this book up off the coffee table and wondering why on Earth we have a book of numbers. I can’t quite justify the purchase (the book is about $70) on my graduate student budget, but perhaps I’ll order it sometime in the future.

Many people find this book of numbers both interesting and amusing. If you go to Amazon.com and read the reviews for this book, there are a plethora of hilarious ones. Below are a few reviews I found particularly entertaining:

“The book is a promising reference concept, but the execution is somewhat sloppy. Whatever algorithm they used was not fully tested. The bulk of each page seems random enough. However at the lower left and lower right of alternate pages, the number is found to increment directly.” -B. McGroarty

“Such a terrific reference work! But with so many terrific random digits, it’s a shame they didn’t sort them, to make it easier to find the one you’re looking for.” -A Curious Reader

“I definitely prefer books like ‘One million sequential numbers’ as the story always steadily progresses. By comparison this book is just so and so.” -Devide Cerri

“For those who thought that ‘Atlas Shrugged’ could not be surpassed, here Rand refutes all doubters and utterly tops that opus in a style so rarefied and refined that words themselves have been transcended, with the essence–no, the ethereal, mystical quintessence–of Rand’s philosophy expressed as its ultimate ur-truth of a million unrelated symbols floating forever in pure mindless randomness. Rand’s myrmidons will find this most congenial, and I recommend that they spend the rest of their days reading this ne plus ultra masterpiece, meeting 24/7 in pure white Randian temples, there to pontificate and meditate on this wonder and that way stop bothering everybody else.” -George Zadoronzy

“Wow, what can I say. A very insightful novel. The way the author manages to manipulate those numbers was wonderful. SPOILER ALERT!!! I have to admit, there were many twists that I didn’t expect, especially when he decided to follow up 9238399 with 2883002. I have to admit, the beginning was rather slow, but it began to pick up pace somewhere on page 7. My only regret is that there isn’t a sequel, because the author left it at a cliffhanger. At times spontaneous, blunt, and errant, this is a book that you can definitely share with your friends.” -Anna Huynh

Feel free to leave more book reviews in the comments here.

Whoever comes up with the best book review will win an awesomeness prize. Or maybe a rock, if I am not feeling too lazy. Or maybe even COTW.

And I thought the 7200 random digits in my book of statistical tables was enough.

Could you use pi? Thats random, and they have that to a trillion digits, a million, million, random numbers.

I could use a table of ‘data’ from a high school titration lab. The lab before I found out I was colour blind.

Computers use tricks now to generate real random numbers :)

For example, you can take the time at which the user presses keys on the keyboard. With enough precision, the last numbers of the time are essentially random (for example, the milliseconds of your key presses are going to be unpredictable).

Other sources of entropy can also be used (the network, the hard disk, etc).

Those work on your computer at home, there are also specialized circuits for generating random numbers (using quantum effects, or reading thermal noise, for example).

That said, a book of random numbers is incredibly cool :)

In our electronic age, we could perhaps arrange to sell individual random digits for a micro-payment?

This would also allow consumers to buy just the random digits they want.

I’ll sell you a random digits for just 0.01 euro per digit and if you order now, I’ll throw in an extra 10 digits for any order of 100 or more!

This offer is not available in any shops.

I remember an article about this book in Scientific American years ago. It included a sample page from the book, and I noticed that the page contained a run of six consecutive 7’s.

Exercise for the reader: is this run statistically significant?

Random number generation is important to skeptics. Most tests of paranormal powers depend on a randomly-selected target. It is not hard to generate a truly random choice if you know how. Unfortunately, ESP investigators have tended not to have the electronic or physics expertise to build good target selectors. If the targets are not randomly selected then one cannot predict what results should be obtained in the presence or absence of a paranormal effect. This makes the experiment and its results meaningless. (I have lectured to skeptics’ groups on this subject.)

Pseudo-random sequences are easy to generate but, though able to pass some tests for randomness, are completely predetermined. Their statistical properties contain traps into which well-meaning ESP investigators have fallen. It is so easy to generate a really random sequence (I have published a design for a pocket telepathy tester that uses such a generator.) that there is no excuse for using anything else.

When I wanted a quick and reproducible set of random numbers for a demonstration I took the digits of pi published in the millions by Project Gutenberg. AFAIK no one has

provedthat they are random but so far they have passed all the tests.@DoubtingT: Link to your published design?

That sounds really cool!

I used this book over 40 years ago when I was but a budding composer working in the realm of “avant garde weird shit”. The tables in various math and statistics handbooks never had the gravitas of this tome.

Glancing at the introduction, I was reminded about the poker deal test. About 20 years ago, I was working on a video poker game (that never saw the light of day.) To test my card shuffling routine, I had the system run about 1-2 million hands and gathered the stats. Lo and behold, I had introduced a minor bug into the procedure that affected the statistics. Once corrected (after I fully understood what I had done wrong), the statistical tests came out much better. (They were only off by fractions of a percent to begin with but the correction brought it much closer to the expected results.)

re the coffee table use: A friend of mine used to keep Joyce’s Ulysses on an end table, dusting everything in the living room except the book. A nice layer of dust gradually built up.

Some of the more recent PRNGs do a pretty amazing job. There is one from Japan that I used to replace the Excel generator when I needed some quality numbers. Search for ‘Mersenne Twister’.

Oh …. and one should bear in mind what John von Neumann once said, “Anyone who considers arithmetical methods of producing random digits is, of course, in a state of sin.”

@Rei Malebario: You’ve been beaten to the punch by a guy doing it for free using radioactive decay tracked by a Geiger-Mueller Tube.

http://www.fourmilab.ch/hotbits/

@Rei Malebario: I want to buy an “8”. How much?

@LtStorm:

Curses! Foiled again.

@Buzz Parsec:

An 8 will run you 0.02 euro. I have an excess of 6’s – I can sell you two of those for just 0.015 euro, if you’d like.

I can always make more, of course. I’ve made over twelve random digits so far!

@Evelyn:

See

Put telepathy to the testin the electronics magazineCircuit Cellar, issue 132, July 2001.Their web site is http://www.circuitcellar.com but I don’t think you can read back issues for free. Their art department messed up Figure 3, it’s faint and unreadable, but, luckily, the noise generator is at the top of Figure 2. The general principle is that a noise diode and comparator generate about a million irregular pulses a second. The modulus of the accumulated number of pulses is sampled every few seconds to produce an evenly-distributed random number from 0 to Modulus – 1. I used a modulus of four to select one of four target colors for the receiving operator to detect.

This was the first time I’d been paid for speaking my mind about parapsychology research.

Dammit, has DoubtingT just blown his cover?

When we first started to play Dungeons and Dragons in the 1970s we used multi-sided dice.

I had just assumed that people used dice or something similar when they needed a random number before computers could do it. I often refer to my gaming dice and analog random number generators.

My favorite random number generator code: http://xkcd.com/221/

@DoubtingT: Thanks!

Maybe I can access it through my MIT account. Or… if you want to send me a copy via email you can send it to the Skepchick address or to [email protected].

Actually, there’s evidence that dice and roulette wheels and such aren’t random. I guess sometimes dice throws give too many 6s.

Perhaps nothing is truly random– if we knew of all the physical conditions in something such as a dice throw, perhaps we could predict the numbers. Perhaps the numbers follow a pattern, but that pattern is too difficult for us to “see” just yet.

There’s an idea that the only truly random numbers may be produced through quantum processes (like radioactive decay). But then again maybe we just don’t understand quantum physics well enough. Maybe in the future even supposedly random quantum processes will be predictable.

How can Pi be a random number when every time you generate Pi, you get the *same* number? I think I must be missing something.

You can try random.org:

RANDOM.ORG offers true random numbers to anyone on the Internet. The randomness comes from atmospheric noise, which for many purposes is better than the pseudo-random number algorithms typically used in computer programs.