ibbly.com

Coin toss by lottery draw

July 2009 (index)

Two teams from opposite ends of the country have been drawn to play each other in a competition. They need to determine which team plays at home and do so fairly at a distance. They decide to try to generate a 50:50 probability from the following week's UK national lottery draw.

The lottery draw consists of drawing 7 balls from 49. Of the balls drawn the first six are "main" balls and the seventh is the "bonus ball".

Bonus ball

The simplest approach, in current use, is to look only at the bonus ball and see if it's odd or even. An odd number of balls means this has a slight bias. The "odd" team have a probability of 51.02% of playing at home.

Notation

In the rest of this article we'll do some calculations based on combinations. We'll write C(n,r) for the number of ways of picking r items from a set of n (where the order doesn't matter). For example C(4,2)=6: if we pick two letters from {a,b,c,d} the possibilities are {ab,ac,ad,bc,bd,cd}. The formula for C(n,r) is given by n!/(r!(n-r)!) where x! is x(x-1)(x-2)*...*1. So C(4,2)=4!/(2!2!)=24/(2*2)=6.

For our lottery the number of ways of picking the six main balls from 49 is C(49,6)=49/(43!6!)=13,983,816.

Lowest ball

The next suggestion made was to see whether the lowest ball of the main six balls was odd or even. The thinking behind this was that the lowest ball has to be one of 1,2,3,...,44 and this is an even number of possibilities. If they're all equally likely then there's a 50:50 chance of the lowest ball being odd or even.

But there's a problem with this.

The probability of 1 being the lowest ball is just the probability that 1 is drawn at all. Nothing else can be lower. So there's a 6/49 chance that 1 is the lowest ball drawn.

At the other extreme, 44 can only be the lowest ball if the six balls are exactly {44,45,46,47,48,49}. This has a very low chance of 1 in 13,983,816. Not the same at all.

We can count the number of ways that any given number N is the lowest. This is the product of the number of ways that three things can happen:
(i) N is drawn: 1 way
(ii) no balls lower than N are drawn: C(N-1,0) ways
(iii) five balls higher than N are drawn: C(49-N,5) ways

Summing this product over all odd numbers gives a probability of 53.23% that the lowest ball is odd. So this more complicated suggestion is less accurate that the original "bonus ball" method.

Total of all seven balls

The next attempt is to look at whether the total of all seven balls is odd or even. The idea is that by combining seven balls the overall probability should be closer to 50% than using just one ball.

The total will be even if and only if there are an even number of odd balls drawn. The number of ways of getting exactly N odd balls is C(25,i)C(24,7-i). Adding this up for N=0,2,4,6 gives a probability of 50.001% of the total of all seven balls being even.

So our intuition that the probabilities "average out" across several balls is correct. A probability of 50.001% is good enough for practical purposes, but it would be nice to find a perfect approach.

Median of all seven balls

This time we'll look at the median rather than the total. For the median of seven balls to be N means exactly three balls above N and three balls below. So the number of ways for N to be the median is C(N-1,3)C(49-N,3). Adding this up across all even N gives a probability of 50.001% of the median being even.

This is exactly the same as the probability for the total of the seven drawn balls being even.

An exact result

We know that there are C(49,6)=13,983,816 ways of drawing 6 balls from 49. This is an even number so there's definitely a way of describing a 50% probability, even if it involves writing down 6,991,908 combinations explicitly. But can we find a more succinct way?

It turns out that such an approach is possible. A bit of trial and error shows that there's exactly a 50% chance that the lowest of the six main balls is one of {2,3,4,5,6,15,16,17,21,36,39,41,43,44}.

Although this gives a probability of exactly 50% it's an unmemorable set of numbers. For practical purposes looking at whether the median of the seven numbers is even gives a good enough answer without having to remember an awkward set of numbers.

Code

Python code is available here.


ibbly.com contact