Hi On page 23 of the GLM chapter, the deviance of observation i is defined as \( d(Y_i;\mu_i) = 2\omega_i \int_{\mu_i}^{Y_i} \frac{(Y_i -\zeta )}{V (\zeta )} d\zeta \) where \(Y_i \) is the observed value, \(\mu_i \) is the fitted value and \(\omega_i \) is the weight. Why do we need the integral in this expression? Also, why do we need the number 2? thanks
The integral comes about through quasi-likelihood considerations and the 2 from the origin of this expression in the theory of normal and chi-squared distributions. If you really want this kind of detail I would suggest digging out a decent textbook on GLMs like McCullagh and Nelder. Otherwise, just learn the formulae and learn what they do.