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.)


6
10
30
37
41
24
Time taken: 0.000053 seconds to run 100 iterations.


Regular BallsFrequency
111
24
34
49
57
612
75
89
93
1012
117
124
136
148
155
166
176
182
198
2010
216
224
232
246
258
2610
2710
285
298
3012
316
324
334
346
3510
369
3712
3810
399
406
4112
4211
433
448
454
4611
474
489
499
5010
517
529
534
548
556
568
578
586
597
607
616
6210
634
647
657
6610
679
684
697
PowerballFrequency
15
24
33
45
53
65
74
84
93
105
114
125
133
145
151
164
172
183
195
204
213
223
234
249
252
262


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)