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


7
19
21
26
37
13
Time taken: 0.000085 seconds to run 100 iterations.


Regular BallsFrequency
14
21
39
44
55
67
713
87
98
108
115
126
138
148
1510
167
1710
184
1911
208
2112
225
238
245
254
2611
276
2810
296
3011
316
328
337
346
359
363
3712
387
399
408
4110
4211
435
449
456
466
478
484
496
508
5110
525
535
547
554
569
575
588
598
607
618
624
639
6410
659
666
675
683
699
PowerballFrequency
18
22
31
40
51
63
73
84
98
104
114
123
1310
143
155
163
178
186
192
206
211
222
235
243
253
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)