# How to value the extent of separation or mixing of point sets in plane?

As the image presented below, the reddish point set is totally separated from the blueish one and the greenish one, while the blueish point set is quite mixed with the greenish one.

A number of point sets on the plane. Each point set takes up a simply connected domain concave or convex. The points' coordinates is known and the points are not necessarily on the grid which might be implied by the image. The separation or mixture degree of two sets is all that matters.

How to value the extent of separation or mixing of point sets? Any suggestion or reference will be greatly appreciated. Statistical method would be preferred if optional.

One can define the degree of separation between the classes of points based on the power means $$M_p(X):=\Big(\frac1N\,\sum_1^N x_i^p\Big)^{1/p},$$ where $X=(x_i)_1^N$ is a finite family of nonnegative real numbers and $p$ is a real number. As $p$ increases from $-\infty$ to $0$ to $\infty$, $M_p(X)$ increases from $M_{-\infty}(X):=\min_1^N x_i$ to $M_0(X):=(\prod_1^N x_i)^{1/N}$ to $M_\infty(X):=\max_1^N x_i$.
For sets $A$ and $B$ of points on the plane, a "distance" function $d$, and parameters $p,q,r,t,u,v$ in $[-\infty,\infty]$, define the $p$-size
$$s_p(A):=M_p((d(a,b)\colon a\in A,b\in A))$$ of $A$ (one may take $p=0.5$ or even $p=0.1$ to decrease the influence of outliers); the $q$-distance $$d_q(a,B):=M_q((d(a,b)\colon b\in B))$$ from a point $a$ to the set $B$ (one may take e.g. $q=-1$, to imitate the minimum, in a softer fashion); the $(q,r)$-distance $$h_{q,r}(A,B):=M_r((d_q(a,B)\colon a\in A))$$ from the set $A$ to the set $B$ (one may take $r=0.5$); the $t$-symmetrization $$H_{q,r,t}(A,B):=M_t((h_{q,r}(A,B),h_{q,r}(B,A)))$$ of $h_{q,r}(A,B)$ (a $(q,r,t)$-generalization of the Hausdorff distance; one may take $t=1$); and the $(p,q,r,t,u)$-separation $$S_{p,q,r,t,u}(A,B):=\frac{H_{q,r,t}(A,B)}{M_u((s_p(A),s_p(B)))}$$ between the sets $A$ and $B$ (one may take $u=1$). Finally, for classes $C_1,\dots,C_k$ of points, define the overall $(p,q,r,t,u,v)$-degree of separation $$S_{p,q,r,t,u,v}(C_1,\dots,C_k):=M_v((S_{p,q,r,t,u}(C_i,C_j)\colon1\le i<j\le k))$$ (one may take $v=-1$).
As an example, for the four classes of points in each of the two pictures here, we have the values of the degree $S_{p,q,r,t,u,v}(C_1,\dots,C_4)$ of separation equal about $3.326$ and $1.872$, respectively, with $(p,q,r,t,u,v)=(0.5, -1, 0.5, 1, 1, -1)$ and the Euclidean distance for $d$. The second picture is obtained from the first (left) one by moving the blue set to the left and the yellow set down, both then closer to the green set; that decreases the overall degree of separation from $3.326$ to $1.872$.