The Rayleigh distribution is a continuous probability distribution for the magnitude of a two-dimensional vector whose components are independent, zero-mean normal variables. It arises for wind speeds, signal envelopes, and scattering amplitudes.
A random variable \(X\) follows a Rayleigh distribution with scale parameter \(\sigma > 0\) if
\[
X \sim \text{Rayleigh}(\sigma).
\]
2 Probability Density Function
The probability density function is
\[
f(x) = \frac{x}{\sigma^2}
\exp\!\left(-\frac{x^2}{2\sigma^2}\right),
\quad x \geq 0.
\]
Interpretation: The density vanishes at the origin, rises to a mode at \(x = \sigma\), and then decays like a Gaussian tail.
Plotting code
import numpy as npimport matplotlib.pyplot as pltimport seaborn as snsfrom scipy.stats import rayleighsns.set_style('whitegrid')sns.set_palette('Set2')x = np.linspace(0, 8, 400)fig, ax = plt.subplots(figsize=(7, 4))for sigma in (0.5, 1.0, 2.0): ax.plot(x, rayleigh.pdf(x, scale=sigma), lw=2, label=rf'$\sigma = {sigma}$')ax.set_xlabel('$x$')ax.set_ylabel('$f(x)$')ax.set_title('Rayleigh density')ax.legend()plt.show()
Density of the Rayleigh distribution for several scale parameters \(\sigma\).