I keep things here that I like.

Scott Slusser dot com
Winning the Powerball

The jackpot is sitting at $467 million for Saturday November 8, 2025, which seemed like a good reason to run the script again. Same code as before, smaller number range, new lottery. Previous Experiment and Result

Let’s see what happens. (note: 2M takes about 1 sec. to complete I have capped iterations at that number.)


8
29
31
35
61
18
Time taken: 0.000083 seconds to run 100 iterations.


Regular BallsFrequency
19
26
310
48
56
65
79
813
95
106
1110
126
139
144
157
166
175
185
196
207
2110
227
238
244
256
2610
275
285
2914
306
3111
327
3311
3411
3512
368
378
383
396
409
417
424
437
447
459
4610
476
486
496
506
513
529
5311
547
553
569
577
587
593
604
6113
624
637
646
659
666
676
685
6910
PowerballFrequency
16
26
32
41
53
63
75
84
96
102
113
124
133
140
152
165
174
1810
195
206
216
223
234
241
253
263


Every time you reload this page, the script runs again and produces a new set of numbers.
You can scroll through the results and see which ones rise to the top.
It’s still random, but with enough iterations you can watch the balance take shape.

On Randomness and Computers

Computers aren’t really random. They only pretend to be.
When a program “picks” a number, it’s not reaching into chaos, it’s following an algorithm that uses a starting value called a seed. Change the seed, and you change the outcome. Leave it alone, and the same sequence repeats every time.

What we call “random” in code is actually pseudorandom. It’s good enough for simulations, games, and lottery experiments, but not for encryption or high-stakes systems. The randomness has structure and the structure leaves fingerprints.

Still, there’s something satisfying about watching a machine imitate uncertainty. It never gets bored, never second-guesses, never hopes for luck. It just keeps rolling the digital dice, perfectly indifferent to the result.

How the Odds Are Calculated

Every lottery drawing is just math.
The formula that decides the odds is called a combination, and it counts how many unique sets of numbers can exist.

C(n, k) = n! / (k! × (n − k)!)

That reads as “n choose k,” meaning how many ways you can pick k numbers from n possible numbers.

For Powerball, you choose 5 numbers out of 69, plus 1 Powerball out of 26.
So the number of possible combinations is:

C(69, 5) × 26 = (69! / (5! × (69 − 5)!)) × 26

That comes out to:

11,238,513 × 26 = 292,201,338

So the odds of hitting all six numbers exactly are 1 in 292,201,338
the same as picking the one winning combination out of all those possibilities.

Everything else (like matching 5, or 4 + Powerball) uses the same idea, just with smaller pieces of the puzzle:

(C(5, 4) × C(64, 1) × 1) / (C(69, 5) × 26)

Once you see the math behind it, it’s clear why the simulator starts to flatten out as iterations go up.
The odds are just too wide for randomness to ever look anything but random —
unless you run it millions or billions of times.

Odds, in plain numbers

Powerball jackpot (match 5 + Powerball): 1 in 292,201,338
Mega Millions jackpot (match 5 + Mega Ball): 1 in 302,575,350

Other Powerball tiers

  • 5 without Powerball: ~1 in 11,688,053
  • 4 + Powerball: ~1 in 913,129
  • 4 only: ~1 in 36,525
  • 3 + Powerball: ~1 in 14,494
  • 3 only: ~1 in 579
  • 2 + Powerball: ~1 in 701
  • 1 + Powerball: ~1 in 92
  • 0 + Powerball: ~1 in 38
    Overall chance of any prize: about 1 in 25

What feels “about the same” as the jackpot

  • 28 heads in a row on a fair coin: 1 in 268,435,456
  • Five specific cards in exact order from a shuffled deck: about 1 in 311,875,200
  • Hit by lightning twice in a lifetime (very rough independence assumption): about 1 in 230 million
  • Two independent royal flushes back to back in 5-card deals: 1 in 422 billion (worse than the jackpot)
  • One royal flush in 5-card poker: 1 in 649,740 (much easier than the jackpot)
  • Rolling thirteen 6s in a row: about 1 in 13 billion (much, much harder than the jackpot)