# Math Dopers: What's the distribution of sqrt(X^2+Y^2) if X&Y are Gaussian and correlated?

**URL:** <https://boards.straightdope.com/t/math-dopers-whats-the-distribution-of-sqrt-x-2-y-2-if-x-y-are-gaussian-and-correlated/656425>\
**Category:** Factual Questions\
**Created:** [April 22, 2013, 7:18pm UTC](https://boards.straightdope.com/t/math-dopers-whats-the-distribution-of-sqrt-x-2-y-2-if-x-y-are-gaussian-and-correlated/656425 "2013-04-22T19:18:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Polerius](https://avatars.discourse-cdn.com/v4/letter/p/d78d45/32.png) [@Polerius](https://boards.straightdope.com/u/Polerius)\
**Post date:** [April 22, 2013, 7:18pm UTC](https://boards.straightdope.com/t/math-dopers-whats-the-distribution-of-sqrt-x-2-y-2-if-x-y-are-gaussian-and-correlated/656425/1 "2013-04-22T19:18:32Z")

</div>

if Z = sqrt(X^2+Y^2) , and X and Y are zero-mean, iid, normally-distributed random variables, then Z is Rayleigh distributed.

What is the distribution of Z if X and Y are correlated (but still zero-mean, normally-distributed random variables)?

Can’t seem to find info on this scenario, even though it should be relatively common

---

<div class="post-metadata">

**Author:** ![Napier](https://avatars.discourse-cdn.com/v4/letter/n/ce73a5/32.png) [@Napier](https://boards.straightdope.com/u/Napier)\
**Post date:** [April 22, 2013, 11:03pm UTC](https://boards.straightdope.com/t/math-dopers-whats-the-distribution-of-sqrt-x-2-y-2-if-x-y-are-gaussian-and-correlated/656425/2 "2013-04-22T23:03:48Z")

</div>

How can they be random and correlated?

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [April 22, 2013, 11:22pm UTC](https://boards.straightdope.com/t/math-dopers-whats-the-distribution-of-sqrt-x-2-y-2-if-x-y-are-gaussian-and-correlated/656425/3 "2013-04-22T23:22:30Z")

</div>

There are plenty of ways they can be random and correlated. In fact, that’s the whole problem: We don’t know how they’re correlated, so we can’t answer the question.

---

<div class="post-metadata">

**Author:** ![OldGuy](https://avatars.discourse-cdn.com/v4/letter/o/3bc359/32.png) [@OldGuy](https://boards.straightdope.com/u/OldGuy)\
**Post date:** [April 22, 2013, 11:58pm UTC](https://boards.straightdope.com/t/math-dopers-whats-the-distribution-of-sqrt-x-2-y-2-if-x-y-are-gaussian-and-correlated/656425/4 "2013-04-22T23:58:21Z")

</div>

> [@Chronos](#):
>
> There are plenty of ways they can be random and correlated. In fact, that’s the whole problem: We don’t know how they’re correlated, so we can’t answer the question.

I assume the OP wants X and Y to be bivariate normals so the correlation wold be described simply by the single parameter.

But even given that, I don’t know the answer.

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [April 23, 2013, 12:48am UTC](https://boards.straightdope.com/t/math-dopers-whats-the-distribution-of-sqrt-x-2-y-2-if-x-y-are-gaussian-and-correlated/656425/5 "2013-04-23T00:48:29Z")

</div>

The quantity X^2 + Y^2 follows a [generalized chi-squared distribution](http://en.wikipedia.org/wiki/Generalized_chi-squared_distribution). I don’t think there’s a common name for the distribution of the square root.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [April 23, 2013, 2:44am UTC](https://boards.straightdope.com/t/math-dopers-whats-the-distribution-of-sqrt-x-2-y-2-if-x-y-are-gaussian-and-correlated/656425/6 "2013-04-23T02:44:51Z")

</div>

> [@](#):
>
> I assume the OP wants X and Y to be bivariate normals so the correlation wold be described simply by the single parameter.

Presumably, but we don’t know the parameter.

---

<div class="post-metadata">

**Author:** ![Polerius](https://avatars.discourse-cdn.com/v4/letter/p/d78d45/32.png) [@Polerius](https://boards.straightdope.com/u/Polerius)\
**Post date:** [April 23, 2013, 3:29am UTC](https://boards.straightdope.com/t/math-dopers-whats-the-distribution-of-sqrt-x-2-y-2-if-x-y-are-gaussian-and-correlated/656425/7 "2013-04-23T03:29:03Z")

</div>

> [@Chronos](#):
>
> Presumably, but we don’t know the parameter.

I was wondering whether there was a closed-form expression for a general correlation of rho.

It’s looking a little unlikely at this point

---

<div class="post-metadata">

**Author:** ![Omphaloskeptic](https://avatars.discourse-cdn.com/v4/letter/o/bcef8e/32.png) [@Omphaloskeptic](https://boards.straightdope.com/u/Omphaloskeptic)\
**Post date:** [April 23, 2013, 5:42am UTC](https://boards.straightdope.com/t/math-dopers-whats-the-distribution-of-sqrt-x-2-y-2-if-x-y-are-gaussian-and-correlated/656425/8 "2013-04-23T05:42:35Z")

</div>

There’s a closed form for the pdf in terms of the Bessel function BesselI(0,r) [that’s a capital-i, not a small-L], for what it’s worth: Diagonalize the covariance and rescale so that you have uncorrelated Gaussian random variables U=N(0,1) and V=N(0,s[sup]2[/sup]) with s\<=1, and Z=sqrt(U[sup]2[/sup]+V[sup]2[/sup]). (The smaller of the two principal-axis variances s[sup]2[/sup] will be our extra parameter.)

Converting to polar coordinates and doing the angular integral gives the pdf,  
f(z) = (z/s) Exp[-(z[sup]2[/sup]/4)(1/s[sup]2[/sup]+1)] BesselI(0,(z[sup]2[/sup]/4)(1/s[sup]2[/sup]-1)) .

Note that when s=1 you have the isotropic case and the distribution becomes Rayleigh; when s\<\<1 the distribution converges to the right half of the normal distribution.
