You are working with the text-only light edition of "H.Lohninger: Teach/Me Data Analysis, Springer-Verlag, Berlin-New York-Tokyo, 1999. ISBN 3-540-14743-8". Click here for further information. |
See also: random variables |
In classical statistical textbooks random numbers are created by drawing numbered bullets out of a box containing a known number of them. While this procedure may be feasible with a small set of bullets, it becomes increasingly unmanageable with an increasing number of bullets. Apart from this, there is another issue which is commonly overlooked: it is doubtful whether drawing bullets out of a large box is really a random process with equal chances for all bullets.
For this and other reasons, random number generators have been computerized. In fact, any higher level programming language offers at least one form of random number generator. The generation of random numbers, however, is not an easy task for a computer, since the computer is a deterministic machine with no built-in randomness. Thus it is impossible to create true random numbers without any additional hardware.
What can be done, is to create pseudo random numbers which behave almost like random numbers but which are repeated after a fixed (mostly quite long) period. These pseudo random numbers are generated by linear congruential generators (LCG). The principle of an LCG is quite simple: a new pseudo random number is generated on the basis of the previous random number by adding a certain offset and wrapping the result if it exceeds a certain limit. The process can be denoted by the following equation:
x_{i} = (a + bx_{i-1}) mod c
[The mod operator calculates the remainder of the division of (a+bx_{i-1})/c.]
Pseudo random numbers as generated by an LCG have both advantages and
disadvantages:
If you are interested in having a look at some of these aspects,
start the following .
Last Update: 2004-Jul-03