In statistics a random number is a single observation (outcome) of a specified random variable. Where no distribution is specified, the continuous uniform distribution on the interval [0,1) is usually, but not always, intended.
In an informal sense, there is some circularity in this definition as the idea of random variable itself rests on the concept of randomness. A number itself cannot be random except in the sense of how it was generated. Informally, to generate a random number means that before it was generated, all elements of some set were equally probable as outcomes. In particular, this means that knowledge of earlier numbers generated by this process, or some other process, do not yield any extra information about the next number. This is equivalent to statistical independence.
Importance of random numbers
Statistical practice is based on statistical theory which, itself is founded on the concept of randomness. Many elements of statistical practice depend on the emulation of randomness through random numbers. Where those random numbers fall short of the conceptual ideal of randomness any subsequent statistical analysis may suffer from bias. Elements of statistical practice that depend on randomness include: choosing a representative sample, disguising the protocol of a study from a participant (see randomized controlled trial) and Monte Carlo simulation.
Randomness is also important in other activities such as cryptography and gambling, while pseudo-random numbers are of general importance in programming and computer science.
Reliable sources of random numbers
Tables of random numbers
Tables of random numbers have the desired properties no matter how chosen from the table: by row, column, diagonal or irregularly. Originally generated by hand, they are now, more commonly, the tabulated outputs of hardware random number generators. An important 20th century work was the RAND Corporation million-number table A Million Random Digits with 100,000 Normal Deviates [1]. It was produced in the 1950's by an electronic simulation of a roulette wheel attached to a computer, the results of which were then carefully filtered and tested before being used to generate the table. The RAND table was an important breakthrough in delivering random numbers because such a large and carefully prepared table had never before been available.
If carefully prepared, the filtering and testing processes remove any noticeable bias or asymmetry from the hardware-generated original numbers so that such tables provide the most 'reliable' random numbers available to the casual user. But note that any published table (and in fact any previously prepared table at all) are unusable for cryptographic purposes since the existence of the public (or private) table provides a way for an attacker to break any cryptographic algorithm using the random numbers as an input. In short, the numbers in such tables are not unpredictable; they can be stolen or copied by an attacker.
Hardware random-number generators
Some physical phenomena, such as thermal noise in zener diodes appear to be truly random and can be used as the basis for hardware random number generators. However, many mechanical phenomena feature asymmetries and biases that make their outcomes not truly random. The many successful attempts to exploit such phenomena by gamblers, especially in roulette and blackjack are testimony to these effects.
There are several imaginative sources of random numbers online, most notable perhaps is LavaRand which creates random numbers from images taken of a lava lamp. Random.org has a more obvious approach of listening to atmospheric noise. Details about how they turn their input into random numbers can be found on their respective sites.
Sources that approximate random numbers
Pseudo-random numbers
Pseudo-random number generators (PRNGs) are algorithms that can automatically create long runs (for example, millions of numbers long) with good random properties but eventually the sequence repeats exactly (or the memory usage grows without bound). One of the most common PRNG is the linear congruential generator which uses the recurrence
- Xn + 1 = aXn + b(mod m)
to generate numbers. The maximum number of numbers the formula can produce is the modulus, m. See the article in question for more details. Another, much earlier method of determining random number was the so-called middle square method. The method is quite simple to understand, it is however not a great generator. You take the previous number, square it and extract the middle part of the square to use as the next number.
They are very useful in developing Monte Carlo simulations as debugging is facilitated by the ability to run the same sequence of random numbers again by starting from the same seed. They are also used in cryptography so long as the seed is secret. Sender and
receiver can generate the same set of numbers automatically to use as keys.
Random enough
The generation of pseudo-random numbers is an important and common task in computer programming. While cryptography and certain numerical algorithms require a very high degree of apparent randomness, many other operations only need a modest amount of unpredictability. Some simple examples might be presenting a user with a "Random Quote of the Day," or determining which way a villain might move in a computer game. Weaker forms of randomness are also closely associated with hash algorithms and in creating amoritized searching and sorting algorithms.
Hardware random-number generators
Many mechanical methods of generating random numbers tend to be unreliable. Hardware random number generators need much care to ensure adequate mixing and should be checked for randomness before use.
Testing random numbers
A variety of hypothesis tests are used in checking random numbers including:
The null hypothesis of such tests is always that of randomness so we are principally interested in the nature of their type II errors which are typically difficult to quantify.
External links