Rayleigh distribution

From HandWiki
Short description: Probability distribution
Rayleigh
Probability density function
Plot of the Rayleigh PDF
Cumulative distribution function
Plot of the Rayleigh CDF
Parameters scale: [math]\displaystyle{ \sigma\gt 0 }[/math]
Support [math]\displaystyle{ x\in [0,\infty) }[/math]
PDF [math]\displaystyle{ \frac{x}{\sigma^2} e^{-x^2/\left(2\sigma^2\right)} }[/math]
CDF [math]\displaystyle{ 1 - e^{-x^2/\left(2\sigma^2\right)} }[/math]
Quantile [math]\displaystyle{ Q(F;\sigma)=\sigma \sqrt{-2\ln(1 - F)} }[/math]
Mean [math]\displaystyle{ \sigma \sqrt{\frac{\pi}{2}} }[/math]
Median [math]\displaystyle{ \sigma\sqrt{2\ln(2)} }[/math]
Mode [math]\displaystyle{ \sigma }[/math]
Variance [math]\displaystyle{ \frac{4 - \pi}{2} \sigma^2 }[/math]
Skewness [math]\displaystyle{ \frac{2\sqrt{\pi}(\pi - 3)}{(4-\pi)^{3/2}} }[/math]
Ex. kurtosis [math]\displaystyle{ -\frac{6\pi^2 - 24\pi +16}{(4-\pi)^2} }[/math]
Entropy [math]\displaystyle{ 1+\ln\left(\frac{\sigma}{\sqrt{2}}\right)+\frac{\gamma}{2} }[/math]
MGF [math]\displaystyle{ 1+\sigma te^{\sigma^2t^2/2}\sqrt{\frac{\pi}{2}} \left(\operatorname{erf}\left(\frac{\sigma t}{\sqrt{2}}\right) + 1\right) }[/math]
CF [math]\displaystyle{ 1 - \sigma te^{-\sigma^2t^2/2}\sqrt{\frac{\pi}{2}} \left(\operatorname{erfi} \left(\frac{\sigma t}{\sqrt{2}}\right) - i\right) }[/math]

In probability theory and statistics, the Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom. The distribution is named after Lord Rayleigh (/ˈrli/).[1]

A Rayleigh distribution is often observed when the overall magnitude of a vector is related to its directional components. One example where the Rayleigh distribution naturally arises is when wind velocity is analyzed in two dimensions. Assuming that each component is uncorrelated, normally distributed with equal variance, and zero mean, then the overall wind speed (vector magnitude) will be characterized by a Rayleigh distribution. A second example of the distribution arises in the case of random complex numbers whose real and imaginary components are independently and identically distributed Gaussian with equal variance and zero mean. In that case, the absolute value of the complex number is Rayleigh-distributed.

Definition

The probability density function of the Rayleigh distribution is[2]

[math]\displaystyle{ f(x;\sigma) = \frac{x}{\sigma^2} e^{-x^2/(2\sigma^2)}, \quad x \geq 0, }[/math]

where [math]\displaystyle{ \sigma }[/math] is the scale parameter of the distribution. The cumulative distribution function is[2]

[math]\displaystyle{ F(x;\sigma) = 1 - e^{-x^2/(2\sigma^2)} }[/math]

for [math]\displaystyle{ x \in [0,\infty). }[/math]

Relation to random vector length

Consider the two-dimensional vector [math]\displaystyle{ Y = (U,V) }[/math] which has components that are bivariate normally distributed, centered at zero, and independent. Then [math]\displaystyle{ U }[/math] and [math]\displaystyle{ V }[/math] have density functions

[math]\displaystyle{ f_U(x; \sigma) = f_V(x;\sigma) = \frac{e^{-x^2/(2\sigma^2)}}{\sqrt{2\pi\sigma^2}}. }[/math]

Let [math]\displaystyle{ X }[/math] be the length of [math]\displaystyle{ Y }[/math]. That is, [math]\displaystyle{ X = \sqrt{U^2 + V^2}. }[/math] Then [math]\displaystyle{ X }[/math] has cumulative distribution function

[math]\displaystyle{ F_X(x; \sigma) = \iint_{D_x} f_U(u;\sigma) f_V(v;\sigma) \,dA, }[/math]

where [math]\displaystyle{ D_x }[/math] is the disk

[math]\displaystyle{ D_x = \left\{(u,v) : \sqrt{u^2 + v^2} \leq x\right\}. }[/math]

Writing the double integral in polar coordinates, it becomes

[math]\displaystyle{ F_X(x; \sigma) = \frac{1}{2\pi\sigma^2} \int_0^{2\pi} \int_0^x r e^{-r^2/(2\sigma^2)} \,dr\,d\theta = \frac 1 {\sigma^2} \int_0^x r e^{-r^2/(2\sigma^2)} \,dr. }[/math]

Finally, the probability density function for [math]\displaystyle{ X }[/math] is the derivative of its cumulative distribution function, which by the fundamental theorem of calculus is

[math]\displaystyle{ f_X(x;\sigma) = \frac d {dx} F_X(x;\sigma) = \frac x {\sigma^2} e^{-x^2/(2\sigma^2)}, }[/math]

which is the Rayleigh distribution. It is straightforward to generalize to vectors of dimension other than 2. There are also generalizations when the components have unequal variance or correlations (Hoyt distribution), or when the vector Y follows a bivariate Student t-distribution (see also: Hotelling's T-squared distribution).[3]

Generalization to bivariate Student's t-distribution

Suppose [math]\displaystyle{ Y }[/math] is a random vector with components [math]\displaystyle{ u,v }[/math] that follows a multivariate t-distribution. If the components both have mean zero, equal variance, and are independent, the bivariate Student's-t distribution takes the form:

[math]\displaystyle{ f(u,v) = {1\over{2\pi\sigma^{2}}}\left( 1 + {u^{2}+v^{2}\over{\nu \sigma^{2}}} \right)^{-\nu/2-1} }[/math]

Let [math]\displaystyle{ R = \sqrt{U^{2}+V^{2}} }[/math] be the magnitude of [math]\displaystyle{ Y }[/math]. Then the cumulative distribution function (CDF) of the magnitude is:

[math]\displaystyle{ F(r) = {1\over{2\pi\sigma^{2}}}\iint_{D_{r}} \left( 1 + {u^{2}+v^{2}\over{\nu \sigma^{2}}} \right)^{-\nu/2-1}du \; dv }[/math]

where [math]\displaystyle{ D_{r} }[/math] is the disk defined by:

[math]\displaystyle{ D_{r} = \left\{ (u,v) : \sqrt{u^{2}+v^{2}} \leq r \right\} }[/math]

Converting to polar coordinates leads to the CDF becoming:

[math]\displaystyle{ \begin{aligned} F(r) &= {1\over{2\pi\sigma^{2}}}\int_{0}^{r}\int_{0}^{2\pi} \rho\left( 1 + {\rho^{2}\over{\nu \sigma^{2}}} \right)^{-\nu/2-1}d\theta \; d\rho \\ &= {1\over{\sigma^{2}}}\int_{0}^{r}\rho\left( 1 + {\rho^{2}\over{\nu \sigma^{2}}} \right)^{-\nu/2-1} d\rho \\ &= 1-\left( 1 + {r^{2}\over{\nu \sigma^{2}}} \right)^{-\nu/2} \end{aligned} }[/math]

Finally, the probability density function (PDF) of the magnitude may be derived:

[math]\displaystyle{ f(r) = F'(r) = {r\over{\sigma^{2}}} \left( 1 + {r^{2}\over{\nu \sigma^{2}}} \right)^{-\nu/2-1} }[/math]

In the limit as [math]\displaystyle{ \nu \rightarrow \infty }[/math], the Rayleigh distribution is recovered because:

[math]\displaystyle{ \lim_{\nu\rightarrow \infty} \left( 1 + {r^{2}\over{\nu \sigma^{2}}} \right)^{-\nu/2-1} = e^{-r^{2}/2\sigma^{2}} }[/math]

Properties

The raw moments are given by:

[math]\displaystyle{ \mu_j = \sigma^j2^{j/2}\,\Gamma\left(1 + \frac j 2\right), }[/math]

where [math]\displaystyle{ \Gamma(z) }[/math] is the gamma function.

The mean of a Rayleigh random variable is thus :

[math]\displaystyle{ \mu(X) = \sigma \sqrt{\frac{\pi}{2}}\ \approx 1.253\ \sigma. }[/math]

The standard deviation of a Rayleigh random variable is:

[math]\displaystyle{ \operatorname{std}(X) = \sqrt{\left (2-\frac{\pi}{2}\right)} \sigma \approx 0.655\ \sigma }[/math]

The variance of a Rayleigh random variable is :

[math]\displaystyle{ \operatorname{var}(X) = \mu_2-\mu_1^2 = \left(2-\frac{\pi}{2}\right) \sigma^2 \approx 0.429\ \sigma^2 }[/math]

The mode is [math]\displaystyle{ \sigma, }[/math] and the maximum pdf is

[math]\displaystyle{ f_{\max} = f(\sigma;\sigma) = \frac{1}{\sigma} e^{-1/2} \approx \frac{0.606}{\sigma}. }[/math]

The skewness is given by:

[math]\displaystyle{ \gamma_1 = \frac{2\sqrt{\pi}(\pi - 3)}{(4 - \pi)^{3/2}} \approx 0.631 }[/math]

The excess kurtosis is given by:

[math]\displaystyle{ \gamma_2 = -\frac{6\pi^2 - 24\pi + 16}{(4 - \pi)^2} \approx 0.245 }[/math]

The characteristic function is given by:

[math]\displaystyle{ \varphi(t) = 1 - \sigma te^{-\frac{1}{2}\sigma^2t^2}\sqrt{\frac{\pi}{2}} \left[\operatorname{erfi}\left(\frac{\sigma t}{\sqrt{2}}\right) - i\right] }[/math]

where [math]\displaystyle{ \operatorname{erfi}(z) }[/math] is the imaginary error function. The moment generating function is given by

[math]\displaystyle{ M(t) = 1 + \sigma t\,e^{\frac{1}{2}\sigma^2t^2}\sqrt{\frac{\pi}{2}} \left[\operatorname{erf}\left(\frac{\sigma t}{\sqrt{2}}\right) + 1\right] }[/math]

where [math]\displaystyle{ \operatorname{erf}(z) }[/math] is the error function.

Differential entropy

The differential entropy is given by

[math]\displaystyle{ H = 1 + \ln\left(\frac \sigma {\sqrt{2}}\right) + \frac \gamma 2 }[/math]

where [math]\displaystyle{ \gamma }[/math] is the Euler–Mascheroni constant.

Parameter estimation

Given a sample of N independent and identically distributed Rayleigh random variables [math]\displaystyle{ x_i }[/math] with parameter [math]\displaystyle{ \sigma }[/math],

[math]\displaystyle{ \widehat{\sigma}^2 = \!\,\frac{1}{2N}\sum_{i=1}^N x_i^2 }[/math] is the maximum likelihood estimate and also is unbiased.
[math]\displaystyle{ \widehat{\sigma}\approx \sqrt{\frac 1 {2N} \sum_{i=1}^N x_i^2} }[/math] is a biased estimator that can be corrected via the formula
[math]\displaystyle{ \sigma = \widehat{\sigma} \frac {\Gamma(N)\sqrt{N}} {\Gamma(N + \frac 1 2)} = \widehat{\sigma} \frac {4^N N!(N-1)!\sqrt{N}} {(2N)!\sqrt{\pi}} }[/math][4]

Confidence intervals

To find the (1 − α) confidence interval, first find the bounds [math]\displaystyle{ [a,b] }[/math] where:

  [math]\displaystyle{ P(\chi_{2N}^2 \leq a) = \alpha/2, \quad P(\chi_{2N}^2 \leq b) = 1 - \alpha/2 }[/math]

then the scale parameter will fall within the bounds

  [math]\displaystyle{ \frac{{N}\overline{x^2}}{b} \leq {\widehat\sigma}^2 \leq \frac{{N}\overline{x^2}}{a} }[/math][5]

Generating random variates

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

[math]\displaystyle{ X=\sigma\sqrt{-2 \ln U}\, }[/math]

has a Rayleigh distribution with parameter [math]\displaystyle{ \sigma }[/math]. This is obtained by applying the inverse transform sampling-method.

Related distributions

  • [math]\displaystyle{ R \sim \mathrm{Rayleigh}(\sigma) }[/math] is Rayleigh distributed if [math]\displaystyle{ R = \sqrt{X^2 + Y^2} }[/math], where [math]\displaystyle{ X \sim N(0, \sigma^2) }[/math] and [math]\displaystyle{ Y \sim N(0, \sigma^2) }[/math] are independent normal random variables.[6] (This gives motivation to the use of the symbol "sigma" in the above parametrization of the Rayleigh density.)
  • The magnitude [math]\displaystyle{ |z| }[/math] of a standard complex normally distributed variable z will have the Rayleigh distribution.
  • The chi distribution with v = 2 is equivalent to the Rayleigh Distribution with σ = 1.
  • If [math]\displaystyle{ R \sim \mathrm{Rayleigh} (1) }[/math], then [math]\displaystyle{ R^2 }[/math] has a chi-squared distribution with parameter [math]\displaystyle{ N }[/math], degrees of freedom, equal to two (N = 2)
[math]\displaystyle{ [Q=R^2] \sim \chi^2(N)\ . }[/math]
  • If [math]\displaystyle{ R \sim \mathrm{Rayleigh}(\sigma) }[/math], then [math]\displaystyle{ \sum_{i=1}^N R_i^2 }[/math] has a gamma distribution with parameters [math]\displaystyle{ N }[/math] and [math]\displaystyle{ \frac{1}{2\sigma^2} }[/math]
[math]\displaystyle{ \left[Y=\sum_{i=1}^N R_i^2\right] \sim \Gamma(N,\frac{1}{2\sigma^2}) . }[/math]
  • The Rice distribution is a noncentral generalization of the Rayleigh distribution: [math]\displaystyle{ \mathrm{Rayleigh}(\sigma) = \mathrm{Rice}(0,\sigma) }[/math].
  • The Weibull distribution with the "shape parameter" k=2 yields a Rayleigh distribution. Then the Rayleigh distribution parameter [math]\displaystyle{ \sigma }[/math] is related to the Weibull scale parameter according to [math]\displaystyle{ \lambda = \sigma \sqrt{2} . }[/math]
  • The Maxwell–Boltzmann distribution describes the magnitude of a normal vector in three dimensions.
  • If [math]\displaystyle{ X }[/math] has an exponential distribution [math]\displaystyle{ X \sim \mathrm{Exponential}(\lambda) }[/math], then [math]\displaystyle{ Y=\sqrt{X} \sim \mathrm{Rayleigh}(1/\sqrt{2\lambda}) . }[/math]

Applications

An application of the estimation of σ can be found in magnetic resonance imaging (MRI). As MRI images are recorded as complex images but most often viewed as magnitude images, the background data is Rayleigh distributed. Hence, the above formula can be used to estimate the noise variance in an MRI image from background data.[7] [8]

The Rayleigh distribution was also employed in the field of nutrition for linking dietary nutrient levels and human and animal responses. In this way, the parameter σ may be used to calculate nutrient response relationship.[9]

In the field of ballistics, the Rayleigh distribution is used for calculating the circular error probable - a measure of a weapon's precision.

In physical oceanography, the distribution of significant wave height approximately follows a Rayleigh distribution.[10]

See also

References

  1. "The Wave Theory of Light", Encyclopedic Britannica 1888; "The Problem of the Random Walk", Nature 1905 vol.72 p.318
  2. 2.0 2.1 Papoulis, Athanasios; Pillai, S. (2001) Probability, Random Variables and Stochastic Processes. ISBN 0073660116, ISBN 9780073660110
  3. Röver, C. (2011). "Student-t based filter for robust signal detection". Physical Review D 84 (12): 122004. doi:10.1103/physrevd.84.122004. Bibcode2011PhRvD..84l2004R. 
  4. Siddiqui, M. M. (1964) "Statistical inference for Rayleigh distributions", The Journal of Research of the National Bureau of Standards, Sec. D: Radio Science, Vol. 68D, No. 9, p. 1007
  5. Siddiqui, M. M. (1961) "Some Problems Connected With Rayleigh Distributions", The Journal of Research of the National Bureau of Standards; Sec. D: Radio Propagation, Vol. 66D, No. 2, p. 169
  6. Hogema, Jeroen (2005) "Shot group statistics"
  7. Sijbers, J.; den Dekker, A. J.; Raman, E.; Van Dyck, D. (1999). "Parameter estimation from magnitude MR images". International Journal of Imaging Systems and Technology 10 (2): 109–114. doi:10.1002/(sici)1098-1098(1999)10:2<109::aid-ima2>3.0.co;2-r. 
  8. den Dekker, A. J.; Sijbers, J. (2014). "Data distributions in magnetic resonance images: a review". Physica Medica 30 (7): 725–741. doi:10.1016/j.ejmp.2014.05.002. PMID 25059432. 
  9. Ahmadi, Hamed (2017-11-21). "A mathematical function for the description of nutrient-response curve". PLOS ONE 12 (11): e0187292. doi:10.1371/journal.pone.0187292. ISSN 1932-6203. PMID 29161271. Bibcode2017PLoSO..1287292A. 
  10. "Rayleigh Probability Distribution Applied to Random Wave Heights". United States Naval Academy. https://www.usna.edu/NAOE/_files/documents/Courses/EN330/Rayleigh-Probability-Distribution-Applied-to-Random-Wave-Heights.pdf.