# What is the PDF of the Square Length of a Normally-Generated Vector?

Consider a vector $\mathbf{x}\in\mathbb{R}^n$, where each element in $\mathbf{x}$ is sampled independently from a normal distribution $\mathcal{N}(0,\sigma^2)$.

What is the probability density function of $||\mathbf{x}||_2^2$?

-

## 1 Answer

Note that $$\frac{1}{\sigma^2}\|\mathbf{x}\|_2^2=\frac{1}{\sigma^2}(x_1^2+\cdots+x_n^2)=z_1^2+\cdots+z_n^2,$$ where $z_i\sim \mathcal{N}(0,1)$ and hence $\frac{1}{\sigma^2}\|x\|_2^2$ follows a $\chi^2(n)$-distribution.

-
That's great, thanks a lot. –  M.G Dec 14 '12 at 4:02
+1 but calling that a "hint" is a bit of an understatement. –  guy Dec 14 '12 at 4:14
@guy: Hehe, I guess you're right :) –  Stefan Hansen Dec 14 '12 at 6:25