NamesOnWheel

Reference page · Last updated 2026-05-25

Fairness proof: 100,000 live spins, chi-square tested, in your own browser

Yes — the wheel is uniformly fair. Tap the button below and your browser will run 100,000 spins through the exact same picker math as a real spin, then render a chi-square chart you can verify yourself. We use crypto.getRandomValues() with rejection sampling (no modulo bias). The expected p-value sits comfortably between 0.05 and 0.95 every run; if it doesn't, your browser has bigger problems than this wheel.

Spins completed
Chi-square (χ²)
P-value

Each bar is the count of spins that landed on that segment. Red dashed line = expected count for a uniform distribution.

How the test works

Each spin in this test calls our production randomWeightedIndex(weights) function — the very same code that runs when you spin the wheel on the home page. We feed it the same weight array, then bucket every result into a histogram. Once 100,000 results are in (about 100 ms on a modern laptop) we compute the chi-square statistic Σ((observed − expected)² / expected) and convert it to a two-sided p-value.

What a passing result means

Why we use a CSPRNG, not Math.random()

Math.random() is a pseudo-random number generator (PRNG). The browser seeds it once when the page loads, and from that point on the entire sequence is deterministic. In short runs, it can also produce subtle bias depending on the implementation. Cryptographically-secure RNGs draw on hardware entropy (mouse movements, keyboard timings, OS-level entropy pool) and are designed to resist prediction. We use crypto.getRandomValues() exclusively, with rejection sampling for the integer step so there's no modulo bias.

Frequently asked questions

Why does randomness fairness matter for a name wheel?
When you pick a student, a raffle winner, or a giveaway recipient, you're making a small commitment to fairness. A wheel that uses Math.random() (a non-cryptographic PRNG seeded once at page load) can produce predictable sequences and uneven short-run distributions. CSPRNG-driven wheels do not have this weakness — and now you can verify the difference yourself.
What is a chi-square test, in one paragraph?
Imagine you spin a 10-segment wheel 100,000 times. If it's perfectly uniform, you'd expect ~10,000 hits per segment. The chi-square statistic measures how far the actual counts diverge from that ideal. A statistic that's 'too small' or 'too large' for the expected distribution suggests something is off. We compare the resulting p-value against the standard 0.05 threshold — anything between 0.05 and 0.95 is considered uniform.
How is this test 'live' and 'in my browser'?
Tap the run button and your browser performs every single spin (well, the picker math equivalent of every spin) using the same crypto.getRandomValues + rejection-sampling code that powers actual wheel spins. The chart renders directly from those counts. There's no server, no cached chart, no fake data — refresh and re-run as often as you want.
Does this prove every wheel is fair forever?
It proves that the random selection algorithm is uniform on uniform input, which is the part NamesOnWheel controls. Hardware-level CSPRNG quality is provided by your browser/OS. We trust them because cryptographic systems (banking, TLS, password generation) trust them, and decades of research have hardened them. If your browser's CSPRNG is broken, you have far bigger problems than a wheel spin.
Can I increase the number of spins?
Yes — the input lets you pick from 10,000 up to 1,000,000. More spins gives a tighter distribution but takes longer. 100,000 is a great default that runs in well under a second on a modern phone.
What about weighted entries?
The fairness page tests uniform entries by default (every segment equal probability). Toggle 'Use weights' to give every other entry a 2x weight — you should see segments with weight 2 receive twice as many hits as weight 1 segments, and the 2-way chi-square reflects that.

Related tools