We’ll get back to vaccines and pandemics and all of the related issues… tomorrow.
But tonight… the idea is to try to win $70 million in Lotto Max.
Figuring out lottery odds is pretty simple. Using factorial notation (where 4! = 4 x 3 x 2 x 1), when there are 49 numbers to choose from and you have to hit exactly the right 6 (like Lotto 6/49), the formula is ( 49! / (49-6)! x 6! ) – which is just under 14,000,000 to 1. When you add a 7th number in there, like for Lotto Max, the odds shoot up to over 80,000,000 to 1. So, they go from impossible to… impossible.
That being said, let’s take a crack at it; here’s what I did…
I wrote a little program that does a number of things:
– It reads in all of the historical draws (~4,000)
– It figures out how often every number (1-49) has come up in the last 10, 40, 100 and all-time draws
– It figures out, for each number, what other numbers are likeliest to come up together… based on those historical draws.
– It generates, and then scores, all 86,000,000 possible draws
That last step is a doozy… it generates every single potential draw of 7 numbers… from 1,2,3,4,5,6,7 to 43,44,45,46,47,48,49… and then, based on the history, assigns a “likelihood” score to it.
If anyone is interested in the source code or results of any of this, feel free to ask. For all the geeks out there, I’m especially proud of my function that generates all of those draws… it’s a recursive function that’s only 7 lines long.
Anyway, I think I’ve sunk enough time into this… now I’m going to sink some money into it and, like last time, I’m happy to share $5 million of my jackpot winnings with all of you. If you want a piece of it, just like this post.
Apologies ahead of time if we don’t win and, either way, back to normal tomorrow.
Unless we win. Then… things will be far from normal.
🤞🏻
I’m curious how long it took the program to run. Back in the day (not too long ago), that would have been an overnight deal.
Be thankful that the order the balls drop doesn’t matter!
Is there a link to the odds of the Leafs winning the cup?
💫
Horatio Kemeny are you getting any accurate US numbers? Your sheet is 23K daily? Worldometers is different. Much lower?
Post the code on Github?
Should go for the big bucks & play Mega Millions & Powerball in the US 😉
Stunning numbers….too complex for me!
So brilliant, as always. I haven’t worked much in so long I would just like to borrow $5,000!! lol
Waiting for my share! Best of luck!
Super like.
I probably won’t understand a thing but very interested to see the code. Have you done something like this for horse racing odds?
Figuring out lottery odds is pretty simple 🤔😏 keeping my fingers crossed for you 🤞🤞
Super like!!
Hope you win…time to Party!! Or I might win…also time to Party!
“…things will be from normal” indeed
I am in!🎉🍾🇨🇦
Great way to convince kids (and adults!) to learn to code. Good luck!
Zero deaths in BC! First time in months.
You know the expression, no ticky … no washy, well in your honor Horatio I bought a ticket. The Loto Max is $5.00 , thought it was $3.00. Oh well.
I liked your column.
You will share 5 million of your winnings. If my numbers match yours and we are the only two winners then I will match your 5 million !.(figure those odds out !) If not Ok I ‘ll throw 1 million dollars to those who like both of our posts.