# mean and variance of norm of normal random variables

If $x$ and $y$ are independent and normally distributed:$$x\sim N(\mu_x,\sigma_x)$$ $$y\sim N(\mu_y,\sigma_y)$$ and $r$ is a random variable with the following relationship to $x$ and $y$ $$r = \sqrt{x^2 + y^2}$$

is it possible to derive expressions for the mean and variance of $r$ in terms of the parameters of $x$ and $y$? $$\mu_r = E[r] = ?$$ $$\sigma_r = E[r^2] - E[r]^2 =?$$

• This math post is similar, and it looks like there is so simple answer for the distribution of $r$. The expectations may be easier. Jul 14 '17 at 13:00
• A generalization to $n$ variables for the case of zero means is answered fully at stats.stackexchange.com/questions/11707 (assuming, as you seem to do, that $x$ and $y$ are independent). Your case, with nonzero means and equal variances, would be a constant multiple of a Non-central chi distribution. The situation with unequal variances is messy: for a taste of what a general answer ought to look like, see stats.stackexchange.com/questions/72479 .
– whuber
Jul 14 '17 at 14:05
• For the case $\sigma_x=\sigma_y,$ answers can be found on Wikipedia in its article on the non-central Chi distribution.
– whuber
Oct 13 '18 at 20:21

The distribution you are looking for relates to the convolution of two non-central chi-squared distributions each with one degree-of-freedom (which is a nasty one). Squaring the norm gives you:

\begin{align} R^2 &= X^2 + Y^2 \\[6pt] &= \sigma_x^2 \Big( \frac{X}{\sigma_x} \Big)^2 + \sigma_y^2 \Big( \frac{Y}{\sigma_y} \Big)^2 \\[6pt] &\sim \sigma_x^2 \cdot \text{ChiSq}\Big(\frac{\mu_x}{\sigma_x}, 1\Big)^2 + \sigma_y^2 \cdot \text{ChiSq}\Big(\frac{\mu_y}{\sigma_y}, 1\Big)^2. \\[6pt] \end{align}

There is no closed form expression for this distribution. However, it has the characteristic function:

$$\phi_{R^2}(t) = \frac{1}{1-2it} \cdot \exp \Big( \frac{it}{1-2it} \Big(\frac{\mu_x}{\sigma_x} + \frac{\mu_y}{\sigma_y} \Big) \Big).$$

If $x$ and $y$ are independent, $\mu_x=\mu_y=0$ and $\sigma_x=\sigma_y=\sigma$, $r$ follows a Rayleigh distribution, thus:

\begin{align} & E[r] = \sigma \sqrt{\frac{\pi}{2}} \\[6pt] & V[r] = \frac{4-\pi}{2}\sigma^2 \end{align}

• Thanks Daneel. I am however looking for a solution for the general case Jul 14 '17 at 12:56
• It would be more helpful to call this a Chi distribution because that covers the general case of two or more independent normal variables, whereas the Rayleigh is just this very particular example. Indeed, the Rayleigh is too special, because it doesn't even accommodate the possibility of nonzero means.
– whuber
Jul 14 '17 at 14:06

Use the polar coordinates transformation if you're good at integrating.

Define $$\left[\begin{array}{c} R \\ \theta \end{array} \right] = \left[\begin{array}{c} \sqrt{X^2 + Y^2} \\ \text{arctan}(\theta) \end{array} \right],$$ which means $$\left[\begin{array}{c} X \\ Y \end{array} \right] = \left[\begin{array}{c} R \cos(\theta) \\ R\sin(\theta) \end{array} \right].$$

Use the transformation theorem to get the joint density $g_{R,\theta}(r,t)$, then integrate out $t$. Using that, you can get whatever moment you want. At the moment I'm having a hard time integrating out $t$, though.

I get a joint densty of $$g_{R,\theta}(r,t) = \frac{r}{2\pi \sigma_x \sigma_y}\exp\left[-\frac{h(r,t)}{2} \right]$$ with $$h(r,t) = \frac{r^2\cos^2(t) + \mu_x^2 - 2\mu_xr\cos(t)}{\sigma^2_x} + \frac{r^2\sin(t) + \mu_y^2 -2\mu_yr\sin(t)}{\sigma^2_y},$$ and $0 < r$ and $0 < t < 2\pi$. You can see how that will simplify if the variances are the same, and if the means are zero. This was mentioned in the other answer. Those two fractions inside the exponential will add nicely and a lot of terms will cancel, and you can use a trigonometric property--the whole function will be free of $t$.

But you're interested in the general case. Not sure, maybe someone good at mathematica can step in here.

NB: a few differences in notation: I'm using capital letters, and $\sigma^2$s for the variance.