What is the Rayleigh distribution?
The Rayleigh distribution is a continuous probability distribution for non-negative values, defined by a single scale parameter \(\sigma\) (sigma). It naturally arises as the magnitude of a two-dimensional vector whose components are independent, zero-mean, equal-variance normal random variables. It is widely used in signal processing (fading channels), wind-speed modeling, MRI noise, and reliability engineering.
How to use this calculator
Enter the value x at which you want the density and cumulative probability, and the scale parameter \(\sigma\). The calculator returns the PDF \(f(x)\), the CDF \(F(x)\), and the distribution's mean, variance, median and mode. Both \(x\) and \(\sigma\) must be non-negative, and \(\sigma\) must be greater than zero.
The formulas explained
The probability density is $$f(x) = \frac{x}{\sigma^{2}}\, \exp\!\left(-\frac{x^{2}}{2\,\sigma^{2}}\right)$$ for \(x \geq 0\). The cumulative distribution is $$F(x) = 1 - \exp\!\left(-\frac{x^{2}}{2\,\sigma^{2}}\right)$$ Key summary statistics are: $$\begin{aligned} \mu &= \sigma\sqrt{\tfrac{\pi}{2}} \\[0.4em] \sigma_{x}^{2} &= \frac{4-\pi}{2}\,\sigma^{2} \\[0.4em] \text{Mode} &= \sigma \\[0.4em] \text{Median} &= \sigma\sqrt{2\ln 2} \end{aligned}$$ Notice the mode equals \(\sigma\) exactly — the peak of the density always sits at \(x = \sigma\).
Worked example
Let \(\sigma = 1\) and \(x = 2\). Then \(x^{2}/(2\sigma^{2}) = 4/2 = 2\), so \(e^{-2} \approx 0.135335\). The PDF is $$\frac{2}{1}\cdot 0.135335 = 0.270671$$ The CDF is $$1 - 0.135335 = 0.864665$$ The mean is \(\sqrt{\pi/2} \approx 1.253314\), variance is \((4-\pi)/2 \approx 0.429204\), median is \(\sqrt{2\ln 2} \approx 1.177410\), and mode is \(1\).
FAQ
Is the Rayleigh distribution defined for negative x? No. It is supported only on \(x \geq 0\); the density is zero for negative values.
How does \(\sigma\) relate to the mean? The mean scales linearly with \(\sigma\): \(\mu = \sigma\sqrt{\pi/2} \approx 1.2533\,\sigma\).
What is the relationship to the normal distribution? If \(X\) and \(Y\) are independent \(N(0, \sigma^{2})\), then \(\sqrt{X^{2}+Y^{2}}\) follows a Rayleigh distribution with scale \(\sigma\).