# If GLM is used to estimate the mean of a response, what's used to estimate its variance?

GLM assumes that the mean of some response depends linearly on a set of input variables. So given a particular input, we can know the associated mean. Does the model make any assumptions concerning the variance?

• Hi: the variance depends on the "family" which really means the distribution of the response. ( is the response logit, is it poisson, is it normal etc ). When trying to understand this , I remember John Fox's "companion to applied regression" helping a lot. I strongly suggest checking that out. He explains the purpose of the link function and the family chosen etc. Nov 2, 2019 at 4:15
• Nov 2, 2019 at 6:08
• @mlofton Logit is not a family; it’s a link function. The first sentence of the question also misses the role of the link function. Nov 2, 2019 at 8:51
• Thanks Nick. I always confuse the two. Should I delete or fix it ? Nov 3, 2019 at 3:45
• You can't edit a comment this long after posting it, but you can delete it and post a revised version. Nov 3, 2019 at 10:42

• So is it possible for those famalies of GLMs where variance is not determined by mean (e.g. Normal) for the GLM to predict the same mean estimate for two different sets of independent variables $x_1$ & $x_2$ where each are vectors, but a different variance estimate. i.e. $\hat{\mu}_1 = \hat{\mu}_2$ but $Var(Y_1) \ne Var(Y_2)$? Oct 5, 2023 at 14:09
• Yes, e.g. with a negative binomial regression you could get for two different datasets the same estimated coefficients but different estimated dispersion (or if you prefer overdispersion) parameters. E.g. here's an R example: MASS::glm.nb(y ~ 1 + offset(logt), data=data.frame(y=c(0,0,0,0,0,1,1,2,2,3,4), logt=rep(0,11))) and MASS::glm.nb(y ~ 1 + offset(logt), data=data.frame(y=c(0,0,0,0,0,0,0,2,2,4,5), logt=rep(0,11))). The coefficient of the intercept is the same (unsurprising given the same mean rate of sum(y)/sum(exp(logt)), but the theta is different. Oct 6, 2023 at 10:10