My state government’s lottery administration, *SA Lotteries*, makes the results from its various games available online, including tables of how frequently the various lottery numbers were drawn.

For example, you can see here how frequently the numbers 1 through 45 have been drawn in the Saturday X Lotto. At the time of writing this, **Number 8** was the most frequently drawn, recorded as occurring a total of 289 times between Draw Number 351 to 3265. Note that the Saturday X Lotto Draws are odd-numbered, so Draw 351 to 3265 actually consists of 1458 (i.e. (3265-351)/2+1) weekly games.

Of course there will be random variation in how frequently balls are drawn over time, just as there’s random variation in heads and tails in the toss of a coin. But is it particularly unusual for the Number 8 Ball being drawn 289 times in 1458 games of Saturday X Lotto?

Is South Australia’s Saturday X Lotto biased towards the number 8?

Now before we can determine if the Number 8 being drawn 289 times in 1458 games of X Lotto is an extraordinary event, it helps if we first work out how many times we *expected* it to happen. In X Lotto, a total of eight balls (6 balls for the main prize and then 2 supplementary balls) are selected without replacement from a spinning barrel of 45 balls. The probability of any single number of interest being selected in eight attempts without replacement from a pool of 45 can be calculated using a Hypergeometric Calculator as P(X=1)=0.17778 (i.e. just under 18%). Therefore we expect the Number 8 (or any other number for that matter) to be drawn 0.17778 x 1458 = 259 times in 1458 games.

So observing 289 occurrences when we were only expecting 259 certainly seems unusual, but is it extraordinary?

To answer this, I’ll employ the Binomial test to evaluate the null hypothesis, H0:

H0: Observed frequency of the Number 8 being drawn in SA Lotteries’ Saturday X Lotto is within the expected limits attributable to chance (i.e. the lotto is a fair draw)

vs. the alternative hypothesis, H1:

H1: Observed frequency is higher than would be expected from chance alone (i.e. the lotto is not a fair draw)

The statistics package, R, can be used to run the Binomial test:

> binom.test(289,1458,0.17778,alternative=”greater”)

> Exact binomial test

> data: 289 and 1458

> number of successes = 289, number of trials = 1458, p-value = 0.02353

> alternative hypothesis: true probability of success is greater than 0.17778

So we can reject the null hypothesis of a fair draw at the alpha=0.05 level of significance. The p-value is small enough to **conclude that the true probability of Number 8 being drawn is higher than expected** based on chance alone.

**However**, please note that I am **definitely not** suggesting that anything untoward is going on at SA Lotteries, or that you’ll improve the odds of winning the lottery by including the number 8 in your selection. For a start, rejection of the null hypothesis of a fair system occurs at the standard, but fairly conservative, alpha=0.05 level. What if I had decided to use alpha=0.01 instead? The null hypothesis of a fair system would be retained. Things are all rather arbitrary in the world of statistics.

Still, a curious result that utilised several statistical concepts that I thought would be interesting to blog about.

——

Filed under: probability, research, statistical concepts, statistics, uncategorized | Tagged: gambling theory, lottery, lottery odds, lottery probability, SA Lotteries, X-Lotto |

## Leave a Reply