# Generation of Random Numbers

Introduction

The word random is used quite commonly in our daily life. One may or may not know its meaning but whenever it is used, it conveys the sense for which it is used. An apple may be picked up from a shop at random. Customers enter a shop not according to some plan; they enter the shop in a random manner. Vehicles cross a crosswalk in a random manner. Teachers not check the notebooks of all students, they check some of the notebooks selected at random. Some people are intelligent by birth, some are healthy by birth, some slip on the road, some have an accident on the road, and some catch influenza. There is something random about all this. When a coin or a die is tossed so that it can fall on any face freely, it is a random fall. Many situations in practical life are of random nature. Their ultimate results are based on chance. A small boy is familiar with the classical idea of the “lottery method”, which is centuries old and has been used for the selection of a random sample. Nobody has thus far discovered a better method of selecting a sample from the population. Most modern methods of selecting a sample are based on the theory of random selection by lottery. Random sampling is the basis of statistical inference. Thus randomness is the central idea of the study which is carried out to discover information about unknown situations.

Generation of Random Numbers

In our counting system, there are ten basic digits which are used for counting purposes. These digits are 0, 1, 2 ... 9. We can make integers of any size with the help of these digits. The figure 53792 is made up of five digits: 2, 3, 5, 7 and 9. We shall use these digits to make a set of numbers called a table of random numbers. Suppose we select ten paper slips and on each slip we write a different digit. We select any one of these slips at random and note down its digit on a paper. We return the slip to the main lot and select a slip again. The digit on the second slip is also noted along with the first digit (row–wise) or below the first digit (column–wise). We continue this process of selecting, recording and replacing each selected slip. On each selection the probability of selecting each digit is 1/10. Thus each digit has an equal probability of selection. We get a set of digits called random digits. If the first digit is 5, the second is 7, the third is 5 and the fourth is 0, we can write them in a row as 5750 or 57 50. We can also write this in a column as below:

When the first row or column is completed, we can write the selected digits in the second row or second column. In this manner a table of any size spread over a number of pages can be obtained. This is called a table of random numbers. One small table of random numbers is given below:

 5 1 2 2 0 9 1 2 7 2 1 2 4 0 9 2 7 2 4 5 3 5 5 0 2 3 3 9 7 4 4 4 5 7 1 8 7 3 3 1 1 1 7 5 8 8 7 5 9 2 6 9 4 6 7 5 5 6 8 2 7 7 6 6 3 8 3 2 1 2 9 3 9 5 6 8 8 4 8 7 9 5 7 1 8 0 3 6 8 2 1 6 4 8 3 8

This table is written with two digits in two columns together. This is one way of writing the digits. One can write 3-digit or 4–digit columns. Anybody can make a table of random numbers. A good table of random numbers contains 0, 1, 2 ... 9 almost an equal number of times. Students shall learn in higher classes that random numbers can be made for each probability distribution. The random numbers under discussion are in fact the random numbers from a discrete uniform distribution over the interval (0, 9).