# How to control for population density?

My project requires me to control number of stores by population density in each neighborhood.

For instance, suppose I know neighborhood A has 10 stores and a population density of 100 people/sq mile meanwhile neighborhood B has 20 stores with a population density of 500 people/sq mile.

Can I simply divide number of stores by population density to compare these values? Suppose I multiply ('number of stores'/'population density') * 100,000, could I say this is number of stores per 100,000 people/sq?

Do you actually want the number of stores per 100000 people per square mile? I think you just want the number of stores per 100000 people, or even the number of people per store, in each neighbourhood. So you need to include the area of each neighbourhood.

Assuming you want people per store in each neighbourhood polygon:

``````area * population density => people in area
area * population density / stores => people per store
``````

Inverting:

``````stores / (area * population density) => stores per person
stores / (area * population density) * 100000 => stores per 100k people
``````

Maybe this is what you are looking for.