How to check whether a sample is representative across two dimensions simultaneously? I'm attempting to develop a standardized method to check whether one set of locations are representative of a larger set. In this particular case, I'm attempting to look specifically at their geographical representativeness. 
One method is to look at a two sample t-test for latitude and longitude * independently*, but that clearly ignores the possibility that there could be correlation between the values. Another option is to look at a categorical grouping of location (eg state, market, or any other gridding of the network), and use a chi-squared test. Neither of these strike me as optimal, however.
Is anyone familiar with a test that can check bias of a sample based on two dimensions simultaneously? Any thoughts would be greatly appreciated.
 A: You can still do the chi-square test.  Nothing says that the bins have to be 1 dimensional.  Divide the globe into longitude by latitude segments and count the number of cases in each bin for the two samples.  The same chi square test applies.
A: Fasano and Franceschini suggested a multi-dimensional version of the Kolmogorv-Smirnov test which they show to be preferable to the $\chi^2$-test for 2- and 3-dimensional data in Monthly Notices of the Royal Astronomical Society 225:155-170. The paper is freely available here.  
A: Actually, I had the same question recently. By scanning rapidly through the published literature, I came to realize that a general test has been developed by Friedman & Rafsky. Their approach is to use a minimum spanning tree, which is the smallest tree that connects the points of the cloud in $n$ dimensions, and compute a statistic from it that is distributed as a Student's $t$. Unfortunately, I am not aware of any implementation of that test.
All I can suggest is the trick that consists in normalizing your variables in the square $(0,1)\times(0,1)$, applying the inverse erf function to get a bivariate gaussian, square them and sum them, wich should give you a sample distributed as a $\chi^2(2)$, which you can check with your favorite goodness of fit test.
Update: There is C library to test for uniformity in several dimension written by Ben Pfaff. At the section Uniformity testing library you can download the source code and the documentation. If I understood well, this is an implementation of the Smith & Jain test which is a refinement of the Friedman & Rafsky test in case the boundaries of the domain are not defined. You can find more details on how to install and run the code at this question.
