Why Residual Scales Matter
A residual compares an observation with a model’s fitted value, but different residual definitions answer different questions. The response residual records the discrepancy in the original units. A Pearson residual measures that discrepancy relative to the model’s variance. A deviance residual measures its contribution to the likelihood distance between the fitted model and a model that fits the observation exactly.
For ratemaking, this distinction matters because the response might be a claim count or a positive claim severity. A difference of one claim is not the same kind of discrepancy as a difference of one dollar, and neither raw difference alone indicates how surprising the observation is under its model. The residual definitions below make the comparison precise. They are aligned with the CAS Exam 8 (Advanced Ratemaking) syllabus.
Three Residuals, Three Interpretations
The response residual is measured in the response’s original units. A value of \(+3\) means the observed response exceeds its fitted mean by three response units. It is simple to interpret, but its size depends on the scale of the response and says nothing by itself about the model’s expected variability.
The Pearson residual divides the response discrepancy by its modeled standard deviation. For a Poisson count, \(V(\mu)=\mu\) and \(\phi=1\), so the Pearson residual is \((y-\hat{\mu})/\sqrt{\hat{\mu}}\). For a Gamma severity model with \(V(\mu)=\mu^2\), the variance-scaled Pearson residual is \((y-\hat{\mu})/(\sqrt{\phi}\hat{\mu})\). Thus, Pearson residuals express discrepancies in approximate standard-deviation units under the stated variance model.
The deviance residual instead comes from the likelihood comparison with a saturated model, which fits each observation exactly. Its squared value is that observation’s contribution to the unscaled deviance. Deviance residuals retain a sign, so positive values indicate observations above their fitted means and negative values indicate observations below them. They are not generally equal to Pearson residuals: their relationship is often close for small relative discrepancies, but can differ for large discrepancies or observations near a distributional boundary.
| Residual | Scale | What it highlights | What it does not provide by itself |
|---|---|---|---|
| Response | Original response units | Direction and size of the raw prediction error | A measure of how large the error is relative to modeled variability |
| Pearson | Variance-scaled units | Discrepancy relative to the assumed variance | A likelihood-distance measure |
| Deviance | Signed square root of a likelihood contribution | Observation-level contribution to model deviance | A residual in the original response units |
Count Residuals Under a Poisson Model
Suppose a claim count \(Y_i\) is conditionally Poisson with fitted mean \(\hat{\mu}_i>0\). The model assumes that, conditional on the predictors and exposure represented in the model, the count has mean and variance \(\hat{\mu}_i\). An exposure offset may affect that fitted mean; it does not change the residual formulas once \(\hat{\mu}_i\) is known.
When \(y_i=0\), use the limit \(y_i\log(y_i/\hat{\mu}_i)=0\). The Poisson deviance contribution is then \(2\hat{\mu}_i\), and the deviance residual is \(-\sqrt{2\hat{\mu}_i}\). A zero count is a valid Poisson observation; the logarithm convention handles it without taking the logarithm of zero.
Worked Example: Comparing Residuals for a Claim Count
A hypothetical policy cell has a fitted Poisson claim count of \(\hat{\mu}=3\), based on its modeled risk and exposure. The observed count is \(y=6\). Calculate the three residuals and check the deviance calculation.
Method and assumptions. Treat the count as Poisson with mean and variance 3, so \(\phi=1\) and \(V(\hat{\mu})=\hat{\mu}\). The observed count is twice the fitted mean.
Response residual. \(e=6-3=3\) claims.
Pearson residual. The fitted standard deviation is \(\sqrt{3}=1.7321\), so \(r_P=3/\sqrt{3}=1.7321\).
Deviance residual. The observation is above the fitted mean, so the sign is positive. The deviance contribution is \(2[6\log(6/3)-(6-3)]=2[6\log(2)-3]\). Since \(\log(2)=0.693147\), this is \(2[4.158882-3]=2.317764\), giving \(d=+\sqrt{2.317764}=1.5224\).
Check and common mistake. The deviance contribution is positive, and its square root has the same sign as \(6-3\). The response residual is 3 claims, not 3 standard deviations. Calling it a Pearson residual would omit division by \(\sqrt{3}\). The Pearson and deviance residuals are both smaller than 3 because they are on scales other than claim units.
Severity Residuals Under a Gamma Model
For positive claim severities, a Gamma GLM is one possible model. Here assume independent positive observations with conditional mean \(\mu\), variance \(\phi\mu^2\), and dispersion \(\phi>0\). This variance structure means that the standard deviation grows in proportion to the mean. The Gamma formulas below require strictly positive observed and fitted severities; they do not apply directly to zero severities.
The response residual remains \(y-\hat{\mu}\), in severity units. The unscaled Pearson residual is \((y-\hat{\mu})/\hat{\mu}\), while the variance-scaled Pearson residual divides further by \(\sqrt{\phi}\). The Gamma unit-deviance contribution is \(2[y/\hat{\mu}-1-\log(y/\hat{\mu})]\). The unscaled deviance residual is its signed square root; dividing it by \(\sqrt{\phi}\) gives a dispersion-scaled deviance residual. State which scaling is being used when reporting results.
The displayed \(d_i\) is the unscaled deviance residual; its dispersion-scaled form is \(d_i/\sqrt{\phi}\). The unit deviance depends on the severity-to-mean ratio, not on the currency unit. The response residual, by contrast, changes numerically if severities are expressed in dollars instead of thousands of dollars.
Worked Example: Comparing Residuals for a Claim Severity
A hypothetical Gamma severity model has fitted mean severity \(\hat{\mu}=\$1{,}200\), dispersion \(\phi=0.25\), and observed severity \(y=\$1{,}800\). Calculate the response residual, the variance-scaled Pearson residual, and both unscaled and dispersion-scaled deviance residuals.
Method and assumptions. The severity is positive and follows the stated Gamma variance model, so \(V(\mu)=\mu^2\). The standard deviation at the fitted mean is \(\sqrt{0.25}\times1{,}200=600\) dollars.
Response residual. \(e=1{,}800-1{,}200=\$600\).
Pearson residual. \(r_P=600/600=1.0000\). Without the dispersion adjustment, the Pearson residual would be \(600/1{,}200=0.5000\); these are not the same convention.
Deviance residual. The ratio \(y/\hat{\mu}=1.5\), so the unit-deviance contribution is \(2[1.5-1-\log(1.5)]\). Using \(\log(1.5)=0.405465\), this is \(2[0.5-0.405465]=0.189070\). The unscaled deviance residual is \(+\sqrt{0.189070}=+0.4348\), and the dispersion-scaled value is \(0.4348/\sqrt{0.25}=+0.8696\).
Check and common mistake. Both standardized residuals are positive because the severity exceeds its fitted mean. Dividing the response residual by \(\hat{\mu}\) alone gives the unscaled Pearson residual, not the variance-scaled residual requested here; the latter must also account for \(\phi=0.25\). The response residual remains \$600 regardless of the dispersion assumption.
How to Compare the Residuals
Residual magnitudes can be compared meaningfully only after checking their definitions, response distribution, and scaling. For example, a Pearson residual uses the assumed variance function, while the deviance residual uses the model’s likelihood contribution. Neither is a universal measure of unusualness independent of the model. A fitted mean, variance function, or distribution that does not describe the data well can make the standardized residuals misleading.
For small relative differences between observation and fitted mean, the deviance and Pearson residuals are often similar. This can be seen for the Gamma model by writing \(y/\hat{\mu}=1+t\), where \(t\) is small. The Gamma unit-deviance contribution is \(2[t-\log(1+t)]\). Using \(\log(1+t)\approx t-t^2/2\) for small \(t\), this is approximately \(t^2\). Its signed square root is approximately \(t=(y-\hat{\mu})/\hat{\mu}\), the unscaled Pearson residual. The approximation does not imply equality for large discrepancies.
Worked Example: Same Relative Error, Different Residual Scales
Compare two hypothetical observations, each twice its fitted mean: a Poisson count with \(y=4\) and \(\hat{\mu}=2\), and a Gamma severity with \(y=\$2{,}000\), \(\hat{\mu}=\$1{,}000\), and \(\phi=0.25\). Calculate response, variance-scaled Pearson, and unscaled deviance residuals.
Poisson count. The response residual is \(4-2=2\) claims. The Pearson residual is \(2/\sqrt{2}=1.4142\). The deviance contribution is \(2[4\log(2)-2]\). Since \(4\log(2)=2.772588\), the contribution is \(2(0.772588)=1.545176\), and the deviance residual is \(+\sqrt{1.545176}=1.2431\).
Gamma severity. The response residual is \(\$2{,}000-\$1{,}000=\$1{,}000\). The fitted standard deviation is \(\sqrt{0.25}\times\$1{,}000=\$500\), so the variance-scaled Pearson residual is \(1{,}000/500=2.0000\). The unit-deviance contribution is \(2[2-1-\log(2)]=2[1-0.693147]=0.613706\), and the unscaled deviance residual is \(+\sqrt{0.613706}=+0.7834\).
Check and common mistake. Each observation is 100% above its fitted mean, but the response residuals have different units and the standardized and deviance residuals differ by distribution and dispersion. It would be incorrect to conclude that the count is more unusual solely because its deviance residual, 1.2431, exceeds the Gamma unit-deviance residual, 0.7834. The latter is unscaled; its dispersion-scaled value is \(0.7834/\sqrt{0.25}=1.5668\), which still reflects a different model and scale.
Common Exam Traps
- Using the raw residual as if it were standardized. For a Poisson count with \(y=6\) and \(\hat{\mu}=3\), the incorrect calculation \(r_P=6-3=3\) is the response residual. The correction is \(r_P=(6-3)/\sqrt{3}=1.7321\).
- Dropping the sign of a deviance residual. The square root of the deviance contribution is nonnegative, but the residual is negative when \(y<\hat{\mu}\). For a Poisson zero count with fitted mean 2, the deviance residual is \(-\sqrt{4}=-2\), not \(+2\).
- Mixing scaled and unscaled conventions. A Gamma Pearson residual that includes \(\phi\) differs from one that omits it. Similarly, a deviance residual divided by \(\sqrt{\phi}\) is dispersion-scaled; it is not the unscaled deviance residual.
- Comparing values across different responses without context. A response residual in claim counts cannot be directly compared with one in dollars, and standardized residuals from different distributions do not automatically have identical behavior.
- Applying a Gamma severity formula to zero. The Gamma log-likelihood and the displayed severity deviance require positive \(y\). A zero or negative response needs an appropriate model rather than a mechanical substitution.
Check Your Understanding
For each problem, identify the applicable residual scale and retain the sign in the final result.
- A Poisson claim-count model has \(y=0\) and \(\hat{\mu}=4\). Find the response, Pearson, and deviance residuals. (Answer: \(-4\), \(-2.0000\), and \(-2.8284\), respectively.)
- A Poisson count is \(y=5\) with fitted mean \(\hat{\mu}=2\). Find the response and Pearson residuals, then calculate the deviance residual using \(\log(2.5)=0.916291\). (Answer: response \(3\); Pearson \(2.1213\); deviance \(+1.7785\).)
- A positive Gamma severity is \(y=\$900\), with \(\hat{\mu}=\$1{,}000\) and \(\phi=0.16\). Find the response residual, variance-scaled Pearson residual, and unscaled deviance residual. Use \(\log(0.9)=-0.105361\). (Answer: \(-\$100\), \(-0.2500\), and approximately \(-0.1035\).)
- A Poisson cell has \(y=10\) and \(\hat{\mu}=8\). Calculate the response residual, Pearson residual, and deviance residual using \(\log(1.25)=0.223144\). (Answer: \(2\); \(0.7071\); approximately \(+0.6803\).)
- A Gamma severity is twice its fitted mean, and the model has \(\phi=0.25\). Calculate the unscaled and dispersion-scaled deviance residuals, using \(\log(2)=0.693147\). (Answer: unscaled \(+0.7834\); dispersion-scaled \(+1.5668\).)