Is there a notion of "$X$ is uniformly distributed on $E$", at least in case $E$ is a bounded (or compact) metric space? Let $[a, b] \subset \mathbb R$. Then $X$ is said to be uniformly distributed on $[a, b]$ if $X$ has a pdf $f$ such that
$$
f(x) = \frac{1}{b-a} \quad \forall x \in [a, b].
$$
The idea is that if $X$ has a pdf $f$, then $f$ should be constant on the support of $X$. This kind of formulation naturally extends to $[a, b]^d \subset \mathbb R^d$.

Let $(E, d)$ be a metric space endowed with its Borel $\sigma$-algebra. Let $X$ be a random variable taking values in $E$. Do we have a notion of "$X$ is uniformly distributed on $E$", at least in case $E$ is bounded or compact?

 A: I am not sure whether the notion of uniform distribution can be well-defined in the general setting, but my understanding is that you need some reference measure to begin with. (This is not surprising at all, since you need a notion for assessing how "large" a given region is.)
So, suppose $(X, \mathcal{F})$ is a measurable space and a finite measure $\lambda$ on $X$ is given as a reference. Then among the probability measures on $X$ that are absolutely continuous w.r.t. $\lambda$, the probability measure
$$ \nu = \frac{1}{\lambda(X)}\lambda $$
can be thought as the uniform distribution over $X$ for various reasons. Indeed,

*

*If $X$ is finite and $\lambda$ is the counting measure on $X$, then $\nu$ is the discrete uniform distribution over $X$ in the usual sense.


*If $X$ is an interval in $\mathbb{R}$ and $\lambda$ is the restriction of the Lebesgue measure onto $X$, then $\nu$ is the unifrom distribution over $X$ in the usual sense.


*In general, $\nu$ (or more precisely, the density $\frac{\mathrm{d}\nu}{\mathrm{d}\lambda} = \frac{1}{\lambda(X)}$) maximizes the "(differential) entropy"
$$ H(f) = -\int_{X} f(x) \log f(x) \, \lambda(\mathrm{d}x) $$
among all non-negative, measurable $f$ on $X$ with $\int_X f(x) \lambda(\mathrm{d}x) = 1$. This is easily proved by the Jensen's inequality. In light of the principle of insufficient reason, this hints that $\nu$ can be thought as giving the least amount of information about the position of a random point $\sim \nu$, hence may possibly be considered as being "uniform".
So the question boils down to choosing the reference measure $\lambda$ that may be considered as "measuring sizes in the most unbiased way". Although I don't think this can be meaningfully done in general, some heuristic guidelines may be given:

*

*If $X$ is contained in a locally compact Hausdorff group $G$, then the restriction of a Haar measure onto $X$ may serve the purpose. This is indeed the case where $X$ is a measurable subset of $\mathbb{R}^d$ with finite Lebesgue measure, since the Lebesgue measure on $\mathbb{R}^d$ is a Haar measure.


*If $X$ is endowed with some nice group action, then one might regard the group action as permuting the points of $X$ in an "unbiased" way. If we are lucky enough, it might be the case that there exists, up to a multiplicative constant, a unique measure that is invariant under the group action. Then we may choose that invariant measure as our reference measure. Note that this is indeed the case when $X$ is a finite set and the group action is given by permutations on $X$, since the counting measure on $X$ is invariant under permutations.
But I am not an expertise in this direction, so I am happy to see more enlightening answers from other users.
