Solved – Measure the uniformity of distribution of points in a 2D square

distributionspoint-processprobabilityspatial

I have a 2D square, and I have a set of points inside it, say, 1000 points. I need a way to see if the distribution of points inside the square are spread out (or more or less uniformly distributed) or are they tending to gather together in some spot inside the square.

I need a mathematical/statistical (not programming) way to determine this. I googled, found something like goodness of fit, Kolmogorov, etc., and just wonder if there are other approaches to achieve this. Need this for class paper.

Inputs: a 2D square, and 1000 points. Output: yes/no (yes = evenly spread out, no = gathering together in some spots).

Best Answer

I think @John 's idea of a chi=square test is one way to go.

You would want patches on 2-d, but you would want to test them using a 1 way chi-square test; that is, the expected values for the cells would be $\frac{1000}{N}$ where N is the number of cells.

But it's possible that different number of cells would give different conclusions.

Another possibility is to compute the average distance between points and then compare this to simulated results of that average. That avoids the problem of an arbitrary number of cells.

EDIT (more on average distance)

With 1000 points, there are $\frac{1000*999}{2}$ pairwise distances between points. These can each be computed (using, say, Euclidean distance). These distances can be averaged.

Then you can generate N (a large number) of sets of 1000 points that are uniformly distributed. Each of those N sets also has an average distance among points.

Compare the results for the actual points to the simulated points, either to get a p-value or just to see where they fall.

Related Question