Incident-Pattern-Simulator

Incident Pattern Simulator + Incident Overlap 3D Explorer

The statistics of being in the wrong place at the wrong time

Beta Release

Two complementary interactive tools exploring the statistical foundations of “incident overlap” evidence in healthcare settings. Built as a pedagogical resource to help lawyers, journalists, statisticians, and the public understand why a nurse present at many incidents isn’t necessarily evidence of wrongdoing.

The current build now incorporates a key structural insight raised by Prof Richard Gill: real wards don’t randomly assign nurses — each shift has a roughly fixed headcount, and day shifts typically have more staff than night shifts. When you account for that, the range of “normal” overlap narrows, and day and night need separate benchmarks. The tools let you see this for yourself.

The Core Problem

When a nurse works more shifts than average, they will naturally be present at more incidents—simply because they were there more often. This simulator demonstrates that apparent “suspicious coincidence” often emerges from ordinary workload patterns, not wrongdoing.

What This Tool Does

The simulator runs thousands of Monte Carlo trials where:

Three staffing models are available:

Key insight: The nurse who works the most will almost always have the highest overlap—regardless of guilt.

Try It

Launch the Incident Overlap 3D Explorer — Explore the null overlap landscape (3D surfaces) and compare observed values with traffic light indicators

Launch the Incident Pattern Simulator — Explore individual scenarios

Monte Carlo Manifold Surfaces

Features

Three Analysis Modes

Mode What It Tests
Standard Is this specific nurse’s overlap unusual given their workload?
Selection Effect How does investigator bias inflate apparent coincidence?
No Pre-designation What’s the expected maximum overlap when nobody is pre-selected?

Statistical Framework

Incident Overlap 3D Explorer (the “manifold”)

Interactive 3D visualisation of how maximum incident overlap scales under the null hypothesis:

Terminology note: the documentation mostly says “surfaces”; the export artefacts use “manifold”. Here, “manifold” just means the set of three surfaces (Mean/Q95/Q99) over the (M, p̄) grid.

The surface/manifold data can be regenerated using incident_overlap_3D_generator.py with custom parameters.

Judicial Commentary

Side-by-side prosecution and defence framings of the same statistics, demonstrating:

Important Limitations

⚠️ Educational Purpose Only

This simulator is a teaching aid, not a forensic instrument. The models use simplified assumptions (uniform incident distribution, exchangeable shift probabilities) that may not hold in specific cases.

This tool must not be:

Any application to live cases requires verification by a Chartered Statistician (CStat, RSS), Accredited Professional Statistician (PStat, ASA), or equivalent.

Background Reading

Documentation

Full technical documentation including mathematical framework, parameter explanations, and interpretation guidance is available in Incident_Roster_Analysis.docx.

The surface generator source (incident_overlap_3D_generator.py) includes detailed inline documentation of the Monte Carlo methodology.

Licence

MIT License — free to use, adapt, and share.


“Someone will always be the maximum. Being the maximum isn’t evidence of guilt.”