List Shuffle Distribution Test
This regression test checks whether a fixed 10-item list is distributed across the 10 output positions as expected over 100,000 Fisher-Yates shuffles.
What was tested?
- Input: labels A through J.
- Runs: 100,000 independent shuffles.
- Expected count: 10,000 appearances for each item-position pair.
- Algorithm: Fisher-Yates.
- Random integer mapping: 32-bit cryptographic values with rejection sampling.
- Environment: Node.js cryptographic random bytes, run on September 23, 2026.
What did the test find?
The largest absolute difference from the expected 10,000 appearances was 281, or 2.81% of the expected cell count. Every row and column still totals 100,000 observations by construction. The result is consistent with ordinary sampling variation, but it is not a proof or independent certification of randomness.
| Item | P1 | P2 | P3 | P4 | P5 | P6 | P7 | P8 | P9 | P10 |
|---|---|---|---|---|---|---|---|---|---|---|
| A | 9910 | 10097 | 9919 | 9902 | 10168 | 9939 | 9979 | 9935 | 9970 | 10181 |
| B | 9906 | 10281 | 10027 | 9998 | 9849 | 10000 | 9963 | 10091 | 9903 | 9982 |
| C | 9832 | 10024 | 9901 | 10026 | 10017 | 10025 | 10015 | 10009 | 10207 | 9944 |
| D | 10079 | 9944 | 9897 | 9946 | 10040 | 10058 | 10024 | 10021 | 10094 | 9897 |
| E | 9982 | 9817 | 10116 | 10015 | 9907 | 9988 | 10041 | 10087 | 9933 | 10114 |
| F | 10046 | 10003 | 10066 | 9944 | 10033 | 10064 | 9907 | 9924 | 9951 | 10062 |
| G | 10000 | 9954 | 9975 | 9953 | 10134 | 10008 | 10053 | 9884 | 10103 | 9936 |
| H | 10105 | 10019 | 10009 | 10075 | 9990 | 9943 | 10064 | 9973 | 9893 | 9929 |
| I | 10177 | 9882 | 10072 | 10174 | 9885 | 9951 | 9959 | 10118 | 9910 | 9872 |
| J | 9963 | 9979 | 10018 | 9967 | 9977 | 10024 | 9995 | 9958 | 10036 | 10083 |
How can I reproduce it?
The repository command is npm run test:distribution. The test implementation is stored in scripts/randomization-distribution-test.js. A fresh run will produce different counts because it uses fresh random input, but the JSON output retains the same fields for comparison.
What are the limitations?
This run tests a 10-item position distribution and the documented Fisher-Yates/rejection-sampling path. It does not certify operating-system entropy, every browser, every list size, or the completeness of a contest entry list. Regulated drawings and security-sensitive systems require the process specified by their governing rules.