# Poisson Distribution of Students in a Class

I know that Poisson distributions generally count the number of occurrences of something over a period of time. However, in my experiment, I am counting the number of non-white students per class in International Baccalaureate classes and non-IB classes. Would I still be able to use a Poisson distribution where the mean would be the amount of non-white students per class, even if I'm counting the number of occurrences per class instead of the number of occurrences per unit of time?

Thanks!

• You should as a minimum link to your related question stats.stackexchange.com/questions/633561/…, preferably aybe just edit that one! But, for this application Poisson distribution does not seem to fit. For a class with total $N$ students, you could use a binomial distribution $\mathcal{binom}(N, p)$, and thus a logistic regression ... Dec 10, 2023 at 23:27
• Hi Kjetil, sorry about that. How would I model a logistic regression if I would be comparing the success (probability of a student being non-white) to a binary factor (whether a class is IB or non-IB)?
– Ben
Dec 10, 2023 at 23:40

You could just a poisson regression in this case. Let $$Y_i$$ be the count of non-white identifying students in the $$i^{th}$$ class of size $$N_i\geq Y_i$$, and let $$x_i$$ be an indicator for if the class is an IB class. You can model the scenario the data as

$$Y_i \sim \operatorname{Poisson}(\lambda_i(x))$$

$$\log(\lambda_i(x)) = \beta_0 + \beta_1x_i + \log(N_i)$$

Here, we have included the class size as an offset term. This will model the rate of non-white identifying students in each type of class. The rate in IB classes would be $$\exp(\beta_0)\exp(\beta_1)$$ and the rate in non-IB classes would be $$\exp(\beta_0)$$. The quantity $$\exp(\beta_1)$$ is then the multiplicative factor describing how the rate changes between classes.

• How would this differ from an binomial logistic regression? Dec 10, 2023 at 23:37
• @kjetilbhalvorsen The main difference is in the estimand, but logistic regression is fine here as well. Here OP asked for Poisson regression and so I answered thusly. Dec 10, 2023 at 23:38

You can use a logistic regression, which I think here is a more direct and more directly interpretable solution. The size of class $$i$$, $$N_i$$, is not in itself informative about proportion from different ethnic groups. At least not when $$x_i$$, the number of non-white students, is known. So by conditioning on $$N_i$$ we can assume that $$x_i \mid N_i \sim \mathcal{Binom}(N_i, p_i)$$ is binomial.

Now you can model $$p_i$$ as depending on covariates, in your case the type of school, IB or non-IB. That can be represented as a factor variable with two levels. Using R this could be coded as

mod0 <- glm( cbind(x, Y-x) ~ IB, data=yourdataframe, family=binomial)


Here we assume the data frame has one row for each school class. If you have more covariates the model can be extended. For instance, if you have multiple classes within schools, you can use lme4 with mixed models to extend this to a multilevel model. One thing to be aware of is that in this binomial case there might be overdispersion, so maybe try family=quasibinomial.

Another advantage with binomial regression in this case is that you can extend it (with multinomial logistic regression) to diversity with more than two ethnic groups.

A completely different way to attack your problem, it to measure diversity directly. You can check the tag

• FWIW people sometimes use "logistic regression" only to refer to the binary-outcome case, calling this case binomial regression. Dec 11, 2023 at 17:09