# Rayleigh distribution

Parameters Probability density functionPlot of the Rayleigh PDF Cumulative distribution functionPlot of the Rayleigh CDF ${\displaystyle \sigma >0\,}$ ${\displaystyle x\in [0;\infty )}$ ${\displaystyle {\frac {x\exp \left({\frac {-x^{2}}{2\sigma ^{2}}}\right)}{\sigma ^{2}}}}$ ${\displaystyle 1-\exp \left({\frac {-x^{2}}{2\sigma ^{2}}}\right)}$ ${\displaystyle \sigma {\sqrt {\frac {\pi }{2}}}}$ ${\displaystyle \sigma {\sqrt {\ln(4)}}\,}$ ${\displaystyle \sigma \,}$ ${\displaystyle {\frac {4-\pi }{2}}\sigma ^{2}}$ ${\displaystyle {\frac {2{\sqrt {\pi }}(\pi -3)}{(4-\pi )^{3/2}}}}$ ${\displaystyle -{\frac {6\pi ^{2}-24\pi +16}{(4-\pi )^{2}}}}$ ${\displaystyle 1+\ln \left({\frac {\sigma }{\sqrt {2}}}\right)+{\frac {\gamma }{2}}}$ ${\displaystyle 1+\sigma t\,e^{\sigma ^{2}t^{2}/2}{\sqrt {\frac {\pi }{2}}}\left({\textrm {erf}}\left({\frac {\sigma t}{\sqrt {2}}}\right)\!+\!1\right)}$ ${\displaystyle 1\!-\!\sigma te^{-\sigma ^{2}t^{2}/2}{\sqrt {\frac {\pi }{2}}}\!\left({\textrm {erfi}}\!\left({\frac {\sigma t}{\sqrt {2}}}\right)\!-\!i\right)}$

In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution. It can arise when a two-dimensional vector (e.g. wind velocity) has elements that are normally distributed, are uncorrelated, and have equal variance. The vector’s magnitude (e.g. wind speed) will then have a Rayleigh distribution. The distribution can also arise in the case of random complex numbers whose real and imaginary components are i.i.d. Gaussian. In that case, the modulus of the complex number is Rayleigh-distributed. The distribution was so named after Lord Rayleigh.

The Rayleigh probability density function is

${\displaystyle f(x|\sigma )={\frac {x\exp \left({\frac {-x^{2}}{2\sigma ^{2}}}\right)}{\sigma ^{2}}}}$

for ${\displaystyle x\in [0,\infty ).}$

## Properties

The raw moments are given by:

${\displaystyle \mu _{k}=\sigma ^{k}2^{k/2}\,\Gamma (1+k/2)\,}$

where ${\displaystyle \Gamma (z)}$ is the Gamma function.

The mean and variance of a Rayleigh random variable may be expressed as:

${\displaystyle \mu (X)=\sigma {\sqrt {\frac {\pi }{2}}}\,}$

and

${\displaystyle {\textrm {var}}(X)={\frac {4-\pi }{2}}\sigma ^{2}\,.}$

The skewness is given by:

${\displaystyle \gamma _{1}={\frac {2{\sqrt {\pi }}(\pi -3)}{(4-\pi )^{3/2}}}.}$

The excess kurtosis is given by:

${\displaystyle \gamma _{2}=-{\frac {6\pi ^{2}-24\pi +16}{(4-\pi )^{2}}}.}$

The characteristic function is given by:

${\displaystyle \varphi (t)=}$
${\displaystyle 1\!-\!\sigma te^{-\sigma ^{2}t^{2}/2}{\sqrt {\frac {\pi }{2}}}\!\left({\textrm {erfi}}\!\left({\frac {\sigma t}{\sqrt {2}}}\right)\!-\!i\right)}$

where ${\displaystyle \operatorname {erfi} (z)}$ is the complex error function. The moment generating function is given by

${\displaystyle M(t)=\,}$
${\displaystyle 1+\sigma t\,e^{\sigma ^{2}t^{2}/2}{\sqrt {\frac {\pi }{2}}}\left({\textrm {erf}}\left({\frac {\sigma t}{\sqrt {2}}}\right)\!+\!1\right),}$

where ${\displaystyle \operatorname {erf} (z)}$ is the error function.

### Information entropy

The information entropy is given by

${\displaystyle H=1+\ln \left({\frac {\sigma }{\sqrt {2}}}\right)+{\frac {\gamma }{2}}}$

where ${\displaystyle \gamma }$ is the Euler–Mascheroni constant.

## Parameter estimation

Given N independent and identically distributed Rayleigh random variables with parameter ${\displaystyle \sigma }$, the maximum likelihood estimate of ${\displaystyle \sigma }$ is

${\displaystyle {\hat {\sigma }}={\sqrt {{\frac {1}{2N}}\sum _{i=1}^{N}x_{i}^{2}}}.}$

## Related distributions

• ${\displaystyle R\sim \mathrm {Rayleigh} (\sigma )}$ is a Rayleigh distribution if ${\displaystyle R={\sqrt {X^{2}+Y^{2}}}}$ where ${\displaystyle X\sim N(0,\sigma ^{2})}$ and ${\displaystyle Y\sim N(0,\sigma ^{2})}$ are two independent normal distributions. (This gives motivation to the use of the symbol "sigma" in the above parameterization of the Rayleigh density.)
• If ${\displaystyle R\sim \mathrm {Rayleigh} (1)}$ then ${\displaystyle R^{2}}$ has a chi-square distribution with two degrees of freedom: ${\displaystyle R^{2}\sim \chi _{2}^{2}}$
• If ${\displaystyle X}$ has an exponential distribution ${\displaystyle X\sim \mathrm {Exponential} (x|\lambda )}$ then ${\displaystyle Y={\sqrt {2X\sigma ^{2}\lambda }}\sim \mathrm {Rayleigh} (y|\sigma )}$.
• If ${\displaystyle R\sim \mathrm {Rayleigh} (\sigma )}$ then ${\displaystyle \sum _{i=1}^{N}R_{i}^{2}}$ has a gamma distribution with parameters ${\displaystyle N}$ and ${\displaystyle 2\sigma ^{2}}$: ${\displaystyle [Y=\sum _{i=1}^{N}R_{i}^{2}]\sim \Gamma (N,2\sigma ^{2})}$.