3

I recently asked this question involving uniform distributions. I am wondering what would be the equivalent for Gaussian distributions. The problem states as follows.

We consider a random vector $\vec{v} = \left(x_{1}, x_{2}, \dots, x_{n}\right)$ built from $n$ real random variables drawn from a Gaussian distribution $\mathcal{N}\left(\mu, \sigma\right)$, $\mu$ and $\sigma$ being the same for all $x_{i}$.

What is the distribution $D$ of the $L^{2}$-norm of such random vectors $\vec{v}$: $\left\lVert\vec{v}\right\rVert_{2} = \sqrt{x_{1}^{2}+x_{2}^{2}+\dots+x_{n}^{2}}$?

In other words, what is the analytical expression of the distribution obtained through this numerical experiment:

# Packages
import numpy as np
import random as rd
import matplotlib.pyplot as plt

# Parameters
mu = 5
sigma = 2
n = 10
count = 100000

# Compute a random norm
def random_norm(mu, sigma, n):
    v = [rd.gauss(mu, sigma) for i in range(0, n)]
    return sum([x ** 2 for x in v]) ** (1./2.)

# Generate random vectors and compute their norm
norms = [random_norm(mu, sigma, n) for i in range(0, count)]

# Plot the resulting distribution
plt.hist(norms, 100)
plt.show()
Vincent
  • 205
  • 2
  • 7
  • 1
    It will be related to the [Chi-distribution](https://en.wikipedia.org/wiki/Chi_distribution), possibly up to some scaling and shifting. – rzch Feb 13 '19 at 20:32
  • @rzch, the sum of n standardarized normals squared is chi-squared n but that's not also true when you take the square root ? not clear what you mean upto some scaling and shifting ? thanks. – mlofton Feb 13 '19 at 20:36
  • The Chi distribution is the distribution of the square root of a Chi-squared random variable. Since the question is being asked about non-standardised normals, I'm not immediately sure how the resulting distribution compares to the Chi distribution. I think having $\mu = 0$, $\sigma \neq 1$ results in a scaled Chi distribution, but having non-zero $\mu$ might complicate things a bit. – rzch Feb 13 '19 at 20:42
  • 1
    Searching about the [non-central chi-squared distribution](https://en.wikipedia.org/wiki/Noncentral_chi-squared_distribution), maybe... – Xi'an Feb 13 '19 at 20:56
  • It turns out our site has *many* posts related to this: https://stats.stackexchange.com/search?q=non-central+chi. – whuber Feb 13 '19 at 22:30

1 Answers1

4

The non-central Chi distribution with $k$ degrees of freedom gives the distribution of $\sqrt{\sum_{i = 1}^{k}\left(X_{i}/\sigma_{i}\right)^{2}}$ for independent Gaussian random variables with variances $\sigma_{1}^{2}, \dots, \sigma_{k}^{2}$ and means $\mu_{1}, \dots, \mu_{k}$. It has the density function $$f\left(x;k,\lambda\right)=\dfrac{e^{-\left(x^2+\lambda^2\right)/2}x^k\lambda} {\left(\lambda x\right)^{k/2}} I_{k/2-1}\left(\lambda x\right)$$ where $\lambda = \sqrt{\sum_{i = 1}^{k}\mu_{i}^{2}}$ and $I_{k/2-1}\left(\lambda x\right)$ is a modified Bessel function of the first kind.

So it follows that in our case with standard deviation $\sigma$ and mean $\mu$, the density function of the $L^{2}$ norm will be that of a scaled non-central Chi distribution with $n$ degrees of freedom $f\left(x/\sigma;n,\lambda\right)$, where $\lambda = \sqrt{n}\mu/\sigma$.

To see this, we can view our desired norm as being formed by $$\sqrt{X_{1}^{2} + \dots + X_{n}^{2}} = \sigma\sqrt{Y_{1}^{2} + \dots + Y_{n}^{2}}$$ where $Y_{i} \sim \mathcal{N}\left(\mu/\sigma, 1\right)$.

rzch
  • 503
  • 2
  • 4