# Geiger TRNG randomness analysis

**Generated:** 2026-06-27T03:02:21Z (duration 13.24 s)
**Git SHA:** 2bc218f68e1503cfd6bfb4f7e8358c98537fb2b9  ·  **Analysis version:** 1.0.0  ·  **Python:** 3.13.5

## Parameters

| Knob | Value |
|---|---|
| bits window | 65536 bytes (524,288 bits) |
| events window | 60.0 min |
| metrics window | 24.0 h |
| pile-up cutoff | 5000 µs |
| ACF max lag | 32 |

## Inputs

| Source | Loaded |
|---|---|
| `bits_stream.bin` (last N) | 65536 bytes |
| `events.csv` deltas | 35854 |
| `metrics.tsv` rows | 264 |
| `health.csv` rows | 5574 |
| `battery_history.tsv` rows | 97 |

---

## A · Source physics — inter-arrival distribution



The Geiger source is a Poisson process: the probability of an event in any
infinitesimal interval is constant. Inter-arrival times of a Poisson process
are exponentially distributed.

**Observed:**

| Statistic | Value |
|---|---|
| n deltas | 35,854 |
| mean Δt | 100406.6 µs |
| median Δt | 69546.7 µs |
| min Δt | 193.8 µs |
| max Δt | 1242844 µs |
| estimated rate | 9.96 Hz (598 CPM) |

**Goodness-of-fit (Kolmogorov-Smirnov vs exponential):**
KS statistic = 0.0035,
p-value = 0.7788 →
**consistent_with_poisson**

**Pile-up cluster** (Δt < 5000 µs, the GM tube + NE555 recovery floor):
1712 of 35,854
(4.77%).


![Inter-arrival log-log histogram](plots/interarrival_loglog.png)

*([interactive HTML](plots/interarrival_loglog.html))*



The pile-up cluster shows up as the spike below the cutoff line: events that
arrived faster than the recovery dynamics. These come from genuine random
arrivals binned by the dead-time floor:

![Pile-up cluster histogram](plots/pileup_cluster.png)

*([interactive HTML](plots/pileup_cluster.html))*




---

## B · Bit-level statistics



The Δt₁ vs Δt₂ disjoint-pair extractor emits 1 if Δt₁ > Δt₂, 0 otherwise.
With independent samples and constant dead time, the symmetry argument gives
unbiased output. With non-constant dead time (which we have — see Section A)
we filter by `--reject-us`.

| Statistic | Value | Target |
|---|---|---|
| n bits | 524,288 | – |
| ones | 261,699 (49.915%) | 50% |
| bias | -0.00085 | 0 |
| bias 1σ (sampling) | ±0.00069 | – |
| Shannon entropy | 7.9969 bits/byte | 8.0 |
| χ² statistic | 283.05 | ~255 (df) |
| χ² percentile | 10.96% | 5–95% |

**Autocorrelation** at lag 1..32 —
maximum |ρ| = 0.0037 at lag 9.


![Bit-stream autocorrelation](plots/bit_acf.png)

*([interactive HTML](plots/bit_acf.html))*



**Byte distribution** (0..255):

![Byte-value histogram](plots/byte_histogram.png)

*([interactive HTML](plots/byte_histogram.html))*



**Frequency-domain check.** A truly uniform bit stream has a flat power
spectrum (white noise). Any structural bias shows up as a peak.
Spectral flatness = 0.5595 (1.0 = perfectly flat):

![FFT power spectrum](plots/fft_power.png)

*([interactive HTML](plots/fft_power.html))*




---

## C · Drift over time (L2 rolling stats)



264 samples over the trailing 24.0 h
(2026-06-26T03:05:40Z → 2026-06-27T03:01:09Z).

| Metric | mean | std | first | last | min | max |
|---|---|---|---|---|---|---|
| bias | -0.0007 | 0.0060 | -0.0020 | -0.0038 | -0.0154 | 0.0140 |
| ent_bpb | 7.8089 | 0.0161 | 7.8279 | 7.8110 | 7.7622 | 7.8480 |
| chi_pct | 49.0779 | 27.9599 | 74.1500 | 56.7800 | 0.2400 | 98.7600 |
| lag1_bits | 0.0011 | 0.0108 | -0.0023 | 0.0037 | -0.0292 | 0.0376 |
| mean_dt_ms | 100.8370 | 3.3652 | 108.8600 | 102.0700 | 93.5400 | 112.0400 |
| lag1_dt | -0.0039 | 0.0326 | -0.0046 | -0.0037 | -0.1076 | 0.0978 |
| pileup_pct | 4.7398 | 0.7128 | 2.9300 | 5.8600 | 2.6400 | 7.1300 |



![Bias timeline](plots/bias_timeline.png)


![Entropy timeline](plots/entropy_timeline.png)


![χ² percentile timeline](plots/chi_timeline.png)


![Pile-up % timeline](plots/pileup_timeline.png)




---

## D · Health-test history (L1)



5574 rows in `health.csv`.


**Adaptive Proportion Test** — counts of bits matching the first bit of each
W=512 window. NIST cutoff: 310.

| | Observed | Theoretical |
|---|---|---|
| n verdicts | 5572 | – |
| n pass | 5572 | – |
| n fail | 0 | – |
| count mean | 256.54 | 256.00 |
| count std | 11.08 | 11.31 |


![APT count distribution vs Bin(W, 0.5)](plots/apt_distribution.png)



**RCT failures logged:** 1



---

## E · Battery history (L3)



97 runs from 2026-05-07T22:45:52Z to 2026-06-27T02:00:15Z.
**41 pass / 56 fail.** Current pass-streak: **6**.

| Metric | Value |
|---|---|
| ent mean | 7.9971 bits/byte |
| ent range | 7.9943 – 7.9977 |
| Rabbit pass-rate | 70.10% |
| Alphabit pass-rate | 92.78% |


![Daily battery history](plots/battery_history.png)


**Recent runs:**

| ts | ent | chi% | rabbit | alphabit | failures |
|---|---|---|---|---|---|
| 2026-06-24T03:14:18Z | 7.9971 | 30.96 | 1 | 1 | 0 |
| 2026-06-24T03:17:13Z | 7.9970 | 28.10 | 1 | 1 | 0 |
| 2026-06-25T02:03:47Z | 7.9973 | 69.73 | 1 | 1 | 0 |
| 2026-06-26T02:00:46Z | 7.9975 | 89.02 | 1 | 1 | 0 |
| 2026-06-27T02:00:15Z | 7.9968 | 5.71 | 1 | 1 | 0 |




---

## F · NIST SP 800-22 STS subset



A subset of the NIST SP 800-22 Statistical Test Suite, computed
directly from the loaded bit window (524,288
bits). The decision rule is **pass if p ≥ α**, with α = 0.01
(the canonical NIST threshold).

**Summary:** 4 pass / 0 fail.
**Overall: PASS.**

| Test | p-value | Verdict | Detail |
|---|---|---|---|
| Frequency (monobit) | 0.2190 | pass | S_n = -890 |
| Block Frequency | 0.8312 | pass | M=128, N=4096, χ²=4009.16 |
| Runs | 0.3588 | pass | V_n = 261811 (expected 262143) |
| Longest Run of 1s | 0.3108 | pass | M=128, N=49, χ²=5.95 |


![NIST STS subset p-values](plots/nist_pvalues.png)

*([interactive HTML](plots/nist_pvalues.html))*


The four tests cover progressively finer structure:
- **Frequency** — global 0/1 balance.
- **Block Frequency** — per-block balance (catches local drift).
- **Runs** — bit-flip frequency vs the random expectation.
- **Longest Run of 1s** — local clustering, sensitive to dead-time
  artefacts the others miss.

With our default 64 KB load (≈ 524 K bits), Longest Run runs in the
NIST M=128 / N=49 regime. To activate the larger M=10,000 / N=75
regime, run an ad-hoc analysis with `--bits-window-bytes 131072`
(≥ 1 M bits) once `bits_stream.bin` is big enough.



---

## G · SP 800-90B non-IID min-entropy



NIST SP 800-90B §6 prescribes ten non-IID estimators of min-entropy. We
shell out to NIST's reference `ea_non_iid` over the trailing
1,000,000 unpacked bits of `bits_stream.bin`. The final H_min is the
minimum across all ten — the conservative floor that any cryptographic
claim must respect.

5 runs from 2026-06-22T05:57:08Z to 2026-06-24T03:14:33Z.
**Latest H_min: 0.8456 bits/bit**
(floor set by **compression**;
1,000,000 samples
).

| Estimator | Latest | Spec §6.3 |
|---|---|---|
| Most Common Value | 0.9952 | 6.3.1 |
| Collision | 0.9293 | 6.3.2 |
| Markov | 0.9994 | 6.3.3 |
| Compression | 0.8456 | 6.3.4 |
| T-Tuple | 0.9381 | 6.3.5 |
| LRS | 0.9950 | 6.3.6 |
| MultiMCW | 0.9948 | 6.3.7 |
| Lag | 0.9974 | 6.3.8 |
| MultiMMC | 0.9950 | 6.3.9 |
| LZ78Y | 0.9970 | 6.3.10 |
| **H_min** | **0.8456** | min over all |

H_min across all runs: mean **0.8437**,
range 0.8324 – 0.8717 bits/bit.


![Min-entropy history](plots/min_entropy_history.png)

*([interactive HTML](plots/min_entropy_history.html))*


The Compression estimator is the canonical conservative one — it
underestimates for finite samples by design (NIST SP 800-90B §6.3.4
notes its small-sample bias). The cluster of estimators near 1.0
bit/bit reflects how clean the Δt₁ vs Δt₂ construction is: only the
Compression estimator's pessimism keeps the floor below ~0.99.



---

## Notes

- Static PNGs in `plots/` (rendered inline above) are produced via matplotlib.
- Interactive Plotly charts live alongside as `plots/*.html` (linked under
  Section A/B; for Section C/D/E open them directly from a clone).
- Source data slices used for this run are in `raw/` (if `keep_raw=True`).
- Numeric values are also available machine-readable in `stats.json`.
- This report is generated by `analysis/runner.py` v1.0.0.
