# Geiger TRNG randomness analysis

**Generated:** 2026-10-12T03:03:42Z (duration 19.14 s)
**Git SHA:** n/a  ·  **Analysis version:** 1.2.0  ·  **Python:** 3.11.2

## 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) | 32467 bytes |
| `events.csv` deltas | 33501 |
| `metrics.tsv` rows | 262 |
| `health.csv` rows | 511 |
| `battery_history.tsv` rows | 3 |

---

## 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 | 33,501 |
| mean Δt | 93153.0 µs |
| median Δt | 64807.5 µs |
| min Δt | 2000.3 µs |
| max Δt | 3826870 µs |
| estimated rate | 10.74 Hz (644 CPM) |

**Goodness-of-fit (Kolmogorov-Smirnov vs exponential):**
KS statistic = 0.0212,
p-value = 0.0000 →
**departs_from_poisson**

**The same test behind a 2000 µs dead time**
(the extractor's echo holdoff: no count can be seen that soon after another,
so the intervals of a Poisson source are that constant plus an exponential):
KS statistic = 0.0039,
p-value = 0.7001 →
**consistent_with_poisson_behind_dead_time**

**Pile-up cluster** (Δt < 5000 µs, the GM tube + NE555 recovery floor):
1202 of 33,501
(3.59%).


![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 | 259,736 | – |
| ones | 129,680 (49.928%) | 50% |
| bias | -0.00072 | 0 |
| bias 1σ (sampling) | ±0.00098 | – |
| Shannon entropy | 7.9950 bits/byte | 8.0 |
| χ² statistic | 224.93 | ~255 (df) |
| χ² percentile | 91.27% | 5–95% |

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


![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.5635 (1.0 = perfectly flat):

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

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




---

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



262 samples over the trailing 24.0 h
(2026-10-11T04:10:36Z → 2026-10-12T03:01:30Z).

| Metric | mean | std | first | last | min | max |
|---|---|---|---|---|---|---|
| bias | 0.0051 | 0.0071 | 0.0020 | -0.0133 | -0.0155 | 0.0132 |
| ent_bpb | 7.8038 | 0.0142 | 7.8301 | 7.7995 | 7.7545 | 7.8582 |
| chi_pct | 35.4483 | 26.5523 | 80.4200 | 18.6000 | 0.1300 | 99.9600 |
| lag1_bits | -0.0073 | 0.0109 | -0.0016 | 0.0146 | -0.0277 | 0.0245 |
| mean_dt_ms | 107.1371 | 19.7532 | 87.4800 | 94.6100 | 81.9000 | 126.9300 |
| lag1_dt | 0.0236 | 0.0355 | 0.0299 | -0.0285 | -0.0892 | 0.0984 |
| pileup_pct | 3.8602 | 0.4883 | 5.2700 | 2.9300 | 2.1500 | 5.2700 |



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



511 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 | 507 | – |
| n pass | 507 | – |
| n fail | 0 | – |
| count mean | 257.96 | 256.00 |
| count std | 11.69 | 11.31 |


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



**RCT failures logged:** 0



---

## E · Battery history (L3)



3 runs from 2026-10-11T04:32:49Z to 2026-10-12T02:07:21Z.
**3 pass / 0 fail.** Current pass-streak: **3**.

| Metric | Value |
|---|---|
| ent mean | 7.9747 bits/byte |
| ent range | 7.9647 – 7.9945 |
| Rabbit pass-rate | 100.00% |
| Alphabit pass-rate | 100.00% |


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


**Recent runs:**

| ts | ent | chi% | rabbit | alphabit | failures |
|---|---|---|---|---|---|
| 2026-10-11T04:32:49Z | 7.9647 | 64.08 | 1 | 1 | 0 |
| 2026-10-11T04:33:15Z | 7.9649 | 63.71 | 1 | 1 | 0 |
| 2026-10-12T02:07:21Z | 7.9945 | 86.96 | 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 (259,736
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.4607 | pass | S_n = -376 |
| Block Frequency | 0.0989 | pass | M=128, N=2029, χ²=2111.47 |
| Runs | 0.5180 | pass | V_n = 129703 (expected 129868) |
| Longest Run of 1s | 0.2790 | pass | M=128, N=49, χ²=6.29 |


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

2 runs from 2026-10-11T04:26:15Z to 2026-10-11T04:26:54Z.
**Latest H_min: 0.6730 bits/bit**
(floor set by **compression**;
38,392 samples
— below the SP 800-90B 1M-sample floor, caveat applies).

| Estimator | Latest | Spec §6.3 |
|---|---|---|
| Most Common Value | 0.9789 | 6.3.1 |
| Collision | 0.7939 | 6.3.2 |
| Markov | 0.9944 | 6.3.3 |
| Compression | 0.6730 | 6.3.4 |
| T-Tuple | 0.9166 | 6.3.5 |
| LRS | 0.9764 | 6.3.6 |
| MultiMCW | 0.9799 | 6.3.7 |
| Lag | 0.9780 | 6.3.8 |
| MultiMMC | 0.9755 | 6.3.9 |
| LZ78Y | 0.9893 | 6.3.10 |
| **H_min** | **0.6730** | min over all |

H_min across all runs: mean **0.6723**,
range 0.6717 – 0.6730 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 | 1.0 days (2026-10-11T04:10:36Z → 2026-10-12T03:01:30Z) |
| L2 rows | 262 (coverage 101.5% at 320 s cadence) |
| masked — incident windows | 0 |
| masked — quality filter | 0 (stale-slice / degenerate rows) |
| clean rows analyzed | 262 |

**Rate regimes.** Step-change detection on the daily means (3-day median
shift > 0.00 Hz) splits the
record into 1 era.
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-10-11,
262 rows).

| era start | era end | days | mean rate |
|---|---|---|---|
| 2026-10-11 | 2026-10-12 | 2 | 9.00 Hz |


**Count rate (current era):**
mean 9.664 Hz,
median 10.448 Hz,
σ 1.792,
range 7.88 – 12.21 Hz.

**Linear drift:** -4.9099 Hz/day
(net -4.674 Hz over the span,
r² = 0.574,
p = 4.38e-50) —
**significant trend** — worth watching.
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 = 167.1,
p = 2.6e-131 —
**significant hour-of-day structure**.
Peak-to-peak swing 38.1%
(fastest ~13:00 UTC,
slowest ~00: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.0644 | 1.0644 | 2.73 | 99.2% | 239 |
| τ=60 s (6 h window) | 1.0202 | 1.0387 | 0.52 | 100.0% | 24 |


**Verdict: over dispersed.**
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):**
0 of 262
current-era rows (0.00%),
clustered into 0
episodes.
Sustained episodes not in the incident log deserve investigation — add
confirmed ones to `incidents.md` so future runs mask them.





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