Lottery Simulator (2023)
perthirtysix.com
perthirtysix.com
Would love to hear any feedback. I've been super interested in how well-designed web apps and visualizations can communicate things like probability, which I think is very hard to intuit for many of us.
The most surprising thing I learned from the tool was just how bad your payouts usually were even if you cut the pool of numbers to pick from in half (by using the "Custom" option).
It won't make an impact on the odds of your tickets coming up as winners, unless they have a bug in their simulation. In the real world the probability of single versus multiple jackpot winners might vary with number choices, but they've already said they're assuming a single jackpot winner.
Also, at one point I messed up which pattern on Mega Millions tickets were winners. Something about that big X in a separate column just subconsciously seemed like it was showing winners. Perhaps dashes vs checks or groupings winning and non winning tickets together.
One suggestion I would make is allowing the random numbers selected by the user to be random for each draw. I understand in the scheme of things that it doesn't make difference to your odds but that's a strategy that some people play.
It would also be cool to track how many other people chose the same numbers that you did and then divide the jackpot winnings by that amount of people.
Another thing (I'm really just giving you a todo list of things that I had) was to organise the number selectors to mirror the pattern on the lottery tickets. People have very different approaches, picking columns, going over 31, sequences and you could track the user behaviour behind number selection.
Overall I would consider lotto small next to the scratch cards (our countries version at least). I have never seen a more predatory marketing strategy, and completely swept under the rug next to lotto being berated with anti-gambling campaigning. To be fair, lotto is bad, but scratch cards are much, much worse.
A memory that stuck for me was a customer blowing well over $100 bucks on scratchcards over 20 minutes, just pulling over and over, then getting card declined at the grocery checkouts.
Not really?
The odds of winning are the same regardless, because you need to match every number to get a jackpot. Really, there is just an increased chance of splitting a jackpot with another person when the prize gets really large, since more tickets are generally sold. But I imagine EV of a lottery ticket with a $1B jackpot is still higher than the same lottery ticket when the jackpot is $100M.
There are also bad number choices and good number choices. 1,2,3,4,5,6 is a terrible selection, for example. Not because it is somehow “less random”, but because you’re guaranteed to be splitting that jackpot with a 1,000 other nerds who were trying to prove a point!
To a lesser degree, choosing numbers under 31, or under 12, will put you in a collision space with other players who like to choose birthdays.
Just use the random pick and don’t think about it. If you do win the jackpot, you have higher odds of being the only one.
Uh... so at first I saw your point, but if your odds of winning never actually change, how is not winning better than splitting a jackpot?
But if you play the lottery week after week, year after year—and you always play the same numbers—then you’re ensuring a mediocre prize should you actually get the jackpot.
Playing the lottery is not a mathematically sound decision in any case, but there’s no reason to make it even worse by chopping your potential jackpot winnings down by over 99%
The BC 6/49 lottery (6 balls 1-49, one bonus ball) for example has 53% of the common "prize pool" split amongst all 4-ball matchers, so if you're not hitting the jackpot you get less cash out of a high-demand drawing.
And given the prize pool is something like 18% of net receipts... yeah EV is still well in the negatives.
> Not really?
A big jackpot draws more players, and that reduces the payouts at the intermediate levels.
Which has nothing to do with your chance of winning.
A run on the simulation (n=1000000) comes back with -92% EV. It looks like -10% [1] is a rough estimate for slot machine EV, which I would ballpark into the same game genre (-EV, no skill entertainment) as the lottery.
What accounts for this payout discrepancy in what I would consider similar games? On that train of thought, what prevents a new lottery from coming in and offering a _generous_ -50% lottery, offering ~5x as much money as before?
federal-level gambling syndicate isn't something that a private party can easily jump into.
so the answer is : a mix of 'grandfather'd-in' and protectionism, if we're talking U.S. here.
Assuming you used the first lottery example (Mega Millions), the EV is easy to calculate directly and is -$0.66/ticket, ie -33%
The jackpot is a whole $1 of that EV! Without it, the EV is -$1.75/ticket, ie -87%, which is closer to what you got in the simulation.
In short, the simulator doesn’t buy enough ticket-draws to approach the Law of Large Numbers.
But that’s also a feature of the lottery — most people overestimate their ability to win or underestimate how many lifetimes of consistent play is required to statistically win a jackpot.
one time i get like 20 weeks in a row up front (a post-dated ticket) and i won $56 dollars or something one week. i did the odds of that happened and it was something that would happen like once every 30 years if i played weekly. i stopped after that, haha.
Mega lotteries draw once every 2-8 days. Slot machines / video poker / etc are happy to draw as fast as you can push the button. They are designed to take your money, but their rewards systems are completely different.
Also, the mega lotteries benefit from viral marketing, “earned media”, and water cooler talk. Slot machines are just a way for bored people to pass the time, much like video games or doomscrolling.
Going from 1 to n tickets, isn’t necessarily wise
Going by the calculator, EMV of going from buying 0 tickets to 1 is -$1.85 for Mega Millions, same as going from n to n+1; n >= 0. The first ticket is the first one you lose with, statistically.
I haven't gotten into the discrete math in many years. If you're right do you mind explaining please? I can intuit what you're getting at. 0 odds * inf < (odds with one ticket). Is that a decent description?
odd(0) = 0
odd(1) = X, so odd(1) / odd(0) = +Inf increase in odds of winning vs 0
odd(2) = 2X, so odd(2) / odd(1) = 2x increase in odds of winning vs 1
Based on this kind of thinking, my personal rules are: never spend more than 0.1% of take-home pay per time-period buying tickets, and only buy big-prize lotto tickets that have potentially-life-changing payouts.
These massively asymmetric choices occur elsewhere in life, e.g. "asking them out on a date"; "asking for a raise", and are good to look out for.
This kind of thinking never holds up when it's a small chance of a horrible outcome.
How many lottery winners?
I'm not sure about that. There is some chance of someone random buying a ticket and gifting it to you and then that ticket winning. Not a big chance. But it is not 0.
If you send me $20k of bitcoin and a UUID, I will run 'crypto.randomUUID()', and if I get the same UUID as you I'll send back $40k.
If you don't send me any money, you have 0% chance of winning, but if you do send me $20k, you have a mere 1 in 2^122 chance of winning, an infinite increase in your chance of winning, so surely it is rational to do so.
If you truly believe what you just wrote, I'll await my $20k.
But does that mean you only buy 1 lottery ever in life or one each lottery?
On one of my runs, I won $1 million which put my numbers in the green for a while before slowly going into the red again.
That's going to legitimately brighten the rest of my day.
I won the $340,000,000 Powerball Grand Prize after buying 11,651,310 $2 tickets leaving me with a grand total of $319,781,766 in earnings ($27.45 per ticket).
https://www.theatlantic.com/business/archive/2016/02/how-mit...
There's a movie out starring Walter White, of the Selbees side, called Jerry and Marge Go Large, but which talks about the story, but portrays the MIT kids poorly for dramatic effect.
I think I once guessed 2 of them . This way I get all the thrill of the game with none of the cost.
It would've been nice to not assume only one lottery winner. People tend to pick numbers that are meaningful for them: birthdays, favorite numbers, lucky numbers. Thus it actually significantly increases your EV if you pick unusual numbers, which is not reflected here.
For 1-70: Consider numbers above 31 (days of month)
For 1-25: Similarly, numbers above 12 might be less common (months of year)
What other numbers above 31 would you want to avoid? 33, 44, 50, 69, 70? And you might want to avoid sequences as well.
If you're buying all the tickets, well, the math is real easy. (and occasionally profitable, see 1992 in Virginia)
This is where you entangle your mortal soul to the lottery outcome and are only allowed to survive if you win.
This is a cheat code for the parallel universe crowd.
Them: "there's no way you could afford to pay me!"
Me: "I won't have to."
Average: $18.68 per ticket