random number generator

Terms from Statistics for HCI: Making Sense of Quantitative Data

A computer simulation or stochastic algorithm will often require random values to be computed. This may be a simple binary choice, to simulate tossing a coin, or a value according to some theoretical distribution, such as the Normal distribution. As computers are deterministic, they do not create truely random values, but instead pseudorandom values based on a fixed but highly complex sequence that behaves, for most purposes, as if it were truely random. Most random number generators generate a value that is uniform over some range ([0,1] or from 0 to the largest integer), but this can usually be transformed to give a desired distribution, such as the Normal distribution.
A 'seed' is used to start the generator, so that it gives the same sequences of 'random' values for the same seed, but varying the seed creates different sequences. For cryptographic purposes the seed needs to be carefully chosen so that it is not possible for an attacker to discover it. For statistical purposes one might want to save the seed so that a simulation can be re-run with the same random sequence.
Typically the standard random number generator available in a programming language, whilst good enough for some purposes such as generating unique ids, is not suitable for high quality statistical simulations and more specialised generators should be used.

Also known as: random values

Used in glossary entries: computer simulation, Normal distribution, pseudorandom, stochastic, theoretical distribution