The Empirical Bayes Method, Explained with a Story: Why Crash Counts Alone Can Fool You
How Empirical Bayes corrects misleading crash counts, step by step.
Every year, road agencies list their "most dangerous" roads and fix the ones at the top. A year later the crashes drop, and everyone celebrates. But was it the fix, or was it luck? This post follows one road, two engineers and a method called Empirical Bayes (EB). By the end, you can do the calculation yourself.
The problem: 11 crashes on Riverside Road
Meet Arjun, a young traffic engineer, and Dr. Meera, the senior safety analyst in his office.
Arjun: Meera, look at Riverside Road. It's 2 km long, carries about 3,000 vehicles a day, and had 11 crashes last year. Roads like it usually have about 5. I want to add rumble strips and better signs. If crashes drop next year, we'll have proof the treatment works.
Meera: Before you order the paint: why did you pick Riverside Road?
Arjun: Because it had the most crashes.
Meera: Then its next year will probably look better, even if you do nothing.
Why a bad year is usually followed by a better one
Crashes are rare and partly random. Even a road that never changes will have good years and bad years.
Meera: Think of a batter who scores 150 in one match. Do you expect 150 again next match?
Arjun: No. Something closer to their usual average.
Meera: Roads behave the same way. If we choose a road because it just had an unusually bad year, part of that year was bad luck. Next year the luck evens out and the count drifts back toward the road's true level. This is called regression to the mean.
There's a second problem.
Meera: One year of crashes is also a noisy clue. Even if Riverside Road's true level were about 7.5 crashes a year, it would still have 11 or more crashes in about one year out of seven, purely by chance. And for a quiet railway crossing that sees one crash a decade, a few years of counts tell us almost nothing.
The idea: two clues instead of one
Meera: So we look at two clues:
- What happened on this road: its own crash count.
- What usually happens on roads like it: the average for similar roads with similar traffic.
Arjun: And the truth is somewhere in between?
Meera: Yes. Empirical Bayes takes a weighted average of the two, and it tells us how much to trust each one.
Think of a new restaurant with a single five-star review. You wouldn't call it the best in town on one review, and you wouldn't ignore that review either. You'd assume it's probably a bit better than a typical restaurant. EB does the same thing with crashes.
Step by step: the calculation
Riverside Road:
- Length: 2 km
- Traffic: 3,000 vehicles a day (average daily traffic, ADT)
- Crashes last year: 11
The office also has a safety performance function (SPF): an equation fitted on many similar roads that predicts their average crashes. Real SPFs are estimated from local data. For this story we'll use an illustrative one.
Step 1: What do similar roads have?
Meera: Our illustrative SPF is:
crashes per km per year = 0.03 × ADT^0.55Arjun: With 3,000 vehicles a day:
0.03 × 3000^0.55 = 2.45 crashes per km per year
For 2 km in 1 year:
2.45 × 2 = 4.90 crashes expected on a similar roadArjun: So a typical road like ours has about 4.9 crashes a year. Riverside had 11.
Step 2: How much should we trust the average?
Meera: Now the weight. It depends on how many crashes we'd expect (the more crashes, the more the road's own count tells us) and on how much similar roads vary around the average. That variation comes with the SPF as the overdispersion parameter, written φ. For our model, φ = 1.5 per km.
weight = 1 / (1 + (crashes per km per year × years) / φ)
= 1 / (1 + (2.45 × 1) / 1.5)
= 0.38Arjun: So 38% of the trust goes to the average for similar roads, and 62% to Riverside Road's own count.
Step 3: Combine the two clues
EB estimate = weight × (similar-road average)
+ (1 − weight) × (this road's count)
= 0.38 × 4.90 + 0.62 × 11
= 8.7 crashes per yearMeera: And how sure are we?
standard deviation = √((1 − weight) × EB estimate)
= √(0.62 × 8.7)
= ± 2.3 crashesArjun: So Riverside Road's true safety level is about 8.7 ± 2.3 crashes a year, not 11.
Meera: Right. It's still a risky road, almost 1.8 times the 4.9 of a typical road, so it deserves attention. But EB says about 2 of last year's 11 crashes were likely chance, not a sign of how dangerous the road really is.
More years, more confidence
Arjun: What if I use three years? Riverside had 11, 6 and 7 crashes.
Meera: Then the road's own record becomes more reliable, so we trust it more.
Similar roads, 2 km over 3 years:
2.45 × 2 × 3 = 14.7 crashes
weight = 1 / (1 + (2.45 × 3) / 1.5) = 0.17
EB estimate = 0.17 × 14.7 + 0.83 × (11 + 6 + 7)
= 22.4 crashes in 3 years
≈ 7.5 crashes per year
standard deviation = √(0.83 × 22.4) = ± 4.3 crashes in 3 yearsArjun: The weight on the average fell from 0.38 to 0.17.
Meera: That's the method working as intended. With little data, it leans on what we know about similar roads. With more data, it trusts the road's own history.
What this means for Arjun's treatment
Meera: Now suppose you install the rumble strips and next year Riverside Road has 5 crashes.
- The naive claim: 11 → 5 crashes, a 55% reduction.
- The EB view: the road's true level was about 7.5, not 11, so the drop you can credit to the treatment is closer to 7.5 → 5, about 33%.
Arjun: So without EB I'd have promised a treatment that works far better than it really does.
Meera: And next time we'd spend money expecting results that don't come. Good decisions need honest numbers.
Why EB matters in transportation safety research
- It removes regression-to-the-mean bias. Before-after studies no longer overstate how well a treatment works.
- It finds the truly risky sites. Ranking roads by EB estimates, not last year's raw counts, avoids chasing sites that just had an unlucky year.
- It works with little data. Rural roads, railway crossings and individual drivers have few crashes, and EB still gives a usable estimate.
- It uses everything we know. Both the site's history and what we know about similar sites count.
- It's standard practice. The tutorial's authors wrote that the time had come for EB to be the standard of professional practice, and it is now built into the Highway Safety Manual's crash prediction method.
The method on one card
- Average for similar sites: use an SPF, then multiply by length and years.
- Weight: 1 / (1 + crashes per km per year × years / φ).
- Blend: weight × similar-site average + (1 − weight) × this site's count.
- Uncertainty: √((1 − weight) × estimate).
Arjun: Two clues, one weight, one honest number.
Meera: That's Empirical Bayes.
Further reading: Hauer, E., Harwood, D. W., Council, F. M., & Griffith, M. S. (2002). Estimating Safety by the Empirical Bayes Method: A Tutorial. Transportation Research Record, 1784, 126–131. https://doi.org/10.3141/1784-16