Dieharder Statistical Test Battery
Robert G. Brown's Dieharder battery — a modern, rigorous extension of Marsaglia's original Diehard tests. Evaluates random number generators across 12 tests spanning spatial, runs, template, frequency, complexity, and distribution dimensions.
Dieharder Test Battery
All 12 Dieharder tests apply a significance level of $\alpha = 0.005$ — stricter than NIST’s 0.01 — with the KS-test over multiple sub-sequences to reduce false positives:
| ID | Test Name | Category | Pass Criteria | Description |
|---|---|---|---|---|
| DH01 | Birthday Spacings | Spatial | $p \ge 0.005$ | Detects clustering in large sparse random distributions (planned). |
| DH02 | Parking Lot | Spatial | $p \ge 0.005$ | 2D random point placement and adjacency collision test (planned). |
| DH03 | Minimum Distance 2D | Spatial | $p \ge 0.005$ | Nearest-neighbor distance distribution in a 2D unit square (planned). |
| DH04 | 3D Spheres | Spatial | $p \ge 0.005$ | Minimum sphere radius enclosing random 3D points (planned). |
| DH05 | Runs Up/Down | Runs | $p \ge 0.005$ | Detects monotonic subsequences in value ordering. |
| DH06 | OPERM5 | Runs | $p \ge 0.005$ | Distribution of ordinal patterns in groups of 5 (planned). |
| DH07 | OQSO | Template | $p \ge 0.005$ | Overlapping-Quadruples-Sparse-Occupancy: 4-letter word occupancy (planned). |
| DH08 | DNA | Template | $p \ge 0.005$ | Overlapping 10-letter DNA word occupancy test (planned). |
| DH09 | Count Ones in Stream | Frequency | $p \ge 0.005$ | Bit frequency across successive byte streams. |
| DH10 | Squeeze | Complexity | $p \ge 0.005$ | Multiplications required to reduce $2^{31}$ to 1 (planned). |
| DH11 | Overlapping Sums | Distribution | $p \ge 0.005$ | Distribution of overlapping 100-element sums via KS-test. |
| DH12 | Craps | Distribution | $p \ge 0.005$ | Win probability and throw count in simulated craps games (planned). |
[!NOTE]
DH05, DH09, DH11 are fully implemented. DH01–DH04, DH06–DH08, DH10, DH12 are specification stubs shown asNOT IMPLEMENTEDin the dashboard.
Significance Level
Dieharder uses $\alpha = 0.005$ and applies the Kolmogorov-Smirnov test over multiple independent sub-sequences to produce a composite p-value — significantly more sensitive to subtle periodic or structural biases than single-pass tests.
When to Use Dieharder
- PRNG Algorithm Validation: Comprehensive vetting of software PRNG algorithms (Mersenne Twister, PCG, Xoroshiro, LCG variants) for game engines, Monte Carlo simulations, and scientific computing where statistical quality matters but cryptographic strength is not required.
- Hardware RNG Burn-in Testing: Long-running stress tests for physical entropy sources during production burn-in — Dieharder’s multi-trial approach catches intermittent bias that single-pass NIST tests may miss.
- FPGA / ASIC Entropy Core Qualification: Evaluating ring-oscillator or chaos-based entropy cores implemented in FPGAs before deployment in embedded security controllers.
- Comparative RNG Benchmarking: Side-by-side comparison of competing PRNG families for simulation workloads requiring high-volume, high-quality pseudo-randomness without cryptographic overhead.