|
Lesson Randomizer We encounter the laws of chance in our daily life; for example, tossing a coin at the beginning of a football game, throwing dice for a board game, picking a winning lottery ticket, and forecasting the probability of rain. Of these, coin tossing is the simplest with two possible outcomes of head (H) and tail (T). It is the randomizer to generate either H or T in an unpredictable manner. Given a fair coin, our intuition tells us the chances for H or T are the same and hence equal to one in two, i.e., 1/2. After 10, 50, and 100 throws of a coin, you record the numbers of H and T in table 1 and then compute the ratio of H or T to the total number of throws. Are the ratios close to 1/2? Do they approach 1/2 as the number of coin throws increases? Table 1. Coin tossing
It must be noted that the long-term probability of 1/2 is one of many tests to guarantee a random coin tossing. For instance, {H, T, H, T, H, T,...} is obviously not random, though the probability for H or T turns out exactly 1/2. Now, a die throw generates one out of six numbers {1, 2, 3, 4, 5, 6}. To test the randomness of 60 die throws, you record in table 2 the number of occurrences of (1, 2, 3, 4, 5, 6) and then compute the ratio of occurrences to the total number of throws. In theory, for a true die the odds for any side to face up are one out of six, i.e., 1/6. But, are the ratios equal to 1/6 in table 2? Table 2. 60 die throws
Although coin tossing and dice throwing are the familiar randomizers, it is difficult to visualize how a winning ticket can be chosen randomly out of millions of lottery tickets. Perhaps, randomness is seriously lacking if one imagines a large metal cage containing millions of lottery tickets being tumbled, prior to pulling out a winning ticket. Moreover, the uncertainties in weather forecasting are due to the random variations in geophysical flow computations over several days, for which there are no simple randomizers to simulate the meteorological fluctuations. For this reason, the real-world randomizers are based on pseudo-random number generator. First of all, a random number generator is a recipe to come up with a number that is not in an obvious manner related to all the numbers that it has previously generated. Since it is difficult to prove that such numbers are truly random, we simply call them pseudo-random numbers. |