2 Random numbers

Index - - Contents - - Previous chapter - Next chapter - - Previous page - Next page

2.1 Generalities

From the Introduction we can conclude that generating random numbers or random samples constitutes an essential feature of a probabilistic algorithm.

What is a random number? Is 2 a random number? In a sense, there is no such thing as a random number, rather, we speak of a sequence of independent random numbers with a specified distribution, and this means loosely that each number was obtained merely by chance, having nothing to do with other numbers of the sequence, and that each number has a specified probability of falling in a given range.

A uniform distribution is one in which each possible number is equally probable. A distribution is generally understood to be uniform unless some other distribution is specifically mentioned.

In order to be able to use random numbers in computer algorithms it must be possible to generate the numbers by some algorithm when needed. Because a very large number of random numbers is needed it is not practical to use numbers stored in files.

Such generated random numbers are not independent in the sense described above and are therefore called pseudo random numbers.

It should be stressed that pseudo random numbers cannot be generated at random but according to procedures with known characteristics.Because the quality of the pseudo random numbers generated is dependent on some specific parameters of the generating algorithms, these numbers have to be tested for their randomness.

Depending on the application the numbers must possess different characteristics. One characteristic that all pseudo random numbers must have is that they to a high degree must have the prescribed distribution. In some applications it is enough if the totality of numbers used are very uniformly distributed. Such numbers are also called quasi random numbers. In other cases it is important that their correlation is small. How high degree and small are to be defined is of course not trivial and will depend on the accuracy needed in the application.

Most generators produce uniformly distributed numbers in (0, 1) which then must be transformed to meet the required distribution. The accuracy achievable in the computations using random numbers is of course dependent of the numerical accuracy of the random numbers. In order not to unnecessarily bring down the accuracy the numbers should be generated and transformed with the full accuracy permitted by the representation of the numbers in the computer.