# “Flattening” a 2D Normal Distribution

I would like to model the probability of a point being at a certain place on a 2D grid. The X coordinate of the point varies according to a normal distribution with mean $0$ and standard deviation $\sigma$. The Y coordinate varies according to a normal distribution with the same mean and same standard deviation.

I know that the probability of being a certain distance from $(0, 0)$ is the same in all directions. I would therefore like to "flatten" my 2 distributions into a single distribution where the random variable is the distance from $(0, 0)$. In other words, if I know the distributions of x and y, what is the distribution of $\sqrt{x^2+y^2}$?

Am I right in my intuition that this will also be a normal distribution? (Or, half of a normal distibution, since the distance cannot be below zero). If so, how do I calculate the standard deviation of this distribution? If not, what type of distribution would it be, and what are the pdf and cdf functions of it?

-

## 1 Answer

The distribution you are after is called the Rayleigh distribution function. The pdf is given by $$f_R(r) = \dfrac{r}{\sigma^2} \exp \left(-\dfrac{r^2}{2 \sigma^2} \right) \text{ where } r \geq 0$$

$$F_R(r; \sigma) = \mathbb{P}(R \leq r) = \mathbb{P}(X^2 + Y^2 \leq r^2) = \int_{-r}^{r} \mathbb{P} \left(Y \in \left[ \sqrt{r^2-x^2},\sqrt{r^2-x^2} \right] \right) f_X(x) dx\\ = \int_{-r}^{r} \int_{-\sqrt{r^2-x^2}}^{\sqrt{r^2-x^2}} f_Y(y)f_X(x) dx = \dfrac1{2 \pi \sigma^2} \int_{-r}^{r} \int_{-\sqrt{r^2-x^2}}^{\sqrt{r^2-x^2}} \exp \left( -\left( \dfrac{y^2 + x^2}{2 \sigma^2} \right) \right) dy dx$$ Changing variable from $(x,y) \rightarrow (\rho,\theta)$, we get that $$F_R(r; \sigma) = \dfrac1{2 \pi \sigma^2} \int_{\rho=0}^{r} \int_{\theta=0}^{2 \pi} \exp \left( - \dfrac{\rho^2}{2 \sigma^2} \right) \rho d \rho d \theta\\ =\dfrac1{\sigma^2} \int_{\rho=0}^{r} \rho \exp \left(- \dfrac{\rho^2}{2 \sigma^2} \right) d \rho \\ = -\left. \exp \left( - \dfrac{\rho^2}{2 \sigma^2}\right) \right \rvert_{\rho=0}^{\rho=r} \\ = 1 - \exp \left( - \dfrac{r^2}{2 \sigma^2} \right)$$ $$f_R(r) = \dfrac{d F_R(r)}{dr} = \dfrac{r}{\sigma^2} \exp \left( - \dfrac{r^2}{2 \sigma^2}\right)$$

-

1
– leonbloy Jun 3 '12 at 1:17
@leonbloy True. – user17762 Jun 3 '12 at 1:19
So, just to confirm, the $\sigma$ in your Rayleigh pdf function is the same variable as the $\sigma$ that represents the standard deviation of the initial normal distributions, right? – Ord Jun 3 '12 at 15:24
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 8, "mathjax_display_tex": 4, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9162538051605225, "perplexity_flag": "head"}