Randomness Testing Guide
Posted2 months agoActiveabout 2 months ago
random.tastemaker.designSciencestory
calmpositive
Debate
20/100
RandomnessStatisticsTesting
Key topics
Randomness
Statistics
Testing
A guide to testing randomness has been shared, providing insights into evaluating the quality of random number generators.
Snapshot generated from the HN discussion
Discussion Activity
Moderate engagementFirst comment
9d
Peak period
9
Day 10
Avg / period
5
Key moments
- 01Story posted
Nov 4, 2025 at 1:43 AM EST
2 months ago
Step 01 - 02First comment
Nov 13, 2025 at 7:17 AM EST
9d after posting
Step 02 - 03Peak activity
9 comments in Day 10
Hottest window of the conversation
Step 03 - 04Latest activity
Nov 14, 2025 at 8:59 AM EST
about 2 months ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
ID: 45808047Type: storyLast synced: 11/20/2025, 12:38:35 PM
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
Strange.
(0110100001100101011011000110110001101111001000000111011101101111011100100110110001100100)
Robert Brown has a page with a bunch of info about dieharder and statistical testing of random generators in general [2]
[1] https://en.wikipedia.org/wiki/Diehard_tests
[2] https://webhome.phy.duke.edu/~rgb/General/dieharder.php
So I wrote a little "additional entropy daemon" that would read things like CPU temperature fluctuations, signal noise on soundcards if installed etc (I forget them all exactly but there were a few), "bleach them" so they had reasonable statistical properties (eg the soundcard one before bleaching was almost all zeros with just occasional spikes in it so you want that to be normalized a bit) mix them together somewhat chaotically and then feed them into the sponge function with a relatively low entropy estimate. This meant our servers wouldn't block. I used diehard to test the randomness of the sources I was using before and after the mixing.
The bug got fixed and people generally got comfortable using /dev/urandom rather than /dev/random, so my little process moved on to live on a farm with other daemon processes that were retired from use. I don't even have the source code any more.
For example
> Let's say we have the following binary string. s=00000000000000000000 It is obviously not random since there are no ones in the string. Therefore, we must check that there are roughly an equal number of zeros and ones in the string.
This is how Fisher critiqued Mendel's experiments -- they were too perfect!