# Do all GLM models not require equal variance?

I am trying to learn about generalized linear models (GLMs). For example, in a Poisson GLM:

• $$\text{g}(\mu_i) = \text{log}(\mu_i) = \beta_0 + \beta_1*X1_i$$
• $$E[Y_i|X_i] = \mu_i = \text{exp}(\beta_0 + \beta_1*X1_i)$$
• $$P(Y_i|X_i) ~ \text{Poisson}(\mu_i)$$
• $$\text{Var}(Y_i|X_i) = \mu_i$$

Two questions I have:

1. The probability distribution of $$Y_i$$ by itself (marginal distribution) does not need to have a Poisson distribution. This means that even if I draw a histogram of $$Y_i$$ by itself and it does not look like Poisson ... can I still use Poisson Regression?
2. It seems that in GLMs, the equal variance assumption is not required. I can see that for each unique value of $$x_i$$, it is effectively based on a different Poisson distribution each time with a new mean and variance. Since all GLM models have this format, does it mean that the equal variance assumption is never required in GLMs? I don't need to test for the heteroscedacity assumption in a Poisson GLM?
• Please use Mathjax to format your math; it's easy to learn and makes it far easier to read your question(s)! Commented Oct 29, 2023 at 16:39

1. The probability distribution of $$Y_i$$ by itself (marginal distribution) does not need to be Poisson Distribution. This means that even if I draw histogram of $$Y_i$$ by itself and it does not look like Poisson ... I can still use Poisson Regression?

Yes. Only the conditional distribution should follow a Poisson distribution.

1. It seems that in GLM, the equal variance assumption is not required. I can see that for each unique value of $$X_i$$, it is effectively based on a different Poisson distribution each time with a new mean and variance. Since all GLM models have this format, it means that equal variance assumption is never required in GLM?

This depends on whether mean and variance are independent. E.g., for a Gaussian distribution, mean and variance are two independent parameters, and the equal variance assumption is required if only one variance is estimated in the GLM. For e.g., binomial and Poisson, there is only the mean parameter, and the variance is a deterministic function of the mean, thus variances are not assumed equal.

• thx! so if I am doing poisson glm, i dont need to test for hetroscedacity? Commented Oct 29, 2023 at 17:37
• OP have a look at en.wikipedia.org/wiki/Poisson_regression. In particular the "corresponding" check would be for eg overdispersion. (poisson distribution assumes variance=mean) Commented Oct 29, 2023 at 17:51

Do all GLM models not require equal variance?

Not all GLMs assume equal variance, which is not the same thing as all of them not requiring it (i.e. "not all do" is distinct from "all do not")

The normal linear regression model is itself a GLM.

The probability distribution of Yi by itself (marginal distribution) does not need to be Poisson Distribution. This means that even if I draw histogram of Yi by itself and it does not look like Poisson ... I can still use Poisson Regression?

The marginal distribution of the response in a Poisson regression is a mixture of Poissons, the particular mixture depends on the collection of values of the predictor-variables; it provides little information about the suitability of Poisson regression.

Similarly for any other GLM, including the more common normal linear model (and indeed for models for conditional distributions in general).

You can find this issue discussed in many posts on site.

Yes, a lot of people make the mistake of checking the marginal distribution of the response as if it was relevant; it can sometimes provide some information about the conditional distribution but usually not much, typically not enough to decide if the model for the conditional distribution might be reasonable (and in any case you'd have to use what information there is correctly even then; there's better diagnostics, post hoc).

It seems that in GLM, the equal variance assumption is not required.

Not in general

I can see that for each unique value of x_i, it is effectively based on a different Poisson distribution each time with a new mean and variance. Since all GLM models have this format, it means that equal variance assumption is never required in GLM?

Take care not to conflate all GLMs with the Poisson GLM. At least one GLM has constant variance.

So I dont need to test for hetroscedacity assumption in Poisson GLM?

I wouldn't test for heteroskedasticity even in a model that did assume constant variance.

There's still an assumption about the variance in the Poisson, which you might worry about the suitability of. The variance is assumed (a) proportional to the mean, and (b) with proportionality-constant 1 (that is the conditional variance divided by the conditional mean is 1 rather than something else).

There are diagnostics for each of (a) and (b), but looking at a suitable residual display should be sufficient to see whether there's much need to cast substantial doubt on the conclusions you come to, though it might be better combined with some simulations to see how sensitive your conclusions are to violations of the variance assumptions.