Français

How ERstat predicts wait times

The full methodology, in plain language

TL;DR: For hospitals that don't publish their wait times, we estimate what the wait is likely to be right now based on patterns from the hospitals that do publish. We show a range because the actual wait genuinely varies — the range is real, not hedging. Every estimate updates every 15 minutes.

Two kinds of hospitals

Live-data hospitals. Some provincial health authorities publish wait times — Alberta Health Services, Nova Scotia Health, Quebec's Index Santé, BC's ED Wait Times, and others. For these hospitals, you're seeing the wait time their own system reports, with a timestamp. No prediction happens; it's just their number. Across all sources, this covers about 200 emergency departments in Canada.

Silent hospitals. Most Canadian emergency departments don't publish their wait times anywhere. For these, we estimate based on patterns learned from the hospitals that do publish. Of 474 silent hospitals, about 394 get an estimate on any given cycle. The other 80 are ones where our model can't say anything useful with confidence — we call those "abstained" and fall back to historical averages instead.

Nowcast, not forecast

ERstat's prediction is a nowcast — an estimate of what the wait looks like right now, not what it will be later today. We're filling in the gap for hospitals that don't tell us their current state, not trying to predict future hours. When you see "~2h 15m typical wait," that's our best guess of the wait at this moment, updated 15 minutes ago at most.

What we mean by "wait time"

We use a single consistent definition: time from arrival to seeing a physician. Not triage time. Not total length of stay. Not time to bed placement.

This matters because different provinces measure different things. We harmonize everything to time-to-physician because it's the metric most patients actually care about and it's what most provincial sources report. A few sources — New Brunswick's ArcGIS feed, for example, which reports total visit length — are excluded from training because their numbers would pull predictions off in the wrong direction.

How the prediction works

The training data

Every 15 minutes, we record what the live-data hospitals are reporting. Over time, this becomes a large dataset linking observable features of a hospital (size, location, type, time of day, day of week) to actual wait times.

The model

We use a LightGBM quantile regression ensemble. In plain terms: it's a machine learning model trained to predict not just a single expected wait, but a range — a lower bound, a median, and an upper bound. It learns patterns like "small rural hospitals on Sunday mornings tend to have waits around X" from tens of thousands of real observations.

The features we feed it include:

Notably, we don't use any features about the current state of the hospital — we can't, because by definition these are silent hospitals that don't tell us their current state. This is the fundamental limit of predictions for silent hospitals, and it's why the intervals are as wide as they are.

How we handle uncertainty honestly

The raw model gives us a prediction range, but machine learning models tend to be overconfident about their ranges. So we add a second step called conformal prediction.

We hold out data from the live-data hospitals and check: when the model says "between 2 and 5 hours," does the actual wait fall in that range 80% of the time? If not, we widen the range until it does. We do this separately for different hospital types (by region and rurality) so the widening reflects the actual error pattern for similar hospitals.

The result: when we say our interval covers 80% of cases, we mean the actual wait should fall in that range 80 times out of 100. That's a mathematically defensible claim, verified on held-out real data, not a gut feel.

Confidence labels

Every prediction comes with a confidence label, based on how wide the resulting interval is:

High confidence
Interval under 3 hours wide. The model is on familiar ground and the range is tight enough to guide decisions.
Moderate confidence
Interval between 3 and 6 hours wide. Usable, but the actual wait could reasonably land anywhere in the range.
Low confidence
Interval over 6 hours wide. The hospital's wait is too variable or unlike our training data to give a useful point estimate. We show qualitative language ("Wait is unpredictable right now") instead of a specific number.

When we refuse to predict

Some hospitals are too different from anything in our training set to predict reliably. A small remote hospital might have no close analogs among the live-data hospitals. A brand-new facility with a structure unlike any informant.

For these, a separate classifier flags them as "abstain" and we show historical monthly averages from NACRS instead. About 17% of silent hospitals fall into this bucket. Showing historical averages isn't as good as a live estimate, but it's better than pretending we know something we don't.

Why the intervals are wide

If you're looking at a silent hospital and the prediction says "often 2–5h, sometimes longer," that's frustrating. Understandably. Here's why it happens:

We have limited information. A silent hospital by definition isn't telling us anything about its current state. We know it's a 150-bed community hospital in southwestern Ontario on a Tuesday afternoon, but we don't know if it just had an ambulance rollover, or if a shift change is happening, or if the waiting room is empty.

Wait times are genuinely variable. Even for a single hospital, the wait at 2pm on any given Tuesday might be 45 minutes or might be 4 hours depending on acuity mix, staffing, and dozens of factors no model can see.

Honesty beats precision. We could display a confident-looking single number by simply hiding the uncertainty. Other services do this. We chose not to, because a confident-looking number that's wrong half the time is worse than an honest range.

The width of the interval is a feature, not a bug. It tells you how much the prediction should be trusted.

How hospitals can make their predictions more accurate

Silent hospitals can replace our prediction with their own wait time by reporting directly through ERstat's hospital portal. A single update from hospital staff — a charge nurse tapping a number on a phone — replaces the prediction with a measured value. Updates stay live for a configurable window, then the prediction takes over again if no new update arrives.

Learn about the hospital portal →

What we don't do

We don't predict for hospitals that publish live data. If you're looking at a hospital whose province publishes wait times, you're seeing their actual number — not our prediction. We stay out of the way.

We don't average predictions across hospitals. Each silent hospital gets its own prediction based on its own features. We don't blend nearby hospitals together for the displayed number.

We don't share individual wait observations. Hospital data is used in aggregate to train the model. We don't republish identifying information.

We don't claim to replace clinical judgment. If you or someone you know is having a medical emergency, go to the nearest emergency department or call 911. Wait time is not a proxy for severity of need. Life-threatening conditions are triaged immediately on arrival regardless of reported wait.

The technical layer

For readers who want the engineering-level detail.

Base model
LightGBM quantile regression ensemble, trained to predict multiple quantiles (p10, p50, p90) simultaneously
Target transform
log1p (predictions made in log-minutes, inverted for display)
Features
Structural, geographic, peer-group, and temporal features, with target encoding for high-cardinality categoricals
Training
Leave-hospitals-out cross-validation on informant hospitals to generate honest calibration data; final model then fit on all available data
Conformal method
Mondrian (stratified) split conformal prediction with (province-group × rurality) cells; target 80% marginal coverage
Abstention
Covariate-shift classifier trained to distinguish silent-hospital feature distributions from informant-hospital feature distributions; hospitals scoring above the decision threshold are abstained
Refresh cadence
15-minute prediction cycles, daily full retrain
Horizon
0 minutes (nowcast — estimate reflects current wait, not a future forecast)
Confidence thresholds
Interval width < 180 min = high; 180–360 min = moderate; > 360 min = low
Achieved coverage on held-out informants
~84% (target 80%)
Abstention rate on silent hospitals
~17%
Current model version
v1.5

Questions?

The methodology behind ERstat is intentionally transparent because wait-time prediction for healthcare is too consequential to treat as a black box. If you're a researcher, clinician, or hospital administrator and want to go deeper, get in touch — we'll answer what we can.

Explore ERstat

Browse all hospitals · Provincial transparency grades · For hospitals