# In linear regression, what is the difference between controlling for a random variable and standardizing the DV by that random variable?

I am working on a project where my dependent variable is the number of violent events in a given city. It is obvious that cities that are highly populated are going to have a higher number of these violent events than cities populated by fewer people. My intuition has been to standardize the number of attacks by the city population, so that my dependent variable is something like "number of violent attacks per 100,000". I was wondering though what it would mean for me to instead include city population as a variable on the right hand side. What is the difference between these two approaches, especially in terms of interpreting results?

With a generalized linear model, you treat the number of events as the dependent variable, include the populations as an independent variable along with your other predictors, and specify a particular type of model. Depending on the nature of your data, you might choose a Poisson model, a negative-binomial model, or a zero-inflated version of either of these to lead to the desired properties of your residuals. Follow the generalized-linear-model tag on this site, examine the instructions for such models in your statistical analysis program, and do web searches for more details.