Expected Euclidean distance between a given point and a multivariate Gaussian variable

integrationnormal distributionprobability distributions

For simplicity, let us consider a multivariate standard Gaussian distribution $\mathcal N_k$
of dimension $k$, where each dimension follows a standard normal distribution $\mathcal N(0, 1)$ independently.
Let $\varphi(z) = \frac{\exp(-z^2/2)}{\sqrt{2\pi}}$ denote the pdf of $\mathcal N(0, 1)$.

Now given a point $\mathbf{s} = (s_1, s_2, \ldots, s_k) \in \mathbb R^k$, I want to compute the expected distance between a random point $\mathbf{x} = (x_1, x_2, \ldots, x_k) \sim \mathcal N_k$ and $x_0$, which can be written as
$$
\int\int\cdots\int \sqrt{(s_1 – x_1)^2 + (s_2 – x_2)^2 + \cdots + (s_k – x_k)^2} \varphi(x_1)\varphi(x_2)\ldots\varphi(x_k) dx_1 dx_2 \ldots dx_k.
$$


What I have tried:
When $k = 1$, I can compute this, which reduces to
$$
\int \varphi(x) |x-s| dx = \frac{1}{2} e^{-\frac{s^2}{2}} \left(e^{\frac{s^2}{2}} s \text{erf}\left(\frac{s}{\sqrt{2}}\right)-e^{\frac{s^2}{2}} s \text{erfc}\left(\frac{s}{\sqrt{2}}\right)+e^{\frac{s^2}{2}} s+2 \sqrt{\frac{2}{\pi }}\right) = s \text{erf}\left(\frac{s}{\sqrt{2}}\right)+\sqrt{\frac{2}{\pi }} e^{-\frac{s^2}{2}},
$$

where "erf" is the Gauss error function defined as
$$\text{erf}(z) = \frac{2}{\sqrt{\pi}} \int_0^z e^{-t^2} dt$$ and
"erfc" is the complementary error function defined as
$$\text{erfc}(z) = 1 – \text{erf}(z).$$
But seemingly this becomes much more complicated when $k > 1$.

Any idea or comment would be appreciated.


Seemingly if we consider squared Euclidean distance, we have a nice solution.

Best Answer

Let $\mathbf{y}=\mathbf{s}-\mathbf{x}$, with $\mathbf{s}$ fixed and $\mathbf{x}$ with all elements i.i.d. $\mathcal{N}(0,1)$. We have that the elements of $\mathbf{y}$ are independent, following a distribution $y_i\sim\mathcal{N}(s_i,1)$.

Then, the distance from $\mathbf{s}$ to $\mathbf{x}$ is $$\|\mathbf{s}-\mathbf{x}\|=\|\mathbf{y}\|=\sqrt{\sum_{i=1}^k y_i^2}=\sqrt{\sum_{i=1}^k \left(\frac{y_i}{1}\right)^2}\,$$

which follows a non-central chi distribution with parameters $k$ (the number of dimensions) and $$\lambda=\sqrt{\sum_{i=1}^k \left(\frac{s_i}{1}\right)^2}=\sqrt{\sum_{i=1}^k s_i^2}=\|\mathbf{s}\|\,,$$ and has known expectation $$\mathbb{E}\{\|\mathbf{y}\|\}=\sqrt{\frac{\pi}{2}}L_{1/2}^{k/2-1}\left(\frac{-\|\mathbf{s}\|^2}{2}\right)\,,$$ where $L_{1/2}^{(k/2-1)}(z)$ is a general Laguerre function, which has involved expressions depending on $k$, but are possibly computable for a given value of $k$.