Vous êtes sur la page 1sur 67

# Z PADO CESK UNIVERZITA V P LZNI FAKULTA APLIKOVANCH V ED K ATEDRA MATEMATIKY

BAKALRSK PRCE
Loterie a testovn nhodnosti taench c sel

2011

M ILAN M RZEK

## U NIVERSITY OF W EST B OHEMIA IN P ILSEN FACULTY OF A PPLIED S CIENCES D EPARTMENT OF M ATHEMATICS

BACHELOR THESIS
Lotteries and Testing the Randomness of the Numbers Drawn

2011

M ILAN M RZEK

DECLARATION
I declare that I made the bachelor thesis titled Lotteries and Testing the Randomness of the Numbers Drawn alone and that all materials I used are mentioned in the bibliography.

In Plzen

authors signature

ACKNOWLEDGEMENT
I would like to thank my supervisor, Ing. Jan Pospil Ph.D., for his suggestions, pieces of advice and patient guidance throughout the time of developing this thesis.

ii

Preface
The subject of the bachelor thesis are the lotteries and testing randomness of numbers drawn. It features derivation of probability formulas regarding the Lotto games, which are further used for analysis of particular Lotto games within the European Union. These games are analysed and compared with respect to the probabilities of winning categories. The next part of the thesis includes a study of the 2 test for testing equidistribution of the sets of balls drawn. Since numbers are drawn without replacement, the 2 statistics is not the usual 2 distribution with N 1 degrees of freedom, where N is the number of imaginary cells. In this case the 2 statistics behaves asymptotically as a sum of independent weighted random 2 variables. Because of this behaviour a special method of computation for p-values has to be used in order to decide whether the tested sets of balls are drawn with equal probability. This modied 2 test is then applied to the available data obtained from the lottery companies within the European Union and the results are presented. Thesis also includes an analysis of the discrepancies found in the article by Genest et al. (2002) published in the Journal of the Royal Statistical Society.

## Plzen, May, 2011.

iii

iv

Contents
1 2 Introduction to Lottery Theory 2.1 Dening the Lottery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Probability theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Calculations 3.1 Choosing k from N . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Adding bonus numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.1 Drawing from separate set of balls . . . . . . . . . . . . . . . . . 3.2.2 Drawing a bonus ball after the rst k numbers were drawn . . . 3.2.3 Drawing two bonus balls after the rst k numbers were drawn Testing the Randomness of Numbers Drawn 4.1 Randomness . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Pearsons standard goodness-of-t test . . . . . . . . . . 4.3 Asymptotic null distribution for subsets of size c = 1, ..., k 4.4 Other approaches to testing uniformity . . . . . . . . . . 1 4 4 5 7 7 9 9 10 11 12 12 13 14 15 16 16 17 20 25 27 29 30 31 32 34 35 37

. . . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

Computation of p-values 5.1 P-value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 Method of Imhof . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Discrepancies in the 2 and the Lottery Article Probabilities 7.1 Austria . . . . . . . . . . . . . . . . . . . . . . . . . 7.2 Belgium . . . . . . . . . . . . . . . . . . . . . . . . 7.3 Bulgaria . . . . . . . . . . . . . . . . . . . . . . . . 7.4 Denmark, Estonia, Finland, Lithuania and Sweden 7.5 Czech Republic . . . . . . . . . . . . . . . . . . . . 7.6 France . . . . . . . . . . . . . . . . . . . . . . . . . 7.7 Germany and Luxembourg . . . . . . . . . . . . . 7.8 Greece and Cyprus . . . . . . . . . . . . . . . . . . v

6 7

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

7.9 7.10 7.11 7.12 7.13 7.14 7.15 7.16 7.17 7.18 7.19 7.20 7.21

Hungary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ireland . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Italy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Latvia . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Malta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Poland . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Portugal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Romania . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Slovakia . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Slovenia . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Spain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . United Kingdom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Austria, Belgium, France, Ireland, Luxembourg, Portugal, Spain and the United Kingdom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

39 42 43 45 46 47 48 49 50 51 52 53 54 56 58

## A Content of the CD Bibliography

vi

Chapter 1

Introduction to Lottery
Lottery is perhaps the most widely known and by far the oldest game of chance. Since the very beginning with slips, woods or simple drawing of lots to nowadays most popular form of lottery with randomly selected balls, the basic structure, technical procedure and the simplicity of this game of chance has remained preserved. The English word lottery has roots in Dutch word loterij, which is derived from the Dutch noun lot meaning f ate. But the roots of lottery itself can be traced back to the second millennium B.C. There is a reference to a game of chance known as the drawing of wood in the early Chinese collection of poems and songs. This game of chance in context appeared to describe drawing of lots. The rst signs of lottery come from the Han Dynasty between 205 and 187 B.C., where ancient Keno slips were discovered. It is believed that proceeds from these lotteries helped to nance the government projects. Also the rst known European occurrence of lottery during the Roman Empire organized by the Roman Emperor Augustus Caesar was used as a way how to raise money, in this case the proceeds went for repairs to the city of Rome. The winners were given prizes in the form of valuable articles. The rst records of lotteries with prizes in the form of money date to 1443-1449 and they come from the Low Countries, which are the historical lands around the low-lying delta of three rivers, the Rhine, Scheldt and Meuse. The Dutch were the rst to shift the lottery prizes to solely monetary prizes and also they were the rst to base the prizes on the actual odds. Thanks to the popularity of lotteries, they were often used as a painless form of taxation. Ofcial lottery in England was designed during the 16th century to raise money for public reparations. Followed by France in the 17th century, where the lotteries became one of the main resources for religious congregations in the 18th century. In colonial America between 1744 and 1776 there were sanctioned over two hundred lotteries and they played a huge role in the nancing of both private and public ventures. The lotteries still remain very popular these days. The most common are the state and national number lotteries, offered and run by states whose regulations allow this type of game of chance. The popularity of lottery is partly due to its transparency and also simplicity. There is no opponent, no dealer, no strategy that can affect the course 1

of the game. All the components are clearly visible: the urn with the balls, the shufing device, the numbers on the players ticket. The players only choose the numbers, buy ticket and wait for the numbers to be drawn, which happens usually once or twice a week. It is very common that the drawings are broadcasted on national TV. Besides the transparency or simplicity, the most important element that helps to the publics fascination with the lottery games are the amounts of winnings. Lotteries usually offer the highest amount of winnings among the legal gambling games available, which every day attracts the players that buy the tickets and dream about their numbers matching the winning combination. The possibility of winning is mathematically very improbable. The high prizes, especially the highest winning categories are of course compensated with the low winning probabilities. These probabilities vary nationally or internationally due to different set of rules or game matrices. Each lottery matrix can be described and numerical probabilities for each matrix can be found. The probabilities are basically the entire ensemble of the lottery game since no real strategy how to win the lottery exists. Some say that the lottery is a tax on people who are bad at mathematics. The following story says something different. In 1992 a group of 28 members organized by 43-year-old businessman Stefan Klincewicz tried to buy all the possible combinations and thus guarantee a jackpot win, which reached 1.7 million. At initial cost of 0.50 for one combination, covering all possible combinations in 6/36 game matrix would cost only 973,896. So the plan was set. The Irish National Lottery noticed an unusual high amount of sold lottery tickets and tried to scupper this plan by limiting the number of tickets any machine could sell, and by turning off terminals, which Klincewiczs team of ticket purchasers was using heavily. Despite all the companys efforts, Klincewiczs team had the winning numbers on the night. Unfortunately two other winning tickets were sold too, so the group could claim only one-third of the jackpot, or 568,682. But many smaller match-5 and match-4 prizes brought its total winnings to approximately 1,166,000. To avoid similar schemes, the National Lottery changed later that year the game matrix to a 6/39 in order to raise the jackpot odds.1 One of the subjects of the mathematical interest connected with the lottery is the so called lottery problem. There are several articles published dealing with the lottery problem like developing Monte Carlo algorithm seeking the smallest possible number of tickets to guarantee at least one winning ticket with m correct matches for any t-subset for lottery ( N , t, m). This particular approach can be found in paper by Braverman and Gueron . Another article on the lottery problem written by Fredi, Szkely and Zubor  contains proof that 100 tickets are needed to guarantee 2 correct matches in the Hungarian Lottery. Results of this work were further used by Bougard in the article The lotto numbers L(n, 3, p, 2) . The problem what is the minimum number of tickets so that there is at least one ticket with particular matching combination is investigated also in the article by Jans and Degraeve  or in the article A Lotto Systems Problem  written by Russel and Grifths. Several strategies for Lotto games are examined such as the numbers that should
1 source:

www.independent.co.uk

be due in the article by Heinze  or generally the proven strategies for Lotto games in the book  by Heinze and Riedwyl. Mathematical models for various playing systems are described in the book The Mathematics of Lottery: Odds, Combinations, Systems by Barboianu . Modelling the probability distribution of prize winnings is another topic described in article by Baker and McHale , which delivers a spin-off result, that lottery players may increase the expected value of their tickets by choosing numbers which are less popular with other lottery players. Another researched subject connecting mathematics and lottery is testing the randomness of the numbers drawn. Some methods how to test the randomness of the balls drawn are described in the article by Haigh  or Johnson and Klotz . Article written by Genest, Lockhart and Stephens  shows one way how to test the randomness of the numbers drawn using 2 properly as opposed to the usual approach to this test using 2 that can be found for example in the book by Woolfson . Another approach also cited in the article  is described in the article written by Joe . The aim of this paper is to study and implement the test of randomness introduced by Genest, Lockhart and Stephens in  for testing real data obtained from the lottery companies within the European Union. Each lottery game is analysed and compared with respect to the probabilities for its winning categories. In order to analyse the probabilities we established a probability space on which to work in Chapter 2. Chapter 3 describes how to derive formulas for calculating probabilities for various types of games. Next Chapter 4 discusses why to test the randomness of numbers and why to use the method introduced in  instead of the usual approach. Chapter 5 shows how to calculate p-values, which differs due the alternative approach to the testing as described in . Chapter 6 contains the analysis of the discrepancies found in the article . The results of the tests for the data obtained from the lottery companies with commentary to the p-values can be found together with the analysis of winning categories in Chapter 7.

Chapter 2

Theory
2.1 Dening the Lottery

The most popular form of lottery is that which uses balls with numbers inscribed on them and the rules for giving prizes are based on the quantity of correct numbers predicted by the player that are randomly drawn. Lets dene the following parameters: N the total number of lottery numbers, i.e. numbers that can be drawn are {1, .., N } k the number of balls drawn out of urn without replacement

The whole process of the number lottery game can be described as follows: Player buys a ticket before the draw by marking k predicted numbers on a printed matrix of N numbers on an entry form. The form is scanned electronically and a ticket is printed out and given to the player as a record. Then on the established date and time the draw is performed and the k winning numbers are determined. Both lottery company and player check the winning numbers with the numbers on the bought/sold tickets. If there was a ticket sold that matches some of the winning prize categories, the player is awarded a prize according to the category. Another option how to pick the numbers these days is to use lottery number generator, most lottery companies provide this service. In this case the numbers are pseudorandomly generated by a computer. Each lottery has its own awarding system and numerical parameters. However, we can already distinguish between the various games by referring to them as Lotto k / N . For example we may now refer to a game where 6 winning numbers ranging from 1 to 49 are drawn without a replacement as Lotto 6/49. k/ N represents a certain lottery matrix, the most common within the EU is 6/49, but there are also 5/35, 5/50, 5/90, 6/42, 6/45, 6/48, 6/90, 7/39. See Chapter 7 for EU Lotto games descriptions.

2.2

Probability theory

What we are interested in the lottery game as in every game of chance is some description of possible outcomes. In probability theory we call them events and in our lottery case events are the occurrences of certain numbers or groups of numbers. Machine that performs the drawing generates the outcomes: combinations of k different numbers out of N numbers. We can think of these combinations as the sample space of our experiment, which is drawing k numbers from N numbers without replacement. Sample space is the set of all possible outcomes. All of these events are equally possible to be drawn which is a necessary condition for our probability model. Lets denote the samk elements which is all combinations of k numbers taken ple space . Such set has CN out of N . Game matrix 6/90 5/90 7/39 6/49 6/48 6/42 5/50 5/35 No. of elements 622614630 43949268 15380937 13983816 12271512 5245786 2118760 324632

Table 2.1: Number of elements for lottery matrices within EU national lotteries in decreasing order We consider the eld of events F as being the set of parts of the sample space, so this set is also nite. The eld of events is suitable for a function P given by the classical denition of probability on a nite eld of events with equally possible elementary events. The probability P of event E is a number expressing the chance that event E will occur, in other words it is a ratio between the number of outcomes favourable for E to occur and the number of equally possible outcomes. On a nite eld of events P is a function P : F R and satises these axioms: 1. P( E) 0, E F 2. P() = 1 3. P( E1 E2 ) = P( E1 ) + P( E2 ), for any E1 , E2 F that E1 E2 = With P being probability function we have built a probability space (, F , P) that ensures basic probability model on which to work. 5

Taking for example matrix 5/35, = {(1, 2, 3, 4, 5), (1, 2, 3, 4, 6), ..., (31, 32, 33, 34, 35)}, 5 elements. We can build similar models for working with number of numbers that is C35 drawn up to k for predicting events such as drawing various subsets of numbers. Having the matrix 5/35 and four numbers already drawn the sample space of the probability model for the last number in this particular case would contain 31 elements (35 4) .

Chapter 3

Calculations
3.1 Choosing k from N

Let us start with what most people are interested in what are the chances of winning the lottery? Considering that the condition for winning the highest prize is predicting correctly all the k drawn numbers from N numbers in the urn (we play Lotto k/ N ), let this be an event Ek and so probability of winning the lottery is now P( Ek ). We can demonstrate the chance of winning in the following way: Starting with an unmarked matrix on an entry form, there are N numbers we can 1 choose to mark as the rst one and so there is probability of predicting the number N correctly. As soon as we pick the rst number there is N 1 numbers left, which means 1 of predicting the second one correctly. Keeping in mind that there is probability N1 the drawn balls are not returned back, we can see that there are N ( N 1) ways how to choose the rst two numbers. Therefore the probability of predicting the rst two 1 numbers correctly would be . We can continue this way ending up picking N ( N 1) 1 . And this the last k-th number which we will mark correctly with probability Nk+1 way we get: 1 , N ( N 1)...( N k + 1)

## P( E) = which can be also written as:

P( E) =

1 N !/( N k )!

However, this P( E) is not the probability of winning the lottery, in fact it is even 7

smaller number than our desired probability, because we are taking into account the order of the numbers, which is not signicant during the draw. It does not matter if we pick up and mark on the entry form the last drawn number as our rst, it will still count as correctly predicted. Therefore we have to divide the denominator by k !, which is the number of possible orders of k numbers in which they could be drawn. Thus the probability of winning the lottery denoted as P( Ek ) is: N! ( N k)!k!

P( Ek ) = 1

N! , which is the ( N k)(k!) number of all possible combinations of k numbers drawn from N numbers. This numk or more generally as: ber can be also written as CN What we have now in the denominator is the number N k N! ( N k)!k!

k is the number of ways of picking k unordered C stands for combinations and CN outcomes from N possibilities. It is also known as choice number and read " N choose k" or as a binomial coefcient or combinatorial number. Now move on to the next possibilities. When drawing k numbers out of N there is only way how to predict them correctly - pick exactly the one unique combination, but for subsets of k there is more than one combination of k numbers that can match k , the subset and therefore there is a higher probability. We have already established CN which is the number of possible combinations for a group of k numbers taken out of N . As written above for predicting k numbers out of k correctly there is of course only one unique combination:

k k

k! k! = =1 (k k)!k! 0!k !

k if n < k. Thus for predicting correctly But there is more than one combination for Cn k n balls of the k balls drawn there is ways how to do that. Moreover there are still n k n losing balls which are drawn from N k numbers and these can be chosen in Nk k Nk ways. Therefore there are in total ways that gives the result of kn n kn picking correctly n balls out of the draw containing k numbers.

We can now write a formula how to calculate a probability of predicting n numbers matching the k balls drawn: k n Nk kn N! . ( N k)!k!

P( En ) =

k , which are the all combinations possiThe number in the denominator is again CN ble. If we put n = k we get exactly the P( Ek )

P( En=k ) =

k k

Nk kk

3.2

## Adding bonus numbers

Many lotteries draw an additional bonus number, a bonus ball. There are two kinds of these numbers. Either the bonus balls are drawn from a separate urn from the main lottery or they are drawn from the same urn after the main k numbers were drawn.

3.2.1

## Drawing from separate set of balls

Let B be the number of bonus numbers and l be the number of bonus numbers drawn out of B and m number of correctly predicted drawn bonus numbers. Let Dm be the event of predicting correctly m of l drawn bonus numbers. For calculating the probability we would use the same scheme as for the main lottery thus: P ( Dm ) = l m Bl lm B . l

For a lottery game of matrix N /k and B/l matrix for bonus numbers we can calculate the probability of matching n numbers of the main lottery and m bonus numbers this way: P( Am,n ) = P( En ) P( Dm ) Now with the above formula we can fully analyse the probabilities of winning in a European lottery called Euro Millions. This lottery uses main game matrix 5/50 and two additional bonus numbers are drawn from separate board containing 10 numbers. The results can be viewed in the following Table 3.1.

Table 3.1: Probability analysis of winning categories for Euro Millions lottery

## Category Number 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12.

Main Numbers 5 5 5 4 4 4 3 3 2 3 1 2

Bonus Numbers 2 1 0 2 1 0 2 1 2 0 2 1

Approximate Odds 1:76275360 1:5448240 1:3632160 1:339001 1:24214 1:16143 1:7705 1:550 1:538 1:367 1:102 1:38

Winning Probability 0.0000000131 0.0000001835 0.0000002753 0.0000029498 0.0000412977 0.0000619466 0.0001297929 0.0018171006 0.0018603649 0.0027256509 0.0097669156 0.0260451081

When we sum all the probabilities in the above Table 3.1, we obtain the probability of winning anything when buying one lottery ticket. The probability is 4.2%.

3.2.2

## Drawing a bonus ball after the rst k numbers were drawn

The other case is when a bonus ball is drawn from the same urn after the main k numbers were drawn. Games based on this scheme are more common than the previous case. Lets establish formula for computing probability of predicting correctly n + b numbers, n being the number of correctly predicted numbers from the k numbers and b is either 0 that is not predicting the bonus number correctly or 1 predicting the number correctly. Let this be an event Ln+b . Of course the probability of matching n numbers + the bonus number will be lower than when matching only n numbers, but also we can not forget that when calculating probability of winning the category, where n numbers must be matched and where category n+1 also exists, we must omit the combinations including the bonus number for the category n, which is in fact n + 0. k Nk Number of combinations matching n numbers out of k is . Now we n kn consider the case where after the k winning numbers there is the bonus number drawn out of the remaining N k numbers. In case we want the number of combinations k Nk kn matching the bonus ball also we have to multiply by , which is the n kn Nk k Nk ratio of combinations that contains the bonus number and we get: n kn 10

P ( L n +1 ) =

k n

## ( N k) (k n) , Nk which can be also derived from:

kn . Nk therefore the probability of event Ln+0 is: 1 k n N k ( N k) (k n) Nk kn . N k

P ( L n +0 ) =

3.2.3

Drawing two bonus balls after the rst k numbers were drawn

Viking Lotto draws two bonus numbers after the main k numbers were drawn. This two balls play a role in determining the winner of the second highest category, which is matching 5 numbers of six drawn and matching one of the two bonus balls, see page 31 for the list of winning categories and the probability analysis of the Viking Lotto. Since there is only one ball left for matching one of the bonus balls we can use the formula k n Nk kn kn Nk . N k

P ( L n +1 ) =

We only have to double the probability of the chance of matching the bonus ball, since there are two of them in the rest of the balls. Thus the probability of winning the second category of the Viking Lotto can be calculated in following way: 6 5 42 2(6 5) 1 48 6 = 0.0000009779. 48 6

P ( L 5+1 ) =

11

Chapter 4

## Testing the Randomness of Numbers Drawn

4.1 Randomness

We have already described the way the lottery game works in Chapter 2. The k numbers are selected from N numbers at random from a rotating drum that ejects them individually without any human inuence. Drawing this way should guarantee the k numbers to be produced without any bias. Taking as an example data for Latvian Latloto game, when we look at the Picture 4.1 the rst thing we notice is that there is a large range of frequencies. When we have a closer look at the Table 4.1 we may observe that the range is from 162 for number 4 to 216 for number 5. This might lead us to consider whether the selection was awed in some way. To check whether all the numbers forming winning combination come up with equal probability we will use the Pearsons standard goodness-of-t test . Table 4.1: Observed frequency of occurrence of balls 1-35 in the ve-number winning combination of the rst n=1320 draws of Latvian 5/35 Lotto spanning January 4th, 1997, and December 29th, 2010

(1) 208 (2) 189 (3) 184 (4) 162 (5) 216 (6) 167 (7) 212

(8) 182 (9) 181 (10) 192 (11) 195 (12) 192 (13) 195 (14) 179

(15) 196 (16) 187 (17) 175 (18) 185 (19) 181 (20) 203 (21) 183

(22) 204 (23) 183 (24) 202 (25) 178 (26) 177 (27) 192 (28) 197

(29) 174 (30) 206 (31) 194 (32) 193 (33) 169 (34) 183 (35) 184

12

250

200

150

100

50

0 1 6 11 16 21 26 31 35

Figure 4.1: Observed frequency of occurrence of balls 1-35 in the ve-number winning combination of the rst n=1320 draws of Latvian 5/35 Lotto spanning January 4th, 1997, and December 29th, 2010. The blue line is at level 188.6, which is the mean.

4.2

## Pearsons standard goodness-of-t test

For testing one number at a time, a classic approach is to determine the observed frequency Oi with which the numbers i = 1, . . . , N occurred among the k winning numbers in n lottery draws, and then to attempt to compare these observed counts with the expected counts Ei , which we can express as Ei = nk . N

## Then we would be ready to use the traditional Pearson statistics 2 =

(Oi Ei )2 . Ei i =1

In most cases the resulting statistics would be compared with with 2 with N 1 degrees of freedom, denoted by 2 N 1 under the null hypothesis of equiprobability. But in our lottery case the statistics is not the usual 2 distribution with N 1 degrees of freedom, because the observations, or winning numbers are not drawn with replacement. After the number was once selected among the k winning numbers, it is not going back to the drum and thus can not be chosen again in the same draw; the variability of the standard statistics is thereby reduced. 13

When testing the null hypothesis of equiprobability of subsets of winning numbers of size c = 1, . . . , k, the statistics 2 behaves asymptotically as a sum of c independent weighted 2 random variables. There are two ways how to approach this either try to adapt Pearsons 2 statistics in such a way that its limiting distribution remains a simple 2 -distribution, which explained Joe , or to use the equation above and nd the weights in its asymptotic distribution according to Genest, Richard and Stephens , which we will use in this paper.

4.3

## Asymptotic null distribution for subsets of size c = 1, ..., k

We already established the formula for calculating the expected counts for c = 1. In the same way we are able to test if all subsets of size c = 1, ..., k are drawn with equal probability in n lottery draws among the k numbers chosen from the set of N balls. Let Pc denote the collection of such subsets, we expand the statistics according to Genest, Richard and Stephens  and we may write 2 =

s Pc

(Os Es )2 , Es

## where Os denotes the observed count for the subset s Pc and Es = ec n Nc kc N k

stands for the expected count for the same subset. The expected count for a subset of size c may be also written as ec = n k c N . c

The idea is that in every draw we have c subsets among k drawn numbers and we divide these by all possible combinations of size c taken from N numbers. We of course multiply this expected count n times since with more than one draw the expected count for each subset will be n times higher. The equation above taken from Genest, Richard N and Stephens  is somewhat more general and works with all combinations , k Nc N thus for every subset of size c we have combinations from . kc k

14

It is proved in Appendix A of Genest, Richard and Stephens  that the asymptotic distribution of 2 dened above is a linear combination of c independent 2 random variables, i.e.

l =1

w l 2 v,
l

## where wl = and vl = N l kl kc Ncl kc Nc kc

N l1

N N 2l + 1 . l Nl+1

When k = c, we have w1 = ... = wc = 1 and in this case 2 is asymptotically disN tributed as a 2 random variable with 1 degrees of freedom. This is in fact c a drawing with replacement, because after each k-winning combination is drawn the balls are going back to the drum and they are ready for the next draw which includes N all N numbers again, thus there are combinations to be drawn. c

4.4

## Other approaches to testing uniformity

A very popular way for testing uniformity of frequencies for the N Lotto balls is demonstrated for example by Michael M.Woolfson in the book Everyday probability and statistics . The test is done on the rst n = 1130 draws of the UK lottery, where N = 49 and k = 6. In fact it is the very same 2 goodness-of-t test as introduced in chapter 4. The test uses the classic formula for the Pearson Statistics 2 = where Ei = nk . N

(Oi Ei )2 , Ei i =1

But after the test statistics is obtained, it is compared with the 2 table giving probabilities for N 1 degrees of freedom. However as previously stated, this approach should not be used since the numbers are drawn without replacement and because of that the Pearsons statistics does not follow a simple 2 -distribution that can be found in tables.

15

Chapter 5

Computation of p-values
5.1 P-value

One way how to decide in statistical signicance testing is on the account of p-value. P-value is the probability of obtaining a test statistics that is at least as extreme as the one that was observed, assuming that the null hypothesis is true. We often reject the null hypothesis if the p-value is less than 0.01 or 0.05, these two numbers are the most common values of signicance level of the test. The signicance level is represented by Greek letter . Signicance level of the test determines the probability of error of the rst kind, or type I error. This is the error of rejecting a null hypothesis when it is actually true. In our lottery case for c = k, we can compute the p-value as follows p-value = P(2N

( c ) 1

> x ),

where x = 2 , N 1 is in this case the c number of degrees of freedom. This is the probability of getting more extreme statistics than the one that was observed. We can use Matlab to obtain this number by simple command which is the test statistics obtained by Pearsons formula. P_VALUE=1-chi2cdf(x,degrees_of_freedom).

This is for the case where the statistics follows a simple 2 distribution, thus for drawing with replacement. But for c < k, where 2 behaves asymptotically as a sum 16

of c independent weighted 2 random variables we can not use this method. To obtain these p-values we will use method of Imhof  instead.

5.2

Method of Imhof

2 as dened by the Pearsons classic formula can be also written according to  as 2 = where N k Nc kc Yn Yn ,

Yn = (O E)/ n
N with O a E being the vectors of Os and Es , where c s Pc , which is the collection of all subsets. Prime symbol indicates the transpose operation. As stated in  the null distribution of Yn is normal and has mean 0 and covariance matrix . With the number n of draws approaching +, standard results imply that 2 converges in distribution to is a random vector of length N k Nc kc
(N c)

l =1

l Zl2 ,

where Zl ; l = 1, ..., ( N c ), are mutually independent standard normal variables and l are eigenvalues of . As pointed out in  l s take only c possible distinct non-zero values l for l = 1, .., c with multiplicity vl . Consequently the asymptotic distribution of 2 is of the form

l =1

w l 2 v,
l

17

## A formula how to calculate the probability P ( r 2 hr > x )

r =1 m

is given in the article by Imhof  and can be found as (2.1) in the article together with the proof. The formula is P where Fk (, x ) = n1 exp{ x /(2)} (k r )vr .
l =k m

r =1

r 2 2v

>x

k =1

( v k 1) !

v k 1 Fk (, x ) vk 1

=k ,

m 1

## vr and p is such that

1 > 2 > ... > p > 0 > p+1 > ... > m . The formula is very convenient to use when all vk are small, but with large vk as in our lottery case it becomes very unstable due to the corresponding derivatives of Fk (, x ) and large factorials. Also it requires the degrees of freedom to be even. We will therefore use a numerically more convenient formula (3.2) from the next section of the article  instead: P( Q > x ) = where 1 m 1 2 2 1 r u)(1 + 2 [hr tan1 (r u) + r r u ) ] xu, 2 2 1
2 (1 + 2 ru ) 1 m
1 4 hr

1 1 + 2

(5.1)

exp

1 m (r r u)2 2 1

2 (1 + 2 ru )

Q=

r =1

r 2 h ; .
r 2 r

18

## 2 is the non-centrality parameter. In our case r

Q=

l =1

w l 2 v,
l

2 = 0, which simplies the ( u ) and ( u ) functions the non-centrality parameter r in (5.1), thus we have

P ( w l 2 vl > x ) =
l =1

1 1 + 2

## where (u) = 1 c 1 [vl tan1 (wl u)] xu, 2 1 2

2 (1 + w2 lu ) 1 c
1 4 vl

(u) =

The function u(u) increases monotonically towards +, therefore the integration in formula (5.1) can be carried only over a small nite range 0 u U . In our case choosing U = 1 was sufcient enough.

19

Chapter 6

## Discrepancies in the 2 and the Lottery Article

During the work with the article  we found some discrepancies regarding the tables 1 and 2 in the article  on pages 252 and 253. The test of randomness is demonstrated there on the data for the Canadas Lotto 6/49. Nevertheless, the test statistics for c = 5 in Table 1 and for c = 6 in Table 2 do not correspond to the p-values stated in the tables. The p-values are calculated by the method of Imhof and the formula used is 5.1. However if we put x = 1906878, which is the original value of the test statistics for c = 5 from the Table 1 in the article into the formula we obtain p-value equal to one half. The function f (u) = where (u) = 1 c 1 [vl tan1 (wl u)] xu, 2 2 1
2 (1 + w2 lu ) 1 c
1 4 vl

## sin (u) , u(u)

(u) =

can be seen in Figure 6.1. Similarly the same function for c = 6 from the Table 2, where x = 13983809 is portrayed in Figure 6.2 .

20

0.05

0.1

4 u

7 x 10

8
3

## sin (u) u(u)

for c = 5, k = 6, x = 1906878

0.05

0.1

0.5

1.5

2.5 u

3.5

4.5 x 10

5
3

## sin (u) u(u)

for c = 6, k = 7, x = 13983809

21

Note that both integrals of these functions are really small numbers. Moreover according to the formula P( Q > x ) = 1 1 + 2
0

## sin (u) du, u(u)

they get divided by , which leads to the result 0.5 in both cases. Having the data for the rst n = 1798 draws of the Canadas Lotto 6/49 available, we were able to carry out the same tests as in . The Tables 6.1b and 6.2b show the results. The Tables 6.1a and 6.2a show the original values given by the authors of the article . Table 6.1: Test of equidistribution for subsets of c = 1, ..., 6 balls for Canadas Lotto 6/49 using the rst 1798 draws spanning June 12th, 1982, and April 14th, 2001
(a) Original table (b) Corrected table

c 1 2 3 4 5 6

c 1 2 3 4 5 6

## p-value 0.104 0.299 0.476 0.479 0.534 0.633

Table 6.2: Test of equidistribution for subsets of c = 1, ..., 7 balls for Canadas Lotto 6/49 using the same data of 1798 draws spanning June 12th, 1982, and April 14th, 2001
(a) Original table (b) Corrected table

c 1 2 3 4 5 6 7

c 1 2 3 4 5 6 7

## p-value 0.044 0.164 0.357 0.238 0.544 0.853 0.555

Surprisingly, the p-values were actually correct, but the test statistics given in the article were wrong. As shown previously the p-values computed based on the test statistics given in the article were not the same as in the tables. On the other hand for the real test statistics obtained from the data for the rst n = 1798 draws the pvalues were matching those in the article. The following Figures 6.3 and 6.4 show the 22

## integrand for the correct test statistics.

90 80 70 60 50 f(u) 40 30 20 10 0 0

0.001

0.002

0.003

0.004

0.005 u

0.006

0.007

0.008

0.009

0.01

## sin (u) u(u)

for c = 5, k = 6, x = 1906702

3000

2500

2000

f(u)

1500

1000

500

0.2

0.4

0.6

0.8

1 u

1.2

1.4

1.6

1.8 x 10

2
3

## sin (u) u(u)

for c = 6, k = 7, x = 13977896

23

We can also observe two rounding errors in the Table 6.1a. First is for the expected frequency e5 . According to ec = n Nc kc N , k

where c is number of balls in the subsets, n is number of draws, N is number of balls in the lottery and k is number of drawn balls out of N . For c = 5, k = 6, N = 49,n = 1798 we get: e5 = 1798 thus e5 = 0.0057. Another different value is the p-value for subset of two balls in Table 6.1a. The result using the method of Imhof was p-value=0.299390046140098, 49 5 65 49 6

= 79112/13983816 = 0.005657397093898,

## which after correct rounding is 0.299.

24

Chapter 7

Probabilities
Tables in this section show the approximate odds as well as the probabilities of winning for categories of particular lottery games within the European Union. The analysis is absent only for Netherlands, where the eldest running lottery called Staadsloterij1 exists, but unfortunately there were no data available in the electronic form. Another part of the report shows the results of testing for equidistribution for the available data. One way how to interpret small p-values is that such an event is rare to appear. Actually there are some p-values that are less than 5% signicance level, see for example Belgium Lotto for c = 1 in Table 7.4a on on page 29 or Greek Lotto for c = 3 looking at the whole history in Table 7.18 on page 38, which is signicant at the 10% level. These would lead to rejection of the null hypothesis of equidistribution. But at the 5% signicance level we can reject very few of the tested hypothesis of equidistribution. We can observe very low p-values for the Italian Gioco Lotto in Table 7.28 on page 44, which can be possibly explained by the long history during which balls and machines were changed several times. But taking modern lotteries for example Czech Sportka, see Table 7.10 on page 33 or German Lotto 6aus45 in Table 7.15 on page 36 the p-values do not provide us any serious ground for suspecting a lack of uniformity. Worth a notice is the comparison of p-values for the draws including the bonus numbers with those without the bonus number. There is a tendency for lower p-values to occur when taking a bonus number as part of the draw. This test however does not take into account the order of the numbers which is important when determining the prizes. Another remark which is also mentioned in the article  is that for large subsets, for example taking the classic matrix 6/49 and c = 6, p-value may be for example of value 0.821 as in Table 7.12a on page 34, but in fact such statistics is the lowest possible for n = 4858 draws. Having 4858 cells with one count and the rest of (49 6 ) cells having zero count, the real p-values in such cases are 1. Although this is not the case for all the lotteries. During the history of German Lotto there appeared two draws that had the same outcome, that means one cell with 2 counts, n 1 cells with one count and the rest were zeros. This fact can be observed in the Tables 7.15 and 7.14a on pages 36 and 35, p-values for c = 6 are actually lower. Similar thing can be also observed in Latvias Lotto where there were
1 www.staatsloterij.nl

25

three different outcomes that reappeared during the 1320 draws. It may be seen then as shown in the article  that the asymptotic distribution of 2 slowly deteriorates as c increases, but there is no reason to doubt its reliability for c = 1, 2, 3, 4 regarding the classic matrices.

26

7.1

Austria

Name: Lotto "6 aus 45" Since: 1986 Run by: sterreichische Lotterien Ges.m.b.H.2 Type of lottery game: 6/45 No. of Bonus numbers: 1 Separate board game: No

Table 7.1: Probability analysis of winning categories for Lotto "6 aus 45"

Category 1. 2. 3. 4. 5. 6. 7. 8.

Numbers Match 6 of 6 Match 5 of 6 + Bonus Match 5 of 6 Match 4 of 6 + Bonus Match 4 of 6 Match 3 of 6 + Bonus Match 3 of 6 Match Bonus

Approximate odds 1:8145060 1:1357510 1:35724 1:14290 1:772 1:579 1:48 1:8

## Probability 0.0000001228 0.0000007366 0.0000279924 0.0000699811 0.0012946498 0.0017261997 0.0207143962 0.1315364159

Probability of not winning anything is 84.46%. Probability of not matching any ball is 33.89% (40.06% not including the bonus number). Table 7.2: Test of equidistribution for subsets of c balls for Austrias Lotto 6/45 using n = 1962 draws spanning September 7th, 1986, and December 29th, 2010
(a) c = 1, ..., 6 (b) c = 1, ..., 7

c 1 2 3 4 5 6

c 1 2 3 4 5 6 7

## p-value 0.276 0.331 0.356 0.272 0.517 0.666 0.582

2 www.lotterien.at

27

7.2

Belgium

Name: Lotto Since: 1978 Run by: Loterie Nationale de Belgique3 Type of lottery game: 6/42 No. of Bonus numbers: 1 Separate board game: No

## Table 7.3: Probability analysis of winning categories for Belgium Lotto

Category 1. 2. 3. 4. 5.

## Probability 0.0000001906 0.0000011438 0.0000400321 0.0018014460 0.0272218501

Probability of not winning anything is 97.09%. Probability of not matching any ball is 30.94% (37.13% not including the bonus number). Table 7.4: Test of equidistribution for subsets of c balls for Belgium Lotto 6/42 using n = 2617 draws spanning February 4th, 1978, and December 29th, 2010
(a) c = 1, ..., 6 (b) c = 1, ..., 7

c 1 2 3 4 5 6

c 1 2 3 4 5 6 7

## p-value 0.002 0.014 0.195 0.475 0.887 0.742 0.639

3 www.loterie-nationale.be

28

7.3

Bulgaria

Name: Loto Run by: Bulgarian Sports Totalizator4 Since: 1958 Type of lottery game: 6/49 No. of Bonus numbers: 0 Separate board game: No

## Table 7.5: Probability analysis of winning categories for Bulgarian Loto

Category 1. 2. 3. 4.

## Probability 0.0000000715 0.0000184499 0.0009686197 0.0176504039

Probability of not winning anything is 98.14%. Probability of not matching any ball is 43.60%. Table 7.6: Test of equidistribution for subsets of c = 1, ..., 6 balls for Bulgarian Lotto 6/49 using n = 7989 draws spanning 1958 and 2010 2 53.49 1229.92 18846.55 213379.73 1909313.31 13993330.84

c 1 2 3 4 5 6

4 www.toto.bg

29

7.4

## Denmark, Estonia, Finland, Lithuania and Sweden

Name: Viking Lotto Run by: Danske Spil5 , Eesti Loto6 , Veikkaus7 , Perlas8 and Svenska Spel9 Since: 1993 Type of lottery game: 6/48 No. of Bonus numbers: 2 Separate board game: No

V I K I N G

## Table 7.7: Probability analysis of winning categories for Viking Lotto

Category 1. 2. 3. 4. 5.

## Probability 0.0000000815 0.0000009779 0.0000195575 0.0010524375 0.0187100009

Probability of not winning anything is 98.02%. Probability of not matching any ball is 30.82% (42.75% not including the bonus numbers).

## 9 www.danskespil.dk 9 www.eestiloto.ee 9 www.veikkaus.fi 9 www.perlas.lt 9 www.svenskaspel.se

30

7.5

Czech Republic

Name: Sportka Run by: Sazka, a.s.10 Since: 1957 Type of lottery game: 6/49 No. of Bonus numbers: 1 Separate board game: No

## Table 7.8: Probability analysis of winning categories for Czech Sportka

Category 1. 2. 3. 4. 5.

## Probability 0.0000000715 0.0000004291 0.0000180208 0.0009686197 0.0176504039

Probability of not winning anything is 98.14%. Probability of not matching any ball is 37.51% (43.60% not including the bonus number). Table 7.9: Test of equidistribution for subsets of c balls for Czech Sportka 6/49 using n = 5190 draws spanning January 1st, 1977, and December 29th, 2010
(a) c = 1, ..., 6 (b) c = 1, ..., 7

c 1 2 3 4 5 6

c 1 2 3 4 5 6 7

## p-value 0.640 0.750 0.870 0.958 0.891 0.176 0.654

10 www.sazka.cz

31

Table 7.10: Test of equidistribution for subsets of c = 1, ..., 6 balls for Czech Sportka 6/49 using n = 6822 draws spanning April 21st, 1957, and December 29th, 2010 2 41.81 1124.21 18237.07 211556.23 1905457.46 13981093.62

c 1 2 3 4 5 6

## p-value 0.527 0.725 0.753 0.655 0.755 0.697

32

7.6

France

Name: Loto Run by: La Franaise des Jeux11 Since: 1976 Type of lottery game: 5/4912 No. of Bonus numbers: 0 Separate board game: Chance Type of Separate board game: 1/10

## Table 7.11: Probability analysis of winning categories for French Loto

Category 1. 2. 3. 4. 5. 6.

## Probability 0.0000000524 0.0000004720 0.0001153715 0.0049609730 0.0694536217 0.0925469509

Probability of not winning anything is 83.29%. Probability of not matching any ball is 51.26% (56.95% not including the bonus number). Table 7.12: Test of equidistribution for subsets of c balls for French Loto 6/49 using n = 4858 draws spanning May 19th, 1976, and October 4th, 2008
(a) c = 1, ..., 6 (b) c = 1, ..., 7

c 1 2 3 4 5 6

c 1 2 3 4 5 6 7

## p-value 0.851 0.836 0.764 0.951 0.796 0.349 0.644

12 www.fdj.fr 12 since

2008

33

7.7

## Germany and Luxembourg

Name: Lotto 6 aus 49 Run by: Deutsche Lotto- und Totoblock13 Since: 1955 Type of lottery game: 6/49 No. of Bonus numbers: 1 Separate board game: Superzahl Type of Separate board game: 1/10 Table 7.13: Probability analysis of winning categories for Lotto 6 aus 49

Category 1. 2. 3. 4. 5. 6. 7. 8.

Numbers Match 6 of 6 + Superzahl Match 6 of 6 Match 5 of 6 + Bonus Match 5 of 6 Match 4 of 6 + Bonus Match 4 of 6 Match 3 of 6 + Bonus Match 3 of 6

Approximate odds 1:139838160 1:15537573 1:2330636 1:55491 1:22197 1:1083 1:812 1:61

## Probability 0.0000000072 0.0000000644 0.0000004291 0.0000180208 0.0000450521 0.0009235676 0.0012314235 0.0164189803

Probability of not winning anything is 98.14%. Probability of not matching any ball is 37.51% (43.60% not including the bonus number). Table 7.14: Test of equidistribution for subsets of c balls for German Lotto 6/49 using n = 4885 draws spanning June 17th, 1956, and December 29th, 2010
(a) c = 1, ..., 6 (b) c = 1, ..., 7

c 1 2 3 4 5 6

c 1 2 3 4 5 6 7

## p-value 0.752 0.800 0.870 0.658 0.835 0.800 0.645

13 www.lotto.de

34

Table 7.15: Test of equidistribution for subsets of c = 1, ..., 6 balls for German Lotto 6/49 using n = 4921 draws spanning October 9th, 1955, and December 29th, 2010 2 39.54 1143.57 18309.39 212707.71 1906807.95 13984578.33

c 1 2 3 4 5 6

## p-value 0.632 0.603 0.649 0.132 0.513 0.443

The following draw (15, 25, 27, 30, 42, 48) appeared twice during the history of German Lotto. First on Saturday, December 20th, 1986, for the second time on Wednesday, June 21st , 1995.

35

7.8

## Greece and Cyprus

Name: Lotto Run by: OPAP14 Since: 1990 Type of lottery game: 6/49 No. of Bonus numbers: 1 Separate board game: No

## Table 7.16: Probability analysis of winning categories for Greek Lotto

Category 1. 2. 3. 4. 5.

## Probability 0.0000000715 0.0000004291 0.0000180208 0.0009686197 0.0176504039

Probability of not winning anything is 98.14%. Probability of not matching any ball is 37.51% (43.60% not including the bonus number). Table 7.17: Test of equidistribution for subsets of c balls for Greek Lotto 6/49 using n = 104 draws spanning January 3rd, 2010, and December 29th, 2010
(a) c = 1, ..., 6 (b) c = 1, ..., 7

c 1 2 3 4 5 6

c 1 2 3 4 5 6 7

## p-value 0.530 1.000 0.719 0.651 0.820 0.551 0.503

14 www.opap.gr

36

Table 7.18: Test of equidistribution for subsets of c = 1, ..., 6 balls for Greek Lotto 6/49 using n = 1844 draws spanning December 5th, 1990, and December 29th, 2010 2 45.10 1209.57 18787.66 212604.01 1905471.62 13981972.00

c 1 2 3 4 5 6

## p-value 0.381 0.205 0.058 0.164 0.752 0.636

37

7.9

Hungary

Name: tslott Run by: Szerencsejtk Rt15 Since: 1976 Type of lottery game: 5/90 No. of Bonus numbers: 0 Separate board game: No

## Table 7.19: Probability analysis of winning categories for Hungarian tslott

Category 1. 2. 3. 4.

## Probability 0.0000000228 0.0000096702 0.0008123002 0.0224736394

Probability of not winning anything is 97.67%. Probability of not matching any ball is 74.63%. Table 7.20: Test of equidistribution for subsets of c = 1, ..., 5 balls for Hungarian Lotto 5/90 using n = 2808 draws spanning March 7th, 1976, and December 25th, 2010 2 97.51 3951.38 117715.69 2554617.53 43946459.98

c 1 2 3 4 5

## p-value 0.162 0.670 0.317 0.597 0.618

15 www.szerencsejatek.hu

38

Name: Hatoslott Run by: Szerencsejtk Rt16 Since: 1988 Type of lottery game: 6/45 No. of Bonus numbers: 0 Separate board game: No

## Table 7.21: Probability analysis of winning categories for Hungarian Hatoslott

Category 1. 2. 3. 4.

## Probability 0.0000001228 0.0000287291 0.0013646308 0.0224405959

Probability of not winning anything is 97.62%. Probability of not matching any ball is 33.89% (40.06% not including the bonus number). Table 7.22: Test of equidistribution for subsets of c balls for Hungarian Lotto 6/45 using n = 794 draws spanning 1988, and July 22th, 2007
(a) c = 1, ..., 6 (b) c = 1, ..., 7

c 1 2 3 4 5 6

c 1 2 3 4 5 6 7

## p-value 0.603 0.814 0.898 0.892 0.745 0.077 0.533

16 www.szerencsejatek.hu

39

Table 7.23: Test of equidistribution for subsets of c balls for Hungarian Lotto 6/45 using n = 973 draws spanning 1988, and December 26th, 2010 2 33.97 939.15 14138.07 148773.76 1223036.42 8144087.00

c 1 2 3 4 5 6

## p-value 0.713 0.735 0.555 0.625 0.219 0.595

40

7.10

Ireland

Name: Lotto Run by: An Post National Lottery Company17 Since: 1988 Type of lottery game: 6/45 No. of Bonus numbers: 1 Separate board game: No

## Table 7.24: Probability analysis of winning categories for Irish Lotto

1. 2. 3. 4. 5. 6. 7.

Match 6 of 6 Match 5 of 6 + Bonus Match 5 of 6 Match 4 of 6 + Bonus Match 4 of 6 Match 3 of 6 + Bonus Match 3 of 6

## 0.0000001228 0.0000007366 0.0000279924 0.0000699811 0.0012946498 0.0017261997 0.0207143962

Probability of not winning anything is 97.62%. Probability of not matching any ball is 33.89% (40.06% not including the bonus number).

17 www.lotto.ie

41

7.11

Italy

Name: SuperEnalotto Run by: Sisal Sport Italia S.p.A.18 Since: 1997 Type of lottery game: 6/90 No. of Bonus numbers: 1 Separate board game: No

## Table 7.25: Probability analysis of winning categories for Italian SuperEnalotto

Category 1. 2. 3. 4. 5.

## Probability 0.0000000016 0.0000000096 0.0000007999 0.0000839845 0.0030607697

Probability of not winning anything is 99.69%. Probability of not matching any ball is 60.62% (65.29% not including the bonus number). Table 7.26: Test of equidistribution for subsets of c balls for Italian SuperEnalotto 6/90 using n = 902 draws spanning January 3rd, 2005, and December 30th, 2010
(a) c = 1, ..., 6 (b) c = 1, ..., 7

c 1 2 3 4 5 6

c 1 2 3 4 5 6 7

## p-value 0.191 0.992 0.871 0.967 0.915 0.569 0.503

18 www.superenalotto.com 19 1.207274340255491e-007

42

Name: Gioco del Lotto Run by: Lottomatica S.p.A.20 Since: 1939 Type of lottery game: 5/90 No. of Bonus numbers: 0 Separate board game: No

Table 7.27: Probability analysis of winning categories for Italian Gioco del Lotto

## Game type Cinquina Quaterna Terno Ambo Ambata

Numbers Match 5 of 5 with 5 numbers Match 4 of 5 with 4 numbers Match 3 of 5 with 3 numbers Match 2 of 5 with 2 numbers Match 1 of 5 with 1 numbers

## Probability 0.0000000228 0.0000019568 0.0000851209 0.0024968789 0.0555555556

Gioco del Lotto is different from the classic lotto games and offers different games according to the number of numbers bet. Table 7.28: Test of equidistribution for subsets of c = 1, ..., 5 balls for Italian Lotto 5/90 using n = 48422 draws spanning January 7th, 1939, and December 30th, 2010 2 122.55 4225.90 117983.03 2556683.72 43975271.64

c 1 2 3 4 5

## p-value 0.004 0.010 0.161 0.258 0.003

20 www.lottomaticaitalia.it

43

7.12

Latvia

Name: Latloto Run by: Latvijas Loto21 Since: 1997 Type of lottery game: 5/35 No. of Bonus numbers: 0 Separate board game: Papildskaitlis Type of Separate board game: 1/10

Category 1. 2.

## Probability 0.0000003080 0.0000027724

Probability of not winning anything is 99.9997 %. Probability of not matching any ball is 36.58% (43.90% not including the bonus number). Table 7.30: Test of equidistribution for subsets of c = 1, ..., 5 balls for Latvian Latloto 5/35 using n = 1320 draws spanning January 4th, 1997, and December 29th, 2010 2 29.16 555.41 6383.43 52043.20 324787.60

c 1 2 3 4 5

## p-value 0.514 0.762 0.872 0.818 0.423

During the history of Latvian Latlotto these 3 draws appeared twice: (1,2,3,21,26), on August 17th, 2005 and May 20th 2009. (1,21,23,30,34), on August 31st, 2005 and October 27th, 2010. (10,22,23,31,35), on October 18th, 2000 and January 1st, 2002.

21 www.latloto.lv

44

7.13

Malta

Name: Lotto Run by: Maltco Lotteries22 Since: 2004 Type of lottery game: 5/90 No. of Bonus numbers: 0 Separate board game: No

## Game type Quaterno I Quaterno II Quaterno III Terno Ambo Prima

Numbers Match 4 of 5 with 4 numbers Match 3 of 5 with 4 numbers Match 2 of 5 with 4 numbers Match 3 of 5 with 3 numbers Match 2 of 5 with 2 numbers Match 1 of 5 with 1 numbers

## Probability 0.0000019568 0.0003404835 0.0149812734 0.0000851209 0.0024968789 0.0555555556

Maltas lottery offers a bit different scheme of game, where players determine how much numbers they would like to bet: one number in Prima game, two in Ambo game, three in Terno game or four in Quaterno. But for each game numbers must match those ve drawn.

22 www.maltco.com.mt

45

7.14

Poland

Name: Lotto Run by: Totalizator Sportowy23 Since: 1957 Type of lottery game: 6/49 No. of Bonus numbers: 0 Separate board game: No

## Table 7.32: Probability analysis of winning categories for Polish Lotto

Category 1. 2. 3. 4.

## Probability 0.0000000715 0.0000184499 0.0009686197 0.0176504039

Probability of not winning anything is 98.14%. Probability of not matching any ball is 37.51% (43.60% not including the bonus number). Table 7.33: Test of equidistribution for subsets of c = 1, ..., 6 balls for Polish Lotto 6/49 using n = 4946 draws spanning January 27th, 1957, and December 30th, 2010 2 59.00 1267.32 18704.17 212526.58 1907280.17 13978870.00

c 1 2 3 4 5 6

## p-value 0.044 0.043 0.108 0.190 0.422 0.825

23 www.lotto.pl

46

7.15

Portugal

Name: Totoloto Run by: Jogos Santa Casa24 Since: 1985 Type of lottery game: 5/49 No. of Bonus numbers: 0 Separate board game: Sorte Type of Separate board game: 1/13

## Table 7.34: Probability analysis of winning categories for Totoloto

Category 1. 2. 3. 4. 5. 6.

## Probability 0.0000000403 0.0000004841 0.0001153715 0.0049609730 0.0694536217 0.0711899623

Probability of not winning anything is 85.43%. Probability of not matching any ball is 52.57% (56.95% not including the bonus number).

24 www.jogossantacasa.pt

47

7.16

Romania

Name: Loto Run by: Compania Nationala Loteria Romana25 Since: 1993 Type of lottery game: 6/49 No. of Bonus numbers: 0 Separate board game: No

## Table 7.35: Probability analysis of winning categories for Romanian Loto

Category 1. 2. 3. 4.

## Probability 0.0000000715 0.0000184499 0.0009686197 0.0176504039

Probability of not winning anything is 98.14 %. Probability of not matching any ball is 43.60%. Table 7.36: Test of equidistribution for subsets of c = 1, ...6 balls for Romanian Loto 6/49 using n = 960 draws spanning August 8th, 1993, and December 31st, 2010 2 47.30 1140.02 18285.16 211483.36 1907083.01 13982856.00

c 1 2 3 4 5 6

## p-value 0.294 0.627 0.686 0.690 0.460 0.572

25 www.loto.ro

48

7.17

Slovakia

Name: Loto Run by: TIPOS, a.s.26 Since: 1994 Type of lottery game: 6/49 No. of Bonus numbers: 1 Separate board game: No

## Table 7.37: Probability analysis of winning categories for Slovak Loto

Category 1. 2. 3. 4. 5.

## Probability 0.0000000715 0.0000004291 0.0000180208 0.0009686197 0.0176504039

Probability of not winning anything is 98.14%. Probability of not matching any ball is 37.51% (43.60% not including the bonus number). Table 7.38: Test of equidistribution for subsets of c = 1, ..., k balls for Slovak Loto 6/49 using n = 2862 draws spanning September 11th, 1994, and December 29th, 2010
(a) c = 1, ..., 6 (b) c = 1, ..., 7

c 1 2 3 4 5 6

c 1 2 3 4 5 6 7

## p-value 0.709 0.591 0.580 0.587 0.313 0.081 0.586

26 www.tipos.sk

49

7.18

Slovenia

Name: Loto Run by: Loterija Slovenije27 Since: 1993 Type of lottery game: 7/39 No. of Bonus numbers: 1 Separate board game: No

## Table 7.39: Probability analysis of winning categories for Slovenian Loto

Category 1. 2. 3. 4. 5. 6.

## Probability 0.0000000650 0.0000004551 0.0000141084 0.0006772019 0.0112866986 0.0102285706

Probability of not winning anything is 98.80%. Probability of not matching any ball is 17.10% (21.88% not including the bonus number). Table 7.40: Test of equidistribution for subsets of c = 1, ..., k balls for Slovenian Loto 7/39 using n = 1264 draws spanning October 13th, 1991, and December 29th, 2010
(a) c = 1, ..., 7 (b) c = 1, ..., 8

c 1 2 3 4 5 6 7

## p-value 0.414 0.132 0.117 0.188 0.142 0.603 0.590

c 1 2 3 4 5 6 7 8

## p-value 0.336 0.166 0.066 0.017 0.007 0.050 0.202 0.545

27 www.loterija.si

50

7.19

Spain

Name: Lotto 6/49 Run by: Loteria de Catalunya28 Since: 1987 Type of lottery game: 6/49 No. of Bonus numbers: 1 Separate board game: No

Table 7.41: Probability analysis of winning categories for Spanish Lotto 6/49

Category 1. 2. 3. 4. 5.

## Probability 0.0000000715 0.0000004291 0.0000180208 0.0009686197 0.0176504039

Probability of not winning anything is 98.14%. Probability of not matching any ball is 37.51% (43.60% not including the bonus number).

51

7.20

United Kingdom

Name: Lotto29 Run by: Camelot Group Plc Since: 1994 Type of lottery game: 6/49 No. of Bonus numbers: 1 Separate board game: No

## Table 7.42: Probability analysis of winning categories for English Lotto

Category 1. 2. 3. 4. 5.

## Probability 0.0000000715 0.0000004291 0.0000180208 0.0009686197 0.0176504039

Probability of not winning anything is 98.14%. Probability of not matching any ball is 37.51% (43.60% not including the bonus number). Table 7.43: Test of equidistribution for subsets of c = 1, ..., k balls for UKs Lotto 6/49 using n = 1567 draws spanning November 19th, 1994, and December 29th, 2010
(a) c = 1, ..., 6 (b) c = 1, ..., 7

c 1 2 3 4 5 6

c 1 2 3 4 5 6 7

## p-value 0.084 0.223 0.475 0.388 0.475 0.554 0.548

29 www.national-lottery.co.uk

52

7.21

Austria, Belgium, France, Ireland, Luxembourg, Portugal, Spain and the United Kingdom

Name: Euro Millions30 Since: 2004 Type of lottery game: 5/50 No. of Bonus numbers: 0 Separate board game: Lucky Star Type of Separate board game: 2/10

## Category 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12.

Numbers Match 5 of 5 + 2 Lucky Star Match 5 of 5 + 1 Lucky Star Match 5 of 5 Match 4 of 5 + 2 Lucky Star Match 4 of 5 + 1 Lucky Star Match 4 of 5 Match 3 of 5 + 2 Lucky Star Match 3 of 5 + 1 Lucky Star Match 2 of 5 + 2 Lucky Star Match 3 of 5 Match 1 of 5 + 2 Lucky Star Match 2 of 5 + 1 Lucky Star

Approximate odds 1:76275360 1:5448240 1:3632160 1:339002 1:24214 1:16143 1:7705 1:550 1:538 1:367 1:102 1:38

Probability 0.0000000131 0.0000001835 0.0000002753 0.0000029498 0.0000412977 0.0000619466 0.0001297929 0.0018171006 0.0018603649 0.0027256509 0.0097669156 0.0260451081

Probability of not winning anything is 95.75%. Probability of not matching any ball is 35.88% (57.66% not including the bonus numbers).

30 www.euro-millions.com

53

Table 7.45: Test of equidistribution for subsets of c = 1, ..., 5 balls for Euro Millions 5/50 using n = 326 draws spanning February 7th, 1994, and December 31st, 2010 2 42.82 942.20 19334.11 229517.73 2118434.00

c 1 2 3 4 5

## p-value 0.570 1.000 0.876 0.864 0.563

54

Appendix A

Content of the CD
CD contains le with the thesis in folder THESIS, obtained data from the lottery companies in folder DATA. In folder TEST can be found a test of randomness congurated for the Austrian lottery using the Method of Imhof for computing p-values. Directory structure of the CD:

## DATA TEST THESIS

55

Bibliography
 Braverman, M. and Gueron, S. A monte carlo algorithm for a lottery problem. Monte Carlo Methods and Applications, 2001, vol. 7, no. 1-2, pp. 7380.  Fredi, Z., Szkely, G. J., and Zubor, Z. On the lottery problem. Journal of Combinatorial Designs, 1996, vol. 4, no. 1, pp. 510.  Bougard, N. The lotto numbers l(n,3,p,2). Journal of Combinatorial Designs, 2006, vol. 14, no. 5, pp. 333350.  Gerchak, Y. and Gupta, D. How many lottery tickets to buy? Operations Research Letters, 1987, vol. 6, no. 2, pp. 6971.  Russell, K. and Grifths, D. A lotto systems problem. Australian & New Zealand Journal of Statistics, 2005, vol. 47, no. 3, pp. 259267.  Henze, N. Drawings since hit tables in lotteries and a new multivariate geometric distribution. Statistics & Probability Letters, 1998, vol. 40, no. 4, pp. 321327.  Henze, N. and Riedwyl, H. How to Win More: Strategies for Increasing a Lottery Win. 1st edition. A K Peters, 1998. ISBN 978-1568810782.  Barboianu, C. The Mathematics of Lottery: Odds, Combinations, Systems. 2nd edition. Infarom, 2010. ISBN 978-973-1991-11-5.  Baker, R. D. and McHale, I. G. Modelling the probability distribution of prize winnings in the uk national lottery: consequences of conscious selection. Journal of the Royal Statistical Society: Series A (Statistics in Society), 2009, vol. 172, no. 4, pp. 813834.  Haigh, J. The statistics of the national lottery. Journal of the Royal Statistical Society: Series A (Statistics in Society), 1997, vol. 160, no. 2, pp. 187206.  Johnson, R. and Klotz, J. Estimating hot numbers and testing uniformity for the lottery. Journal of the American Statistical Association, 1993, vol. 88, no. 422, pp. 662 668.  Genest, C., Lockhart, R. A., and Stephens, M. A. 2 and the lottery. Journal of the Royal Statistical Society: Series D (The Statistician), 2002, vol. 51, no. 2, pp. 243257. 56

 Woolfson, M. M. Everyday Probability and Statistics. 1st edition. Imperial College Press, 2008. ISBN 1-84816-032-1.  Joe, H. Tests of uniformity for sets of lotto numbers. Statistics & Probability Letters, 1993, vol. 16, no. 3, pp. 181188.  Imhof, J. P. Computing the distribution of quadratic forms in normal variables. Biometrika, 1961, vol. 48, no. 3-4, pp. 419426.

57