# 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

For many families of distributions such as the Poisson distribution or Bernoulli/binomial distribution, the variance is already determined, if you have specified the mean (Poisson: variance=mean, Bernoulli: variance=mean*(1-mean)). For other distributions such as the normal distribution or negative binomial distribution (in mean rate + dispersion parameterization), there is an additional parameter (e.g. standard deviation, precision or variance for normal, dispersion or overdispersion parameter for negative binomial). Thus, for a GLM we typically specify the regression equation for the mean response transformed via the link function and - if necessary - also the additional parameter.

• 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