2

I'd like a test to determine whether a number of collected 2D points (say, x,y in (0,1]) are distributed uniformly across the space. The points will be one or more 'paths' through the space - collections of points resembling movement through the 2D space. I want to determine, for the entire area, whether the entire set of points within all paths looks uniformly distributed across that area or if the points have some degree of proximity (e.g., if most paths stay in one corner of the graph).

I've considered these:

  1. Simple regression, but I don't expect to know how the points are distributed if they aren't uniform (polynomial doesn't seem to be a good fit)
  2. Taking discrete chunks of the space and computing the sum of square error between the expected density and the observed density, or using a Chi-squared on the segments.
  3. Some sort of clustering algorithm/test - not sure what I'd use here, but again, I'm not sure clusters are what I'm looking for

Any other suggestions/ideas?

dfb
  • 123
  • What is the dimension of your "space"? What do you mean by a "path"? – whuber Dec 09 '13 at 01:40
  • @whuber - 2D. By path I mean there are sets of points that roughly resemble a movement over time to some final location, its a trace of location data, there will be one or more of these. Also, maybe obvious, but the points consisting of a path aren't independent (time t will be close to time t+1), but I'm ignoring that here. My goal is to determine whether the entire set of points looks uniform – dfb Dec 09 '13 at 04:31
  • Thanks. Because your question explicitly refers to the interval "$(0,1]$," it looks like a 1D question. Please edit it to avoid confusion. When you do so, it would be a good idea to say something about the 2D region you wish to test and how that region is determined (that will influence the answer). – whuber Dec 09 '13 at 17:11
  • @whuber,@fabee - I implemented the Kolmgorov test and it seems to be matching my intuitions, but any other suggestions are welcome. – dfb Dec 09 '13 at 19:40
  • @whuber - Not sure of the name, it takes the 3 different orderings and takes the largest, a la the Wikipedia article. – dfb Dec 09 '13 at 20:12
  • What language are you using? scipy.stats provides a kstest. I am sure that R does as well. – fabee Dec 10 '13 at 00:12

1 Answers1

2

What about using a Kolmogorov-Smirnov Test? The analytical cumulative distribution function for the uniform distribution is easy.

fabee
  • 2,473
  • How does this apply to spatial data? – whuber Dec 09 '13 at 01:39
  • Maybe I misunderstood his question. I though the OP was searching for a method to test whether a collection of points in $[0,1]$ is uniformly distributed. That could be checked with a KS test. But maybe "spatial" has a different meaning that I don't know. – fabee Dec 09 '13 at 02:01