Monday, 10 June 2019

Lotto Loser

Figure 1
Figure 1 shows my Australian Gold Lotto results for Saturday night, the 1st June 2019. Once again, a prize of any sort eluded me but I was naturally struck by the fact that across my four games, I had all the winning numbers: 6, 9, 20, 25, 27 and 31 with 9 being chosen twice and each of the other numbers once.

Immediately, I wondered what was the probability of such an occurrence. Specifically, what were my chances of choosing all six winning numbers across four games but not have more than three winning numbers in any one game (prizes are awarded for four or more winning numbers). I'm going to ignore supplementary numbers in this analysis and only consider the red winning numbers.

I've pondered Lotto probabilities before in an earlier post titled Losing at Lotto (17th March 2018) in which I investigated the probability of not getting any numbers (red or blue) in four games. That turned out to be about 0.0066 or 0.66%. I made other posts about Lotto including Lotto Simulations (20th October 2018), The Mersenne Twister (20th January 2019 )and Oz Lotto (31st May 2017).

Anyway, back to problem under consideration. In no game can I have more than three winning numbers or else I'd win a prize. So a constant for each game is that I need to choose 3 losing numbers out of the 39 available. There are 39 x 38 x 37 ways of doing this. What I've done in Figure 2 is to show the range of minimum possible configurations (where there is no repetition of winning numbers across the four games). From those configurations I've worked out the remaining possibilities, given the constraints that there cannot be more than three winning numbers in any game and there cannot be a repeated number in any game.

Figure 2

We'll tackle each in turn:

Configuration 1, top left, multiplying rows: 

6 x 5 x 4 x 39 x 38 x 37
3 x 2 x 1 x 39 x 38 x 37
45 x 44 x 43 x 39 x 38 x 37
45 x 44 x 43 x 39 x 38 x 37   

Configuration 2, top middle, multiplying rows: 

6 x 5 x 43 x 39 x 38 x 37 
4 x 3 x 43 x 39 x 38 x 37
2 x 1 x 43 x 39 x 38 x 37
45 x 44 x 43 x 39 x 38 x 37   

Configuration 3, top right, multiplying rows: 

6 x 5 x 4 x 39 x 38 x 37
3 x 2 x 43 x 39 x 38 x 37
1 x 44 x 43 x 39 x 38 x 37 
45 x 44 x 43 x 39 x 38 x 37 

Configuration 4, bottom left, multiplying rows:

6 x 5 x 43 x 39 x 38 x 37
4 x 3 x 43 x 39 x 38 x 37
2 x 44 x 43 x 39 x 38 x 37
1 x 44 x 43 x 39 x 38 x 37

Configuration 5, bottom middle, multiplying rows:

6 x 5 x 4 x 39 x 38 x 37
3 x 44 x 43 x 39 x 38 x 37
2 x 44 x 43 x 39 x 38 x 37
1 x 44 x 43 x 39 x 38 x 37   

Each product on each line is divided by \(^{45}p_5\) or 45 x 44 x 43 x 42 x 41 x 40 = 5,864,443,200 and all lines are multiplied together within a configuration. The probabilities for all configurations are then added because they are mutually exclusive. The results are shown in Figure 2 (a spreadsheet snapshot).

Figure 3
The chances work out to be slightly less than two in ten million (1.89), whereas the probability of getting all six numbers in one game is slightly more than one in ten million (1.23). To me, this result seems far too low. 

Another approach involves the use of combinations, which I tried initially but dismissed because the probability seemed far too high. However, I'll revisit that approach here and see what I come up with a second time around. The essential points in this approach are:

  • there are four games
  • there are 45C6 ways of choosing the six numbers in each game
  • up to three winning numbers (6C3) can be chosen in each game
  • conversely, there must be three losing numbers (38C3) in each game
  • all six winning numbers must be chosen across the four games

The configurations shown in Figure 3 can be reused but this time with combinations. See Figure 4 below.

Figure 4

Each of the line above needs to be divided by 45C6 to determine the probabilities which turn out to be:
  • 0.00638281628563513 for configuration 1 
  • 0.321868017603801 for configuration 2 
  • 0.0548922200564621 for configuration 3 
  • 0.472073092485574 for configuration 4 
  • 0.161017178832289 for configuration 5
  • 1.01623332526376 overall
Clearly something is terribly wrong as probability cannot exceed 1. Below is the SageMath code I used for the calculation:
C11=binomial(6,3) #6C3 x 39C3 C12=binomial(3,3) #3C3 x 39C3 C13=binomial(45,3) #45C3 x 39C3
C14=binomial(45,3) #45C3 x 39C3
C21=binomial(6,2)*binomial(43,1) #6C2 x 43C1 x 39C3
C22=binomial(4,2)*binomial(43,1) #4C2 x 43C1 x 39C3
C23=binomial(2,1)*binomial(43,1) #2C1 x 43C1 x 39C3 C24=binomial(45,3) #45C3 x 39C3 C31=binomial(6,3) #6C3 x 39C3
C32=binomial(3,2)*binomial(43,1) #3C2 x 43C1 x 39C3
C33=binomial(1,1)*binomial(44,2) #1C1 x 44C2 x 39C3
C34=binomial(45,3) #45C3 x 39C3 C41=binomial(6,2)*binomial(43,1) #6C2 x 43C1 x 39C3
C42=binomial(4,2)*binomial(43,1) #4C2 x 43C1 x 39C3 C43=binomial(2,1)*binomial(44,2) #2C1 x 44C2 x 39C3
C44=binomial(1,1)*binomial(44,2) #1C1 x 44C2 x 39C3
C51=binomial(6,3) #6C3 x 39C3 C52=binomial(3,1)*binomial(44,2) #3C1 x 44C2 x 39C3
C53=binomial(2,1)*binomial(44,2) #2C1 x 44C2 x 39C3 C54=binomial(1,1)*binomial(44,2) #1C1 x 44C2 x 39C3
C1=n(C11*C12*C13*C14*(binomial(39,3)/binomial(45,6))^4)
C2=n(C21*C22*C23*C24*(binomial(39,3)/binomial(45,6))^4)
C3=n(C31*C32*C33*C34*(binomial(39,3)/binomial(45,6))^4)
C4=n(C41*C42*C43*C44*(binomial(39,3)/binomial(45,6))^4)
C5=n(C51*C52*C53*C54)*((binomial(39,3)/binomial(45,6))^4)
print C1, C2, C3, C4, C5
p=C1+C2+C3+C4+C5
print p
I'll need to return to this and try to resolve the problem. My first result is vanishingly small and my second is impossibly high!

No comments:

Post a Comment