Residual Plot
Study guides: Exam MAS-I, Exam PCPA, Exam F1PC
A Residual Plot is a graph of a fitted model's residuals against the fitted values, a predictor, or another variable, used to check the model's assumptions. The residual of observation i is
e_i = y_i - \hat{y}_i
y_iis the observed response, and\hat{y}_iis its fitted value.
The standardized residual divides the residual by its estimated standard deviation:
r_i = \frac{e_i}{\hat{\sigma}\sqrt{1 - h_{ii}}}
\hat{\sigma}is the estimate of the error standard deviation.h_{ii}is the leverage of observationi, from the hat matrix.
If the model is right, the residuals scatter randomly in a band of constant width centred on zero. A pattern in the plot shows which assumption fails:
| Pattern | Meaning |
|---|---|
| A random band centred on zero, with constant spread | The mean structure and the variance are adequate |
| Curvature | The predictor's effect is nonlinear, and a term such as a quadratic is needed |
| A trend, or residuals systematically positive in one region | A predictor is missing or wrongly specified |
| A spread that grows or shrinks across the plot (a fan) | Heteroscedasticity: the variance is not constant |
| Isolated points far from zero | Outliers |
A linear regression of claim severity on vehicle value is fitted. The residuals plotted against the fitted values spread out in a fan as the fitted values increase. What does this show, and what model would remove it?
- A spread that grows with the fitted value shows that the variance of severity increases with its mean.
- The constant-variance assumption of the linear regression fails.
- A Gamma GLM with a log link assumes a variance proportional to the square of the mean, which fits this pattern.
Residuals of a generalized linear model
The raw residuals of a GLM have a spread that depends on the mean, so a GLM's residual plot uses residuals scaled by the variance function V(\mu). The Pearson residual is
r_i^P = \frac{y_i - \hat{\mu}_i}{\sqrt{V(\hat{\mu}_i)}}
\hat{\mu}_iis the fitted mean of observationi.
The deviance residual is the signed square root of the observation's contribution to the deviance. When the variance function is right, the Pearson residuals and the deviance residuals have a roughly constant spread.
Residuals of a chain-ladder model
Mack's chain-ladder model assumes that the variance of the next cumulative loss is proportional to the current cumulative loss. For accident year i at development age k, the weighted residual is
\frac{C_{i,k+1} - f_k\, C_{i,k}}{\sqrt{C_{i,k}}}
C_{i,k}is the cumulative loss of accident yeariat agek.f_kis the age-to-age factor from agekto agek + 1.- Under a constant variance, the residual is
C_{i,k+1} - f_k\, C_{i,k}, with no division.
The weighted residuals are plotted against C_{i,k}, the cumulative loss at the earlier age. Residuals scattered randomly around zero with no trend and no change in spread support the variance assumption and the linear development. A trend, such as residuals decreasing with claim size, or a fan shows that the assumption fails.
An accident year has a cumulative loss of 1,000 at age 12 and 1,250 at age 24, and the age-to-age factor from 12 to 24 is 1.20. What is its weighted residual?
- The fitted loss at age 24 is
1.20 \times 1{,}000 = 1{,}200.- The residual is
1{,}250 - 1{,}200 = 50.- The weighted residual is
50/\sqrt{1{,}000} = 1.58.
Residuals of a bootstrap reserving model
The ODP bootstrap model assumes that its standardized residuals are independent and identically distributed, with a constant variance. The residuals are plotted against development period, accident year, calendar period and the size of the predicted incremental loss, and a normality plot is drawn. Heteroscedasticity shows as a spread, or a variance computed from the residuals, that differs materially between development periods. A trend in any plot, such as residuals drifting away from zero across calendar periods, or residuals on the normality plot that stray from the straight 45-degree line, shows that the model needs adjusting.
Reading only the residuals against the fitted values A model can show a random band against the fitted values and still be wrong for one predictor. Plot the residuals against each predictor too, and in a reserving model against accident year, development period and calendar period.
Practice questions
- CAS Exam 7 Spring 2013, Question 3
- CAS Exam 7 Spring 2014, Question 2
- CAS Exam 7 Spring 2015, Question 3
- CAS Exam 7 Spring 2015, Question 10
- CAS Exam 7 Spring 2016, Question 7
- CAS Exam 7 Spring 2016, Question 13
- CAS Exam 7 Spring 2017, Question 3
- CAS Exam 7 Spring 2017, Question 10
- CAS Exam 7 Spring 2018, Question 11
- CAS Exam 8 Fall 2018, Question 5
- CAS Exam MAS-I Fall 2019, Question 30
- CAS Exam MAS-I Fall 2019, Question 31
- CAS Exam MAS-II Fall 2019, Question 2