# Taking into account population size differences in chi-squared test

I have a group of patients who live in London. They come from the 33 London local authorities and I want to know whether there is any significant variation in where they live. In other words, I want to know whether more patients come from, say, Croydon than Islington.

I have performed a chi-squared test which comes out as statistically significant. However, this doesn't feel like the right approach because the expected values are the same for each local authority. I would have thought that the expecteds should be different because each authority has a different population size. I expect some authorities to produce more patients simply because more people live in them.

I also expect differences based on other factors, such as local clinician knowledge, ability of patients to access primary service and so on. My patient group are by no means a representative sample of the general population but I still expect there to be more from some local authority areas due to larger populations.

1. What's the best way of taking account of the differences in population size among the different districts?

1. Should I be weighting the expected frequencies according to population - if so, how?
• Expecting that different local authorities produce the same total numbers of patients can't be taken seriously, even as a null hypothesis. You just have to ask if you would defend that if the populations were even more variable than they are. A null hypothesis should be based on the population at risk, but exactly how that is defined is a more subtle question. Commented Feb 16, 2015 at 17:20
• The edited version, mentioning various other predictors, implies that a chi-squared test is just a dead end here, as it can't be extended beyond some very basic comparisons. Commented Feb 16, 2015 at 17:40
• Yes but if I do try and take them into account, it will only be a very crude way of doing it as I have no data directly on point. I thought about a regression but I'm not sure that will really help, either, due to the lack of relevant data. Therefore, I thought I may as well stick with a simple technique. Commented Feb 16, 2015 at 17:44
• It's back therefore to expected number of patients being proportional to population at risk. Using total population in each local authority is better than using equal frequencies, but using some tailored count (e.g. with adjustments for age and sex) may be better still. Commented Feb 16, 2015 at 17:50
• There are good ways to run this test. I can guarantee that if you are located near London, have any competitors, and have more than a tiny amount of data, then you will find there is "significant" variation--people will have a greater tendency to come from nearby locations and locations with no nearby competitor. The proper response to such an obvious conclusion should be "so what?". What is it that you are really trying to find out about your patients?
– whuber
Commented Feb 16, 2015 at 20:59