Distributions of distance between two random points in Hilbert space Let $\mu$ be a probability distribution on a separable infinite-dimensional Hilbert space.  Let $D$ be the distance between two independent random samples from $\mu$.
So $D$ has some probability distribution $\theta = \theta(\mu)$ on $[0,\infty)$.
It is easy to see that $\theta$ always has the property
(*) the support of $\theta$ contains the point $0$.
Question: Does every distribution $\theta$ satisfying (*) arise as $\theta(\mu)$ for some $\mu$?
At first sight this seems implausible, but I don't see any obstruction.
 A: David, take $\theta$ to have an atom at 0 and be otherwise continuous and tightly concentrated around 2.  $\mu$ has one atom, otherwise $\theta$ would have an atom at the distance between 2 of the atoms of $\mu$.  The rest of $\mu$ is a continuous distribution elements of whose support are a distance about 2 from each other.
A: $\newcommand\th\theta\newcommand\de\delta$This is a version of mike's answer that I could understand. Let $\th=\frac12\,\de_0+\frac12\,U(1,2)$, where $\de_0$ is the Dirac measure supported on the set $\{0\}$ and $U(1,2)$ is the uniform distribution on the interval $(1,2)$, so that $0$ is the only atom of $\th$.
Let $X$ and $Y$ be independent random vectors each with distribution $\mu$ such that $|X-Y|\sim\th=\frac12\,\de_0+\frac12\,U(1,2)$, where $|\cdot|$ is the norm on the Hilbert space $H$.
If $\mu$ has two distinct atoms at points $x,y$ in $H$, then $\th$ will have an atom at $d:=|x-y|>0$, a contradiction.
So, $\mu$ has no more than one atom. If the support $S_\mu$ is a singleton set, then $\th=\de_0$, a contradiction.
So, there is some $z\in S_\mu$ which is not an atom for $\mu$. For each natural $n$, let $B_n$ be the open ball of radius $1/n$ centered at $z$, and then let $C_n:=B_n\setminus B_{n+1}$. Then
$$0<\mu(B_n)=\mu(\{z\})+\sum_{k=n}^\infty\mu(C_k)
=\sum_{k=n}^\infty\mu(C_k)$$
for all natural $n$, and hence there are natural numbers $k>j\ge2$ such that $\mu(C_k)>0$ and $\mu(C_j)>0$. Then
$C_k\cap C_j=\emptyset$, $C_k\cup C_j\subseteq B_j$, and the $|x-y|<1$ for all $x,y$ in $B_j$. So,
$$0=\th((0,1))=P(|X-Y|\in(0,1))\ge P(X\in C_k,Y\in C_j)
=P(X\in C_k)P(Y\in C_j)=\mu(C_k)\mu(C_j)>0.$$
This final contradiction proves that $\th$ is not $\th(\mu)$ for any $\mu$.
Remark: This counterexample will obviously work for the more general case when $H$ is any metric space with a metric $\rho$: just replace $|x-y|$ and $|X-Y|$ above by $\rho(x,y)$ and $\rho(X,Y)$.

On a somewhat positive note (which is applicable when $H$ is an infinite-dimensional Hilbert space), any distribution $\th$ on any two-point set of the form $\{0,a\}$ for $a\in(0,\infty)$ with $p:=\th(\{0\})>0$ is of the form $\th(\mu)$ for some probability measure $\mu$ over $H$. Indeed, let $(e_1,e_2,\dots)$ be any orthonormal sequence in the Hilbert space $H$. Let $\mu$ be a distribution on the set $\{\frac a{\sqrt2}\,e_1,\frac a{\sqrt2}\,e_2,\dots\}$.  Then $\th(\mu)$ is the distribution on the set $\{0,a\}$ with
$$\th(\mu)(\{0\})=s:=\sum_{j=1}^\infty p_j^2,$$
where $p_j:=\mu(\{\frac a{\sqrt2}\,e_j\})$, so that $(p_j)$ can be any sequence of nonnegative real numbers such that $\sum_{j=1}^\infty p_j=1$. It is easy to see that the range of all possible values of $s$ over all such sequences $(p_j)$ is the interval $(0,1]$. So, for some such sequence $(p_j)$ we have $s=p$, and then $\th=\th(\mu)$, as claimed.
A: Here is another variation of the fine solution suggested by Mike and made precise by Iosif Pinelis.
Let $Z$ be a polish (i.e., separable and complete) metric space with metric $d(\cdot,\cdot).$
Given a Borel probability measure $\mu$ on $Z$, let $\theta(\mu)$ be the law of $d(X,Y)$ where $X,Y$ are independent variables in $Z$ with law $\mu$.
First, why must $0$ belong to the support of $\theta(\mu)$ ?
Every Borel probability measure $\mu$ on a polish space is tight [1], i.e., given $\alpha>0$, it assigns measure at least $1-\alpha$ to some compact set $K$. Take $\alpha=1/2$. Given $\epsilon>0$, cover $K$ by finitely many $\epsilon$-balls. One of them must have positive $\mu$ measure, so $\theta(0,2\epsilon)>0$. Since this holds for every $\epsilon>0$, we conclude that
$$0 \in \text{supp}(\theta(\mu))\,. \tag{*}$$
Claim Let $Z$ be a polish metric space.
If $\theta_0=p\delta_0+q\theta_1$, where $0<p=1-q<1$, the  measure $\theta_1$ is non-atomic and $0 \notin$supp$( \theta_1)$,
then $\theta_0 \ne \theta(\mu)$ for every Borel probability measure $\mu$ on $Z$.
Proof: The hypothesis implies that for some $r>0$ we have $\theta_1 [0,r) =0$.
Suppose $\theta_0=\theta(\mu)$. Then $\mu$ must have a single atom at some point $z$, and $\mu(z)=\sqrt{p} \in (0,1)$. Thus $\mu=\sqrt{p}\delta_z+(1-\sqrt{p})\mu_1$ for some non-atomic Borel probability measure $\mu_1$ on $Z$.
Finally,
$$p=p+q\theta_1[0,r)=\theta(\mu)\bigl([0,r)\bigr) \ge p+(1-\sqrt{p})^2\theta(\mu_1)[0,r) \,.$$
Thus $\theta(\mu_1)[0,r)=0$, contradicting $(*)$.
[1] https://en.wikipedia.org/wiki/Tightness_of_measures#Polish_spaces
A: $\newcommand\th\theta$On a positive note, it follows from this answer that a distribution $\th$ will be of the form $\th(\mu)$ if
$$\th(\{0\})=\sum_{i=1}^N p_i^2$$
and
$$\th(\{d_j\})=2p_j\sum_{i=1}^{j-1}p_i$$
for some natural $N$, some nonnegative real numbers $p_1,\dots,p_N$ such that $p_1+\dots+p_N=1$, some real $d_1,\dots,d_N$ such that $0<d_1<\cdots<d_N$, and all $j=1,\dots,N$.

Indeed, the set $[N]:=\{1,\dots,N\}$ with the metric $d$ such that $d(i,j)=\max(d_i,d_j)$ for all distinct $i,j$ in $[N]$ is a finite untrametric space and hence allows an isometric imbedding $[N]\ni i\mapsto x_i\in\ell^2$. It remains to let $\mu$ be the Borel measure over $\ell^2$ such that $\mu(\{x_i\})=p_i$ for all $i\in[N]$. Then $\th=\th(\mu)$ indeed.
A: Suppose $\theta$ is a probability measure on $[0,\infty)$ with support equal to $\{0,1,2,4,6,8,\ldots\} =\{0, 1\}\cup 2\Bbb N$. If we had $\theta=\theta(\mu)$ for some $\mu$, then it would seem that $\mu$ would have to be concentrated on a one-dimensional lattice, of the form $\Bbb Z u$ for some unit vector $u$ in the Hilbert space. To simplify matters, let's identify this lattice with $\Bbb Z$.
Because $\theta\{1\}>0$, there is at least one integer $m$ with $\mu\{m\}\cdot\mu\{m+1\}>0$.
Fix a positive integer $n$. Because $\theta\{2n\}>0$, there is an integer $k$ such that $\mu\{k\}\cdot\mu\{k+2n\}>0$.
Now $m-k$ and $m-k-2n$ have the same parity. They can't both be odd, because the only odd integer given positive weight by $\theta$ is $1$.
So they are both even, implying that $(m+1)-k$ and $(m+1)-k-2n$ are both odd. But  both are given given positive weight by $\theta$.
It follows that $\theta$ is not $\theta(\mu)$ for any $\mu$.
