Institute of Mathematics > Mathematics interactive > Simulation > Generating of uniformly distributed random numbers

For performing stochastic simulations **random numbers** that are distributed in accordance with certain probability distributions are needed. These random numbers are obtained by various distribution-dependent methods from random numbers that are uniformly distributed on the interval [0,1].

In general no truly random numbers can be generated by a deterministic working computer, but only **pseudo-random numbers**. These peudo-random numbers are indeed nearly uniformly distributed on the interval [0,1] and meet a number of criteria for real random numbers, but still have some regularities real random numbers do not have. For applications in cryptography, it is important that these regularities are minimal and in particular can not be used to calculate the next pseudo-random number from a number of pseudo-random numbers. For application in stochastic simulation these strong conditions are not needed, so here come often **linear congruence generators** are used for generating random numbers.

In a linear congruence generator the each next random number *(a _{n+1})* is obtained from the previous one, by multipling the last value by a fixed number (

*a _{0}*:=Initial value

Random number:

The quality of the random numbers, that is, how well the resulting values *u _{n}* form a uniform distribution on [0,1], depends on the choice of