Informative Prior Distribution for Cancer Rates#
Part 1 · Stage 2 · 📍 Single-Parameter Models & Priors · Lesson 017 of 144 · beginner
◀ Previous · Other Standard Single-Parameter Models · Next · Noninformative Prior Distributions ▶ · ↑ Section
Important
✨ AI-generated content. This page was written with the assistance of an AI language model and is provided as a learning aid. Despite careful review, it may still contain mistakes, omissions, or out-of-date information. Whether you are new to the topic, a team lead, or a senior practitioner, treat it as a starting point rather than an authoritative reference: read it critically and independently verify anything you act on (code, commands, figures, and factual claims) against official documentation and primary sources before relying on it.
The map that lies#
Colour a map of US counties by kidney-cancer rate and something strange appears: the highest-rate counties are mostly small, rural ones. Colour it by the lowest rates and — the same counties appear again. No environmental story explains both. The pattern is a statistical artifact, and it is the classic argument for informative priors.
Small denominators, wild rates#
Kidney cancer is rare. A county of 60,000 people might record 4 cases (about 6.6 per 100,000); a county of 17,000 might record 7 (about 41 per 100,000). One case fewer in the small county would drop its rate by roughly a sixth. The raw rate \(y_j / n_j\) is an unbiased but hopelessly noisy estimate when \(n_j\) is tiny, so the extremes of the ranking are populated not by the most dangerous places, but by the smallest ones.
The Poisson–Gamma remedy#
Model the counts as \(y_j \sim \mathrm{Poisson}(\theta_j n_j)\) with a \(\mathrm{Gamma}(\alpha, \beta)\) prior on the county rate, and the conjugate posterior mean is a weighted average of the county’s own rate and the prior (national) rate:
Small counties (\(n_j \ll \beta\)) are pulled hard toward the national rate; large counties keep their own. The prior does not distort — it stabilises.
from scipy import stats
alpha, beta = 20, 1_000_000 # prior: ~20 cases per million person-years
for y, n in [(7, 17_000), (4, 60_000), (250, 1_200_000)]:
raw = 1e5 * y / n
shrunk = 1e5 * (alpha + y) / (beta + n)
print(f"raw {raw:6.1f} shrunk {shrunk:6.1f} (n={n:,})")
# small counties move a lot; the large county barely moves
Shrinkage, honestly#
The estimates are shrunk toward a common centre by an amount governed by how much data each county supplies. This buys enormous stability at the price of a small bias toward the mean — an excellent trade when the alternative is ranking noise. And note what this analysis is quietly reaching for: the prior rate \(\alpha/\beta\) should really be estimated from the counties themselves. That is a hierarchical model, and it arrives in Stage 5.
Hint
Related lessons: Informative Prior Distributions · Other Standard Single-Parameter Models · Exchangeability and hierarchical models · Posterior as a Compromise Between Data and Prior Information
See also
Source article Adapted (context, re-expressed) in our own words from: https://insightful-data-lab.com/2025/11/09/informative-prior-distribution-for-cancer-rates/ (insightful-data-lab.com).