
We Tested Our Random Name Picker and Fixed 4 Problems
I read the code of the Spin Numbers Random Name Picker and tested it on the live page. One winner per spin was fair; multi-name draws, team splits and the Spin button were not. Here is what I fixed and the numbers after the fix.
By Said · November 2026 · 6-minute read
Teachers use the Spin Numbers Random Name Picker to call on students, and hosts use it to pick winners. Before writing about how fair it is, I read its code line by line and then tested it on the live page. One part, the single-winner draw, showed no measurable bias. Two parts were not fair because of how they were coded, the page text did not match the code, and one button did not work as it should. This article lists what I found, what I changed on 27 November 2026, and the numbers measured after the fix.
The short version
- The single-winner selection showed no statistically significant bias in our 762-spin test. After the update, 762 spins on the live page with 25 names gave each name between 18 and 41 wins (30.5 expected), with a chi-square of 30.78, below the 36.42 critical value at the 5% level. The code review found no problem in how the old version chose a single winner either.
- Several winners per spin were not independent. The old code took the name under the pointer and then its neighbours on the wheel. Names next to each other in your list came out together every time. The updated version draws all requested winners at the moment you click, by shuffling the whole list and taking the first names, so no name can appear twice in the same draw.
- Teams were uneven. With 10 names in 2 teams, the old shuffle put the last name in Team A only 33.6% of the time instead of 50%. After the fix, every name lands in Team A between 49.4% and 50.9% of the time.
- The Spin button stayed greyed out after the first spin. You could only spin again from the result window. It now works after every spin.
What I found in the code
- Multiple winners were neighbours. With “To draw” set to 3, the tool read the slice under the pointer, then added the next two slices on the wheel. If your list was Anna, Ben, Chloe, Dan, a 3-name draw could give Anna, Ben and Chloe, but never Anna, Chloe and Dan together. That is not a fair draw of 3 names.
- The team split used a biased shuffle. It sorted the list with a random comparison, a shortcut that does not give every order the same chance. I ran that exact line 100,000 times in Chrome: with 10 names in 2 teams, the first name went to Team A 56.0% of the time and the last name only 33.6%. The first two names ended up together 33.4% of the time, when a fair split gives 44.4%.
- The page text did not match the code. It said the result was calculated the moment you clicked, but the winner was simply wherever the animation stopped. It also said picked names were removed automatically, when this is an option that is off by default.
- The Spin button was not re-enabled after a spin, so a second spin needed the “Spin again” button in the result window.
What I changed
- Winners are now drawn when you click Spin, with the browser’s cryptographic random generator, crypto.getRandomValues. If you ask for 3 names, the tool shuffles the whole list with a Fisher-Yates shuffle and takes the first 3. This is a draw without replacement: each order of the list has the same probability, provided the random numbers are uniform, which is what the browser generator is designed to supply.
- The wheel animation is then steered so that it stops on the first winner. The animation shows the result; it no longer decides it.
- Teams use the same fair shuffle before names are dealt into teams.
- The Spin button is enabled again after every spin.
- The page text now describes what the tool really does, including the Remove winners after draw option.
How I tested it
- I opened the public Name Picker page in Chrome on Windows after the update (script version 4.5) and pasted 25 names, P01 to P25.
- To avoid waiting about 4 seconds per spin, I made the browser run animation frames back to back, at the same 60-frames-per-second rhythm as a normal screen. The code that picks the winner was not changed.
- I recorded the winner shown in the draw history after each spin, then ran the same kind of check for 3-name draws and for team splits.
- For the before figures, I ran the old code lines on their own in the same browser, because the old version is no longer on the site.
Results after the fix
| Test | Result | What a fair tool gives |
|---|---|---|
| One winner, 25 names, 762 spins | Each name won 18 to 41 times | 30.5 on average |
| Chi-square (24 degrees of freedom) | 30.78 | Below 36.42 in 95% of fair tests |
| Three winners, 25 names, 2,000 draws | 0 repeated names | 0 |
| Three winners next to each other on the wheel | 22 of 2,000 (1.1%) | About 1.09% by chance (100% before the fix) |
| 10 names in 2 teams, 10,000 splits | Every split was 5 and 5 | 5 and 5 |
| Share of splits where each name was in Team A | 49.4% to 50.9% | 50% (33.6% to 56.1% before) |
| P01 and P02 in the same team | 44.7% | 44.4% (33.4% before) |
| Remove winners after draw, 3 names drawn from 25 | 22 names left on the wheel | 22 |
The 36.42 limit is the 5% critical value for 24 degrees of freedom in the NIST/SEMATECH table of chi-square critical values. A value below it means the counts are consistent with equal chances; it does not prove perfection. The method itself is explained in the NIST chi-square goodness-of-fit page.
Limits of this test
- 762 single spins is a modest sample. It can reveal a large bias, not a very small one. The 2,000 three-name draws and the 10,000 team splits are larger checks of the new shuffle.
- I tested one browser (Chrome on Windows) and one list size for each test.
- The animation ran faster than normal during the test. On a normal screen the wheel takes about 4 seconds, but the winner is chosen before the wheel starts, so speed does not affect the result.
- For a prize draw where people must be able to check the result later, keep the draw history or download it as a CSV file, and consider the Pick a Winner tool.
What changed, and what it means for you
- What changed (version 4.5, 27 November 2026): the winners are now selected when you click Spin, using a draw without replacement from the whole list. The wheel animation then stops on the first winner. Team splits use the same shuffle, the Spin button works after every spin, and the page text describes these steps.
- If you used the tool before 27 November 2026: a single-winner spin used the position where the wheel stopped, and our tests found no sign of bias in that part. Draws of two or more names, however, always returned names that sat next to each other on the wheel, and the team option favoured some positions in the list. If an earlier multi-name draw or team split mattered, for example for a prize or a graded group project, consider running it again with the current version.
- To avoid picking the same student or participant twice: within one draw, a name can never come out twice. Between spins, names stay on the wheel unless you turn on Remove winners after draw, which is off by default. The list and history are cleared when you reload the page, so copy the history or download the CSV file if you need a record.
- For random teams: use the Make Random Teams tool. It shuffles names with a Fisher-Yates shuffle and deals them so that team sizes differ by one name at most. The team option inside the Name Picker now uses the same kind of shuffle and is fine for quick splits of the names already on the wheel.




