Back to glossaryActuarial science

Deviance

Measure of discrepancy between a fitted model and the saturated model, playing for a generalized linear model the role the residual sum of squares plays for ordinary regression.

Definition

A generalized linear model is fitted by maximum likelihood rather than least squares, so the residual sum of squares no longer means anything. Deviance replaces it: twice the difference between the log-likelihood of the saturated model, which reproduces every observation exactly, and that of the fitted model. It serves three distinct purposes. Comparing two nested models, since the deviance difference asymptotically follows a chi-square law with degrees of freedom equal to the number of added parameters, which gives a significance test for an entire rating variable rather than a single level. Estimating the dispersion parameter, by dividing residual deviance by degrees of freedom, a ratio well above one signaling untreated overdispersion. And supplying deviance residuals, which read like standardized residuals and reveal poorly fitted segments. One warning is worth keeping: a deviance that falls indefinitely as variables are added signals overfitting rather than a better model, which is why it is arbitrated by a penalized criterion or by validation on held-out data.

Example

Motor frequency model, 2026 year, 180,000 policies. Residual deviance 41,200 on 179,970 degrees of freedom. Adding the engine rating variable with eight levels cuts deviance by 96 points for seven parameters consumed: the chi-square statistic on seven degrees of freedom has a critical value near 14 at the 5% level, so the variable is kept. Adding vehicle color next cuts deviance by 9 points for six parameters, and the variable is rejected.

Related terms
Also known as

deviance, déviance résiduelle, test du rapport de vraisemblance, residual deviance