A Bayesian Diagnosis: NHS Cancer Waiting Times | NúmerosDon

A Bayesian Diagnosis: NHS Cancer Waiting Times | NúmerosDon
Capability Showcase — NHS Cancer Waiting Times

Diagnosing the Wait: A Bayesian breakdown of NHS cancer wait times.

News outlets constantly report on missed targets, but rarely explain what is driving them. That is why I engineered a Bayesian Hierarchical model using four years of NHS open data to isolate the exact drivers of these delays—quantifying precisely where resources will make the biggest impact.

119K
monthly records across 157 trusts and 10 cancer types (Apr 2022 – Mar 2026)
157
trusts profiled individually for both baseline risk and direction of travel
9/10
cancer types still missing the 62-day standard as of Mar 2026
SCROLL
INDEPENDENT BUILD Built on NHS England open data, on my own initiative. Not a client engagement — a demonstration of how I think, what I build, and the value I’d deliver as your quant analyst contractor.

Why a Bayesian model — and not a black box

What Goes Into A Breach
the model, in plain sight
What goes into a breach Five separable layers — each measured on its own. Cancer type some cancers are simply harder to treat in time Referral route urgent suspected cancer, screening, or upgrade Trend over time is this cancer type improving, or slipping back? Time of year seasonal swings in demand and capacity The hospital itself its own baseline — within pathway, trust & region THE MODEL’S ANSWER Chance this patient misses the 62-day target a best estimate, with an honest range around it Each layer is measured separately — and carries its own uncertainty.

The 62-day standard is simple: following an urgent referral, treatment should begin within 62 days. When it doesn’t, that’s a breach—and behind each one is a real person waiting longer than they should for an answer.

The published figures tell you a breach happened. They don’t tell you why, or where to act. I could have thrown the data at a black-box predictor, but prediction isn’t the job here—understanding is. A Bayesian model gives the answer and tells you how much to trust it, which in healthcare matters as much as the answer itself.

It separates the tangle
Breach rates move for many reasons at once—the cancer itself, the hospital, the referral route, the time of year. The model pulls these apart and measures each one while holding the others still, so you can see what’s actually driving a number instead of guessing.
It knows “unlucky” from “genuinely bad”
A small hospital with a handful of late cases can look as alarming as a huge one with thousands. The model treats small, noisy numbers with appropriate caution. Thin evidence gets wide error bars; strong evidence gets tight ones.
It maps to the messy reality of the NHS
Patients sit within pathways, within trusts, within regions—and real hospital counts wobble more than a textbook says they should. By using a nested, beta-binomial structure, the model builds that real-world variability in from the start, so the confidence ranges are honest rather than falsely precise.

What the structure reveals

For anyone deciding where to put scarce time and money, the model points to three concrete places to look — and one more that proves it can be trusted.

Insight 01 — Structural Trend Analysis

Which cancer types are structurally deteriorating, and where are we gaining ground?

Some cancer types are simply more difficult to treat inside the 62-day standard than others, and a single national average buries that detail.

This model gives every cancer type its own honest baseline, separating real structural drift from normal monthly noise.

It then translates those trends into hard projections. The result is a projected range for how many patients will wait too long.

9/10 cancer types are breaching the 62-day target — but 7/10 are structurally improving
Insight 02 — Where to step in, and where not to

157 trusts. Which are genuine outliers — and which are turning it around?

Judging every hospital against a flat national target hides their actual operational reality.

Instead, this model plots all 157 trusts on two axes — their true baseline and their structural trajectory — separating genuine systemic outliers from trusts simply having a run of bad luck.

Filter by cancer type, and it exposes exactly where ostensibly “safe” hospitals are quietly failing a specific one.

Insight 03 — Calibrated Risk on Demand

“What’s the risk for my cancer type, at my hospital — and how many patients is that?”

This view translates a complex statistical landscape into an on-demand operational answer.

It makes the model’s full posterior queryable, instantly returning a hospital’s true structural breach probability with all seasonal noise and data anomalies stripped out.

By projecting these rates into hard patient volumes and 95% credible intervals, it hands budget holders the full best-case and worst-case range they need to allocate resources — without relying on false-precision historical averages.

What this model delivers

Diagnosis, not just prediction

Not “what will happen” but “why it happens.” Each cancer’s baseline risk, each trust’s deviation from the average, and each trend — separated, quantified, and ranked. The starting point for any sensible plan.

Translated for decision-makers

Statistical coefficients become breach probabilities; trends become projected patient numbers; rankings filter by region and cancer type. The output speaks the language of the people who hold the budget — not the people who write the code.

Honest about what it doesn’t know

Every estimate carries its uncertainty. Thin-evidence trusts are flagged, not ranked on noise, and a calibration check proves the risk scores can be trusted. In healthcare, false confidence is the dangerous kind.

MODEL VALIDATED
Insight 04 — The proof

All of the above only counts if the model holds up. Here’s the proof it does.

PPC posterior predictive check — the standard way to stress-test a Bayesian model against reality
A model is only worth trusting if it can reproduce the reality it was trained on, and two checks settle that. The calibration curve asks the blunt question a stakeholder would: when the model says 40% risk, do roughly 40% of those actually breach? Points on the diagonal mean yes. The posterior predictive check then simulates many datasets from the fitted model and lays them over what really happened — if reality sits comfortably inside the simulations, the model has captured the structure rather than memorised noise. This is in-sample validation, and the page says so plainly rather than dressing it up as something it isn’t.
Model validation. Calibration curve with bin-level confidence ranges, a posterior predictive check (discrete bars, because the data are counts), per-cancer-type interval coverage over time, and residual stability across months.

Have a data challenge that requires this level of clarity?

I build quantitative systems for organisations that act on their data — explained clearly enough for the boardroom and rigorously enough for the analysts.

Get in touch