Is a seeded die actually fair?
“If I roll a virtual die 10,000 times, does every face really come up one time in six?”
The warm-up round. Ten thousand seeded rolls, four small tables, one chi-square test — and a check that every chart on this site renders real numbers.
Rolls simulated
10K
seed 2026
Chi-square
1.03
5 degrees of freedom
p-value
0.96
no evidence of bias
Longest streak
6×
same face in a row
Every face landed within ±1.8% of the expected 1,667 rolls — the biggest miss was Face 6, up by 29.
A chi-square goodness-of-fit test gives χ² = 1.03 (5 degrees of freedom, p ≈ 0.96). Nothing to see: the die is fair.
The running mean swings wildly for the first few dozen rolls, then settles onto 3.5 — the law of large numbers, drawn as a line.
The longest streak of one face repeating was 6 in a row, and it happened exactly once.
Rolls per face
Six bars, all within a whisker of the 1,667 a fair die expects.
source · face_counts.csv · 6 rows
Low, mid or high?
Splitting the faces into thirds: each takes almost exactly a third of the rolls.
source · buckets.csv · 3 rows
The running mean settles on 3.5
Average of all rolls so far. Log scale on x, so the chaotic first hundred rolls get room.
source · running_mean.csv · 299 rows
Every table behind the figures above. Sort a column, filter rows, and download exactly the view you're looking at — or grab the originals from GitHub.
| # | ||||
|---|---|---|---|---|
| 1 | Face 1 | 1661 | 1666.7 | -0.34 |
| 2 | Face 2 | 1659 | 1666.7 | -0.46 |
| 3 | Face 3 | 1677 | 1666.7 | 0.62 |
| 4 | Face 4 | 1666 | 1666.7 | -0.04 |
| 5 | Face 5 | 1641 | 1666.7 | -1.54 |
| 6 | Face 6 | 1696 | 1666.7 | 1.76 |
Rolls come from NumPy's default_rng(2026).integers(1, 7) — a PCG64 generator with a fixed seed, so anyone re-running scripts/week-00-warmup.py gets the identical 10,000 values.
Each chart reads its own tidy CSV: face_counts (count vs. expected per face), running_mean (sampled at 300 checkpoints so the file stays small), buckets (low / mid / high thirds) and streaks (how often a face repeated n times in a row).
Fairness is judged with a chi-square goodness-of-fit test against a uniform distribution. A small χ² and a large p-value mean the observed counts are entirely consistent with a fair die.