Consider a metric space $(M,d)$ and consider a collection of points $X\_n := \{x\_1,\dots,x\_n\} \subset M$. Let 
$$
 N\_\epsilon(y;X\_n) := | \{ x \in X\_n: d(x,y) \le \epsilon \}|
$$
where the RHS is the cardinality of a set. For a set $Y \subset M$, define
$$
 N\_\epsilon(Y;X\_n) = \inf\_{y \in Y} N\_\epsilon(y;X\_n)
$$
Does this quantity look familiar, or is related to a more standard object?


Let us say that $M$ is the standard Euclidean space $\mathbb{R}^d$ and $X\_n$ is a random sample from a distribution. What can be said about the asymptotic behavior of $ N\_{\epsilon\_n}(Y;X\_n) $, as $n \to \infty$ and possibly $\epsilon\_n \to 0$.



A measure of closeness to a discrete set in a metric space
In $\mathbb{R}^n$, the map $y \mapsto N\_\epsilon(y,X\_n)$ is the convolution of the empirical measure of the sample $X\_n$ with the indicator function $I\_\epsilon$ of the $\epsilon$-ball around $0$. Therefore, if you take for $X\_n$ a sample of i.i.d. random variables with law $\mu$, the law of large numbers implies that $N\_\epsilon(y,X\_n) / n$ converges to $(I\_\epsilon \* \mu)(y)$. 


If furthermore $\mu$ has a smooth density and $\epsilon\_n \to 0$ sufficiently slowly (It should be enough that $n \epsilon\_n^d \to \infty$), then you will have that
$$
\lim\_{n \to \infty} {N\_{\epsilon\_n}(y,X\_n) \over \epsilon^d n} = \mu(y)\;.
$$


