# Determining If 2D Collection of Points Are Random Or Not

Please forgive the lack of depth in respect of my mathematical vocabulary. I have searched quite a bit in order to determine the answers for myself, however, if you don't know what mathematical/statistical terms to search for, it can be frustrating!

In essence, I have a set of points in the plane and I would like to determine some "properties" of this set. The best way for me to explain is to cite an example. Say a sheet of paper has a target temporarily stuck on it somewhere and darts are thrown with the intent of hitting this target but most miss (dependent of the skill of the thrower, I suppose!). The target is then removed and the sheet of paper with the points (dart holes in this instance) is analysed.

How would you determine the likely position at which the target was located and how could you put a figure on the "tightness" of the grouping - in the example of this dart thrower, quantifying their accuracy?

I'm not expecting perfect answers, but any indication of what terms to research would be most welcome.

I can work out the "centre of mass" of the grouping, but I'm not sure how to discount "outliers" (actually, I'm not sure how to identify them) and I'm not convinced that this would be the best indication of where the target was likely to be anyway - although I may be wrong in that assumption.

-

The way I read your description, there are actually 2 questions: given $n$ dots (throws), you observe either $n$ (general description) or $k < n$ (example) realizations. The second interpretation is harder. There is also a way to view the question as "assuming a particular model of randomness, does the data fit?" and as "what is the best random model to fit the data?". I assume the former.

Assuming you know all $n$ dots, it is probably an acceptable first step to look for a parametric solution, in which case you could check if the dots fit a 2-dimensional normal distribution. As it is completely determined by its mean and variance, you estimate them first:

The mean is estimated with least bias by taking the 2-dimensional arithmetic average of your dots.

For the variance matrix, google the formula for the calculation (which uses the mean you estimated above). It is also fairly easy, and can be coded up fast.

If the data set was generated in this most basic way of randomness, and assuming the first interpretation, you can now read off (from tables/calculators/functions in programming languages) with what likelihood a point will be at distance $d$ from your mean. Fix a likelihood you are comfortable with (99%, 95% or so are typical), then calculate what % of your data sample is at most at that distance. If you are within the bounds theoretically predicted, you could decide that your sample fits the normal distribution model.

In the second interpretation, you have a somewhat harder problem to do precisely as you have $n - k$ data points you only know are within distance $k$ from the mean. If you know only $k$, not $n$, you cannot precisely measure any likelihood, and should resort to a different approach (I am rusty, but probably non-parametric estimation). If you know $n$ too, as a first step assume the missing values are equally distributed in the least circle you can fit around your calculated mean without intersecting any of the observed data points, and you can proceed as above (for circles with larger radius at least).

-

Calculate the centroid of the set of points you have. This is the arithmetic mean of your points, it minimises the sum of squared Euclidean distances between itself and all points in your set. So this would make it the most likely centre of the target region.

Alternatively, consider the Monte Carlo method. This is a randomization technique for approximating a value. You may find it more satisfying to consider that your dart throws (or whatever!) are randomly distributed approximations to some value. Google, Monte Carlo method, and see if you can make the necessary connections.

In addition, if you want to see if there are discernable multiple groupings, say, you could use k-means clustering. Start with k means, then perform the algorithm iteratively (Lloyd's algorithm/ k-means clustering algorithm) until the means no longer change. The algorithm assigns the points closest to each mean to a cluster, the centroid of which becomes the next mean for that cluster, and then iterates.

-