How to measure points scattering in a circle I have circles containing points (x,y). I would like to measure the scattering of the points within the circle.
For example, in the following picture, circle A will have a higher value since the points are much more scattered across the circle.

Notice that the circles have varying value - so we can have a circles with different radiuses.
For example in the following picture, although the points are the same - circle C will have a higher value because the points are scattered across the whole circle.

Do you know a measurement which I can use for such purpose?
Thanks!
 A: I would suggest 2 approaches:

*

*You construct a circle of smallest radius that will circumscribe all the points in question and use the radius as a metric. See Smallest circle problem for references and algorithms. I have previously implemented this in Python personally.

*You can find the distribution of distance between 2 points, i.e. find all pairwise distances in the sample set, and use middle statistic, like median or mean. This is a little more flexible since you can use standard deviation as well...

A: Variance is a way of doing so. It is a mathematical way of measuring the spread of a given sample.
If each point is named $x_i$ and there is $N$ points, the sample variance is $V = \frac 1 N \sum_i \|x_i- \overline x\|^2$ where $\overline x = \frac 1 N \sum_i x_i$ is the sample mean and $\| \cdot \|$ the Euclidean distance.
A greater variance means that the point are more far away from the mean, hence the distribution spread is greater. But as every metrics it have weak points, and here problems might arise if points are distributed along a circle. Since it will greatly increase the variance while two points might be close to each other.
By computing $V$, we are only able to compare distributions over disks having the same radius. To compare over different disk radius, you should consider instead $V' = \frac {V}{\pi R^2}$ where $R$ is the radius of the circle.
A: Pick some origin to define a coordinate system. The center of the given circle is probably the wisest choice. Let $\{\mathbf{x}_1,...,\mathbf{x}_n\}$ be the position vectors of the points. We can compute the mean position via the formula
$$\bar{\mathbf{x}}=\frac{1}{n}\sum_{i=1}^n \mathbf{x}_i$$
Then we can measure the spread of the points with the variance,
$$\boldsymbol{\sigma}^2=\frac{1}{n}\sum_{i=1}^n\Vert\mathbf{x}_i-\bar{\mathbf{x}}\Vert^2$$
Alternatively you could use some sort of bomb problem algorithm to find the minimal enclosing circle. It depends what you think the best measure to define spread is.
