Why Calibrate Poisson Predictions?
A Poisson GLM can predict how many events to expect for each observation, but a good fit summary does not by itself show whether those predictions agree with observed counts in a useful way. Calibration asks whether predicted event totals correspond to observed event totals, especially across groups with different predicted rates. The comparison must respect exposure: ten events over a thousand person-years do not indicate the same rate as ten events over one hundred person-years.
Let \(Y_i\) be the observed count for unit \(i\), and let \(E_i>0\) be its exposure. Under the usual Poisson rate model, \(Y_i\) has mean \(\mu_i=E_i\lambda_i\), where \(\lambda_i\) is the event rate per exposure unit. A fitted model gives a predicted mean count \(\hat{\mu}_i=E_i\hat{\lambda}_i\). The offset \(\log E_i\) in a log-link model ensures that the predicted count incorporates exposure.
Groups are commonly formed by sorting observations by predicted rate or predicted count and dividing them into bins. Whatever the grouping rule, the count comparison is \(O_g\) against \(M_g\). The rate comparison is \(O_g/E_g\) against \(M_g/E_g\), not against an unweighted average of the individual predicted rates.
Aggregating Counts and Rates Correctly
The following result explains why group totals are natural for Poisson calibration. It assumes independent counts with fixed means conditional on the covariates and exposures. “Fixed” here means that the predictions are treated as given for the calculation; it does not account for the uncertainty from estimating model parameters.
To verify the aggregation claim, use the probability-generating function of a Poisson random variable. For \(Y_i\sim\operatorname{Poisson}(\mu_i)\), \(E[t^{Y_i}]=\exp\{\mu_i(t-1)\}\). Independence gives
This is the probability-generating function of a Poisson variable with mean \(\sum_{i\in g}\mu_i\), proving the first statement. A Poisson variable has variance equal to its mean. Under individual-mean calibration, \(\sum_{i\in g}\mu_i=M_g\); dividing \(O_g\) by the fixed \(E_g\) divides its mean by \(E_g\) and its variance by \(E_g^2\). Thus the claimed rate mean and variance follow. \(\square\)
The group predicted rate \(M_g/E_g\) is an exposure-weighted average of the individual predicted rates:
An observation with greater exposure contributes more to both the predicted total and the group rate. This is why averaging the \(\hat{\lambda}_i\) values without weights generally gives the wrong benchmark.
Worked Example: Unequal Exposures Within a Group
Two clinics each contribute one observation to a group. Clinic A has exposure \(E_1=100\) and predicted rate \(\hat{\lambda}_1=0.02\) events per exposure unit. Clinic B has exposure \(E_2=10\) and predicted rate \(\hat{\lambda}_2=0.10\). The observed counts are \(Y_1=3\) and \(Y_2=2\). Calculate the predicted and observed group counts and rates.
The predicted counts are \(\hat{\mu}_1=100(0.02)=2\) and \(\hat{\mu}_2=10(0.10)=1\). Therefore \(M_g=2+1=3\). Total exposure is \(E_g=100+10=110\), and the observed count is \(O_g=3+2=5\).
The predicted group rate is \(M_g/E_g=3/110\approx0.0273\). The observed rate is \(O_g/E_g=5/110\approx0.0455\). The observed count exceeds its prediction by \(5-3=2\) events.
The unweighted average of the two individual predicted rates is \((0.02+0.10)/2=0.06\), which is not the group predicted rate. The correct rate weights each rate by exposure: \(\{100(0.02)+10(0.10)\}/110=3/110\). The high predicted rate at Clinic B receives less weight because it represents only ten exposure units.
Discrepancies and Poisson Count Variation
A useful table reports \(O_g\), \(M_g\), \(E_g\), the observed and predicted group rates, and a signed discrepancy such as \(O_g-M_g\). A positive discrepancy means more events were observed than predicted; a negative one means fewer. This signed information matters: a large discrepancy in either direction is a potential calibration concern, while a sequence of positive discrepancies across higher-prediction groups may suggest a systematic pattern.
Raw discrepancies are not comparable across groups of very different sizes. If a group is expected to have many events, its ordinary count fluctuations are larger in absolute terms. Under the Poisson model with a fixed known mean \(M_g>0\), a standardized residual is
The denominator is the Poisson standard deviation of the group count under calibration. It gives a scale for judging a discrepancy against ordinary count variation; it does not, by itself, provide a calibrated significance test when predictions are estimated from the same data.
For the first two statements, \(E[R_g]=(E[O_g]-M_g)/\sqrt{M_g}=0\), and \(\operatorname{Var}(R_g)=\operatorname{Var}(O_g)/M_g=M_g/M_g=1\). For the Pearson contribution,
The identity uses the general decomposition \(E[(X-a)^2]=\operatorname{Var}(X)+(E[X]-a)^2\); under the stated Poisson calibration assumptions, the second term is zero. \(\square\)
This result is about repeated sampling under a specified mean, not a rule that every observed contribution should equal one. For fixed \(M_g\), \(R_g\) is not generally exactly normal, and its squared value is not exactly chi-squared with one degree of freedom. When \(M_g\) is large, the Poisson central limit theorem gives an approximately standard normal \(R_g\); with a fixed number of independent groups whose means grow, the sum of squared standardized residuals is approximately chi-squared with one degree of freedom per group. These approximations need not be reliable for small expected counts.
Worked Example: Reading a Grouped Calibration Table
Suppose three prediction groups have the following totals. Treat the predicted means as fixed for this calculation.
| Group | Exposure \(E_g\) | Observed count \(O_g\) | Predicted count \(M_g\) |
|---|---|---|---|
| Low prediction | 100 | 8 | 10 |
| Middle prediction | 200 | 24 | 20 |
| High prediction | 100 | 16 | 20 |
For the low group, the observed rate is \(8/100=0.08\), the predicted rate is \(10/100=0.10\), and \(R_g=(8-10)/\sqrt{10}\approx-0.63\). For the middle group, the rates are \(24/200=0.12\) and \(20/200=0.10\), and \(R_g=4/\sqrt{20}\approx0.89\). For the high group, the rates are \(16/100=0.16\) and \(20/100=0.20\), and \(R_g=-4/\sqrt{20}\approx-0.89\).
The observed-to-predicted count discrepancies are \(-2,+4,-4\), and the observed rates fall below, above, and below their respective predictions. None of the standardized discrepancies is large in magnitude in this example. The pattern is not a steady increase or decrease in signed discrepancy across the groups, though three groups alone cannot establish that calibration is satisfactory.
The total observed count is \(8+24+16=48\), equal to the total predicted count \(10+20+20=50\)? No: it is two events lower. The total rate comparison is \(48/400=0.12\) observed versus \(50/400=0.125\) predicted. Looking at the overall total alone would hide the middle group’s positive discrepancy and the other groups’ negative discrepancies.
Calibration Is Not the Same as Count Variability
Calibration concerns the mean: does the expected count agree with the predicted count? Poisson variability concerns the distribution around that mean. Under the Poisson model, a group with predicted count \(M_g\) has variance \(M_g\); individual realizations will therefore differ from \(M_g\), even when its mean is correctly specified. A single observed count above prediction is not, on its own, proof of mean miscalibration.
The distinction also works in the other direction. A model can have correct group means but counts that vary more than the Poisson assumption allows. For example, if the true variance is approximately \(2M_g\) while the mean remains \(M_g\), the usual residual denominator \(\sqrt{M_g}\) understates the variability. With \(M_g=100\) and \(O_g=120\), the Poisson-standardized residual is \(20/\sqrt{100}=2\); using a variance of \(200\) gives \(20/\sqrt{200}\approx1.41\). This arithmetic illustrates the effect of a larger variance; it does not show that this variance pattern is present in any particular data set.
Worked Example: Same Mean Discrepancy, Different Variability
Two groups each have predicted count \(M_g=25\). Group A observes \(O_A=35\), and Group B observes \(O_B=15\). Compare their signed residuals and Pearson contributions under a fixed-mean Poisson benchmark.
For Group A, \(O_A-M_A=10\), so \(R_A=10/\sqrt{25}=2\), and its Pearson contribution is \(10^2/25=4\). For Group B, \(O_B-M_B=-10\), so \(R_B=-10/\sqrt{25}=-2\), and its Pearson contribution is also \((-10)^2/25=4\).
The squared contributions are identical, but the signed residuals point in opposite directions. The two groups together show no net count discrepancy: \(35+15=50\), which equals \(25+25=50\). Yet the group-level departures are not zero. A total-only check would miss this cancellation, while the separate signed residuals reveal it. Whether these departures are surprising depends on the variability assumptions and on how predictions and groups were obtained.
Interpreting a Grouped Check
A grouped table or plot is a diagnostic summary, not a complete proof of model adequacy. It can reveal systematic discrepancies across ranges of prediction, but grouping sacrifices detail: different individual predictions and outcomes are compressed into each bin. Calibration of a group total does not imply that each observation in the group has a correct mean prediction.
A simple reference calculation based on fixed \(M_g\) also omits the fact that GLM predictions are usually estimated. When the same data are used both to fit the model and to assess its calibration, observed counts and fitted means are statistically dependent. The groups may themselves be determined by the fitted predictions. Consequently, the fixed-mean Poisson residual calculations describe a benchmark, not an automatic reference distribution for a formal test. Predictions evaluated on independent data are closer to the fixed-prediction setting, although uncertainty and the design still matter.
Use the check to describe the direction and scale of discrepancies, always alongside exposure and predicted counts. If the mean pattern looks poor, that is different from a concern that counts fluctuate more or less than the Poisson model specifies. Keeping these questions separate prevents ordinary random variation from being mislabeled as systematic mean error, and prevents a correct overall total from concealing calibration differences across prediction groups.
Check Your Understanding
Use the definitions and assumptions in this tutorial to answer the following.
- A group has exposures 40 and 60, with predicted rates 0.05 and 0.10. Find its predicted count and exposure-weighted predicted rate.
- Under independent Poisson counts with fixed means, what distribution does a group total have, and what are its mean and variance?
- A group has \(O_g=18\) and \(M_g=25\). Calculate its signed discrepancy and fixed-mean standardized residual.
- Why does a group’s predicted rate generally differ from the unweighted average of individual predicted rates?
- Explain how correct mean predictions can coexist with count variability larger than the Poisson variance.