Lotto, "6 aus 49" is a very popular game of chance in Germany. You bet on six numbers out of all numbers between 1 and 49. Then six numbers are chosen randomly, and if they agree with your bet, you are rich. Let us simulate the drawing of the numbers (which in reality is done by choosing six balls mechanically from a large cylinder) using a pseudorandom number generator. Such a generator starts with some "seed" (like actual time), and then gets a sequence of numbers by iteratively applying a function on the seed. Though there is nothing random on these numbers, they may appear quite random.
Here (and on all other pages) we use The Central Randomizer 1.3 (C) 1997 by Paul Houle (houle@msc.cornell.edu). Try to simulate drawings by clicking on the buttons "again", "10 times", or even "100 times". You will see the total of drawings, as well as the number among them obeying certain properties.
a) Simulate hundreds of drawings and note the percentages for the four events you obtain. Do they make sense to you?
b) How many outcomes of the drawing are possible? Recall that the outcome are six different numbers between 1 and 49 (inclusive), and that the order in which they are drawn is irrelevant---the six numbers are ordered from small to large at the end anyway.
c) How many of the possible drawings have the property that the smallest value is between 1 and 9 (inclusive)? Relate this number to the total number of possible different drawings computed in (b), and compare your result with the number obtained in (a).
d) Do the same for the number of possible drawings containing the number "11".
e) Do the same for the number of possible drawings with all six numbers odd.
f) Do the same for the number of possible drawings containing a pair of consecutive numbers, like in 3, 7, 13, 14, 22, 34.
g) If these theoretical probabilities computed in (c), (d), (e), and (f) are close to the experimental values obtained in (a), then the pseudorandom number generator seems to simulate random numbers closely. However, this is not the case for every pseudorandom number generator. Try the one given in the next page page , and compare the numbers obtained with the theoretical values.
h) Try to find another "good" pseudorandom number generator by replacing the Javascript part on the page mentioned in (g) by your invention,
Go to Project # 3.
Go back to Project # 1.