Share your repls and programming experiences

← Back to all posts
I Played 10 BILLION Lottery Tickets! <Check Out the Results Below>
MarkKohler (4)

Run this MegaMillions Bulk Lottery Simulation and see your $$$, or more likely your LOSSES. Compare your results against the statistical odds:

If playing millions of tickets isn't your thing, check out my more realistic version of the lottery that accumulates each drawing until a winning ticket is drawn. It's better than losing your money on the real thing.
https://repl.it/talk/share/MegaMillions-Lottery-Simulator/42076

Statistics from 10 BILLION lottery plays:

-------------------Here are the results for this lottery batch-------------------

Total tickets played: 10,000,000,000
Total money spent on base tickets: $20,000,000,000
Total money spent on Megaplier option: $10,000,000,000
Total number of jackpots won: 25
Total non-jackpot base prizes won: $2,508,632,308

NOTE>> Statistical average for megaplier drawing is 3X
Total non-jackpot megaplier options:
2X: $2,508,632,308
3X: $5,017,264,616
4X: $7,525,896,924
5X: $10,034,529,232

Total non-jackpot base ticket Return on Investment 'ROI' ($2 per ticket): -87.46%

Total non-jackpot megaplier option ROI (extra $1 per ticket):
2X: -74.91%
3X: -49.83%
4X: -24.74%
5X: 0.35%

Total non-jackpot base ticket plus megaplier option combined ROI ($3 per ticket):
2X: -83.28%
3X: -74.91%
4X: -66.55%
5X: -58.19%

Winning Ticket Summary (xWhite_ball + xGold_ball)
$2 Prize (0w+1g):............................ 272,973,525 (1 in 36.63 odds)
$4 Prize (1w+1g):............................ 111,873,362 (1 in 89.39 odds)
$10 Prize (2w+1g):............................ 14,436,449 (1 in 692.69 odds)
$10 Prize (3w+0g):............................ 16,504,192 (1 in 605.91 odds)
$200 Prize (3w+1g):.............................. 687,912 (1 in 14,536.74 odds)
$500 Prize (4w+0g):.............................. 257,566 (1 in 38,825.0 odds)
$10,000 Prize (4w+1g):............................ 10,942 (1 in 913,909.71 odds)
$1,000,000 Prize (5w+0g):............................ 830 (1 in 12,048,192.77 odds)
MegaMillions Jackpot (5w+1g):......................... 25 (1 in 400,000,000.0 odds)
Overall odds of winning: 1 in 24.0

Processor Time: 35.42 hours

78,415 ticket calculations/second

Let me know in the comments if you enjoyed it!

Commentshotnewtop
pythoder (183)

lol, i have to wait a lifetime to get my results. it says 1.93845874743e+2846 hours

MarkKohler (4)

@pythoder Wow, that's a bit more than a lifetime. That's older than the universe itself. There's a slight possibility that there could be a bug in the code. Check back with me after it's run for a few decades.

pythoder (183)

@MarkKohler heh, i spammed the 0 key(or should i say held) for 20 seconds

MarkKohler (4)

Also, as an FYI, if you want to run really large numbers (like more than 10 Million) you are probably better off doing it on your local machine as opposed to the server.