# How to test null hypothesis for spatial distribution?

I am given a sample from a spatial distribution $X$. For example, my variable $X$ is the number of certain diseases per city per capita. Null hypothesis is that variable $X$ does not depend on the location directly (it might be dependent on another spatial distribution which is known say the amount of mercury in the water or other forms of pollution $Y$). How can I test this null hypothesis for a spatially distributed variable? What happens if I have very few samples? Say, for variable $x_1$ I have several million measurements but for variable $x_2$ I have 100 measurements? In case if I do not know $Y$, but I have other variables which I know are uniformly distributed ($X_i$ depends upon $Y$, but does not depends on location directly) how can I test null hypothesis? How can my test see the difference between cases A) when $X$ is a function of not only $Y$ everywhere B) $X$ is function of only $Y$ in some subregions, say the USA but it depends on other factors somewhere else?

-