# Geiger TRNG randomness analysis

**Generated:** 2026-07-21T03:02:16Z (duration 29.28 s)
**Git SHA:** 2ce768f3a56fe1a2192d14e43a997c1b1a959b5f  ·  **Analysis version:** 1.2.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 | 36395 |
| `metrics.tsv` rows | 264 |
| `health.csv` rows | 24791 |
| `battery_history.tsv` rows | 129 |

---

## 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 | 36,395 |
| mean Δt | 98910.0 µs |
| median Δt | 68321.6 µs |
| min Δt | 186.2 µs |
| max Δt | 1352983 µs |
| estimated rate | 10.11 Hz (607 CPM) |

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

**Pile-up cluster** (Δt < 5000 µs, the GM tube + NE555 recovery floor):
1791 of 36,395
(4.92%).


![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 | 262,279 (50.026%) | 50% |
| bias | +0.00026 | 0 |
| bias 1σ (sampling) | ±0.00069 | – |
| Shannon entropy | 7.9968 bits/byte | 8.0 |
| χ² statistic | 289.05 | ~255 (df) |
| χ² percentile | 7.02% | 5–95% |

**Autocorrelation** at lag 1..32 —
maximum |ρ| = 0.0020 at lag 19.


![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.5622 (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-07-20T03:05:13Z → 2026-07-21T03:00:13Z).

| Metric | mean | std | first | last | min | max |
|---|---|---|---|---|---|---|
| bias | 0.0006 | 0.0057 | 0.0010 | 0.0146 | -0.0157 | 0.0146 |
| ent_bpb | 7.8060 | 0.0182 | 7.8123 | 7.8292 | 7.7464 | 7.8590 |
| chi_pct | 44.7332 | 27.3020 | 71.0900 | 94.7600 | 0.0500 | 99.9500 |
| lag1_bits | -0.0007 | 0.0109 | -0.0004 | -0.0073 | -0.0253 | 0.0297 |
| mean_dt_ms | 99.9252 | 3.3104 | 103.4300 | 95.6300 | 91.1300 | 109.2500 |
| lag1_dt | 0.0010 | 0.0324 | 0.0094 | -0.0682 | -0.0800 | 0.0946 |
| pileup_pct | 4.8063 | 0.6051 | 3.8100 | 4.8800 | 2.9300 | 6.3500 |



![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)



24791 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 | 24784 | – |
| n pass | 24784 | – |
| n fail | 0 | – |
| count mean | 256.51 | 256.00 |
| count std | 11.30 | 11.31 |


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



**RCT failures logged:** 6



---

## E · Battery history (L3)



129 runs from 2026-05-07T22:45:52Z to 2026-07-21T02:05:18Z.
**63 pass / 66 fail.** Current pass-streak: **7**.

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


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


**Recent runs:**

| ts | ent | chi% | rabbit | alphabit | failures |
|---|---|---|---|---|---|
| 2026-07-17T02:05:18Z | 7.9975 | 88.77 | 1 | 1 | 0 |
| 2026-07-18T02:01:05Z | 7.9968 | 6.86 | 1 | 1 | 0 |
| 2026-07-19T02:01:05Z | 7.9970 | 20.48 | 1 | 1 | 0 |
| 2026-07-20T02:03:15Z | 7.9974 | 78.91 | 1 | 1 | 0 |
| 2026-07-21T02:05:18Z | 7.9968 | 8.94 | 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.7092 | pass | S_n = 270 |
| Block Frequency | 0.3614 | pass | M=128, N=4096, χ²=4127.53 |
| Runs | 0.7070 | pass | V_n = 262280 (expected 262144) |
| Longest Run of 1s | 0.5159 | pass | M=128, N=49, χ²=4.24 |


![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.

17 runs from 2026-06-22T05:57:08Z to 2026-07-19T01:39:09Z.
**Latest H_min: 0.8543 bits/bit**
(floor set by **compression**;
1,000,000 samples
).

| Estimator | Latest | Spec §6.3 |
|---|---|---|
| Most Common Value | 0.9961 | 6.3.1 |
| Collision | 1.0000 | 6.3.2 |
| Markov | 0.9976 | 6.3.3 |
| Compression | 0.8543 | 6.3.4 |
| T-Tuple | 0.9216 | 6.3.5 |
| LRS | 0.9873 | 6.3.6 |
| MultiMCW | 0.9971 | 6.3.7 |
| Lag | 0.9974 | 6.3.8 |
| MultiMMC | 0.9943 | 6.3.9 |
| LZ78Y | 0.9940 | 6.3.10 |
| **H_min** | **0.8543** | min over all |

H_min across all runs: mean **0.6624**,
range 0.0474 – 0.8998 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.



---

## H · Long-term drift & incident timeline



Full-history view of the L2 record — unlike Section C's trailing window,
this loads every `metrics.tsv` row, subtracts the windows in the bench
incident log (`incidents.md`), drops stale/degenerate rows, and looks for
slow structure in what remains.

| | Value |
|---|---|
| span | 81.2 days (2026-04-30T22:49:09Z → 2026-07-21T03:00:13Z) |
| L2 rows | 13,827 (coverage 65.1% at 330 s cadence) |
| masked — incident windows | 39 |
| masked — quality filter | 793 (stale-slice / degenerate rows) |
| clean rows analyzed | 12,995 |

**Rate regimes.** Step-change detection on the daily means (3-day median
shift > 0.26 Hz) splits the
record into 3 eras.
A regime step (e.g. the bench being repositioned) is not drift — the
trend/diurnal/outlier stats below use only the **current era**
(since 2026-05-28,
8,558 rows).

| era start | era end | days | mean rate |
|---|---|---|---|
| 2026-04-30 | 2026-05-10 | 5 | 12.30 Hz |
| 2026-05-11 | 2026-05-27 | 17 | 10.37 Hz |
| 2026-05-28 | 2026-07-21 | 35 | 9.90 Hz |


**Count rate (current era):**
mean 10.018 Hz,
median 9.974 Hz,
σ 0.521,
range 6.69 – 12.91 Hz.

**Linear drift:** +0.0014 Hz/day
(net +0.078 Hz over the span,
r² = 0.001,
p = 6.86e-03) —
not a materially significant trend.
Note: thorium-232's 14-Gyr half-life contributes zero decay-rate drift on
any human timescale; a real trend here is environmental or instrumental.


**Diurnal cycle:** one-way ANOVA across UTC hour-of-day bins gives
F = 7.9,
p = 3.6e-26 —
**significant hour-of-day structure**.
Peak-to-peak swing 2.2%
(fastest ~14:00 UTC,
slowest ~20:00 UTC).
A temperature-mediated rate cycle affects *when* counts arrive, not the
fairness of the Δt₁ vs Δt₂ comparison — the extractor is rate-invariant
by construction.



**Fano factor (index of dispersion, current era).** D = Var/Mean of the
event-count series; a memoryless Poisson source gives **D = 1.0** at every
bin scale. The per-window z is the standardized departure, so |z| < 3
is "consistent with Poisson". D > 1 fingerprints after-pulsing / bursting /
drift; D < 1 fingerprints dead-time clipping. Loaded from `dispersion.tsv`
(L2, written by `monitor.py`).

| scale | latest D | median D | median \|z\| | % Poisson | n |
|---|---|---|---|---|---|
| τ=1 s (1 h window) | 1.0083 | 0.9994 | 0.74 | 94.1% | 8988 |
| τ=60 s (6 h window) | 0.9081 | 1.0063 | 0.71 | 98.7% | 8070 |


**Verdict: consistent with poisson.**
This is the most direct source-fidelity check in the report — a drift of the
mean D away from 1.0 flags physical clustering or a wiring fault *before* the
downstream entropy stats would move.


![Fano factor timeline](plots/fano_timeline.png)

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




**Outliers (MAD z > 5):**
253 of 8,558
current-era rows (2.96%),
clustered into 9
episodes.
Sustained episodes not in the incident log deserve investigation — add
confirmed ones to `incidents.md` so future runs mask them.


| start | end | rows | mean rate | peak \|z\| |
|---|---|---|---|---|
| 2026-05-29T02:59:54Z | 2026-05-29T02:59:54Z | 1 | 6.69 Hz | 9.4 |
| 2026-06-19T02:17:04Z | 2026-06-19T13:28:02Z | 72 | 12.01 Hz | 8.4 |
| 2026-06-20T04:41:36Z | 2026-06-20T17:53:08Z | 116 | 12.14 Hz | 8.1 |
| 2026-06-19T14:01:02Z | 2026-06-19T15:07:02Z | 9 | 12.03 Hz | 7.5 |
| 2026-06-19T19:41:32Z | 2026-06-19T22:04:32Z | 16 | 8.00 Hz | 6.8 |




**Incident log** (5 entries from `incidents.md`):

| start (UTC) | end | duration | kind | L2 rows masked |
|---|---|---|---|---|
| 2026-06-18T22:57:50Z | 2026-06-19T02:00:00Z | 182 min | analog / hardware oscillation | 5 |
| 2026-06-20T18:25Z | 2026-06-20T18:55:00Z *(assumed)* | 30 min | silent reboot, cause unknown | 5 |
| 2026-06-24T03:13:57Z | 2026-06-24T03:43:57Z *(assumed)* | 30 min | silent reboot, cause unknown | 6 |
| 2026-06-28T17:44:39Z | 2026-07-01T05:13:34Z | 3569 min | journald stopped writing while system stayed up | not masked (monitoring-only) |
| 2026-07-01T04:55:47Z | 2026-07-01T06:51:47Z | 116 min | compound — silent reboot + hardware disconnect + latent bug | 23 |




![Long-term daily count rate](plots/longterm_rate.png)

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



![Diurnal rate profile](plots/diurnal_profile.png)

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




---

## 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.2.0.
