Rayleigh distribution

From Wikipedia, the free encyclopedia

Rayleigh
Probability density function
Plot of the Rayleigh PDF
Cumulative distribution function
Plot of the Rayleigh CDF
Parameters \sigma>0\,
Support x\in [0;\infty)
Probability density function (pdf) \frac{x \exp\left(\frac{-x^2}{2\sigma^2}\right)}{\sigma^2}
Cumulative distribution function (cdf) 1-\exp\left(\frac{-x^2}{2\sigma^2}\right)
Mean \sigma \sqrt{\frac{\pi}{2}}
Median \sigma\sqrt{\ln(4)}\,
Mode \sigma\,
Variance \frac{4 - \pi}{2} \sigma^2
Skewness \frac{2\sqrt{\pi}(\pi - 3)}{(4-\pi)^{3/2}}
Excess kurtosis -\frac{6\pi^2 - 24\pi +16}{(4-\pi)^2}
Entropy 1+\ln\left(\frac{\sigma}{\sqrt{2}}\right)+\frac{\gamma}{2}
Moment-generating function (mgf) 1+\sigma t\,e^{\sigma^2t^2/2}\sqrt{\frac{\pi}{2}}
\left(\textrm{erf}\left(\frac{\sigma t}{\sqrt{2}}\right)\!+\!1\right)
Characteristic function 1\!-\!\sigma te^{-\sigma^2t^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

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

for x \in [0,\infty).

Contents

[edit] Properties

The raw moments are given by:

\mu_k=\sigma^k2^{k/2}\,\Gamma(1+k/2)\,

where Γ(z) is the Gamma function.

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

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

and

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

The skewness is given by:

\gamma_1=\frac{2\sqrt{\pi}(\pi - 3)}{(4-\pi)^{3/2}}.

The excess kurtosis is given by:

\gamma_2=-\frac{6\pi^2 - 24\pi +16}{(4-\pi)^2}.


The characteristic function is given by:

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

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

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

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

[edit] Information entropy

The information entropy is given by


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

where γ is the Euler–Mascheroni constant.

[edit] Parameter estimation

Given N independent and identically distributed Rayleigh random variables with parameter σ, the maximum likelihood estimate of σ is

\hat{\sigma}=\sqrt{\frac{1}{2N}\sum_{i=1}^N x_i^2}.

[edit] Generating Rayleigh-distributed random variates

Given a random variate U drawn from the uniform distribution in the interval (0, 1), then the variate

X=\sigma\sqrt{-2ln(1-U)}\,

has a Rayleigh distribution with parameter σ. This follows from the form of the cumulative distribution function. Given that U is uniform, (1–U) has the same uniformity and the above may be simplified to

X=\sigma\sqrt{-2ln(U)}.

Note that if you are generating random numbers belonging to (0,1), exclude zero values to avoid the natural log of zero.

[edit] Related distributions

[edit] See also