Rayleigh Distribution Calculator
Enter the scale parameter sigma and a value x to compute the Rayleigh probability density (PDF) and cumulative probability (CDF) at that point. Switch the mode to find the quantile for a given probability, or view all the key statistical measures at once. The distribution curve updates live as you adjust sigma.
What is the Rayleigh distribution?
The Rayleigh distribution is a continuous probability distribution for non-negative values, parameterised by a single scale parameter sigma. It was originally derived by Lord Rayleigh in the context of acoustics, but it appears naturally whenever the magnitude of a two-dimensional vector is formed from two independent, zero-mean normal components with equal variance. If X and Y are independent N(0, sigma^2) random variables, then the magnitude sqrt(X^2 + Y^2) follows a Rayleigh distribution with parameter sigma. This connection makes the distribution fundamental in radio signal processing, wind speed modelling, wireless communications (Rayleigh fading channels), and structural reliability analysis.
How to use this calculator
Select a mode from the dropdown: "PDF and CDF at x" evaluates the density and cumulative probability at a specific point, "Quantile" finds the x-value corresponding to a given probability level, and "Statistical measures only" returns the full set of moments without needing an x input. Enter the scale parameter sigma (any positive number) and the relevant second input. All outputs update instantly. The PDF and CDF chart below the results shows both curves over the full range so you can see how changing sigma stretches or compresses the distribution. The worked-step panel shows every formula with your actual numbers substituted in.
Interpreting the scale parameter sigma
Sigma controls every aspect of the Rayleigh distribution. The mode (most likely value) equals sigma exactly, so you can think of sigma as the peak location. The mean is sigma * sqrt(pi/2), which is about 25% above sigma. The median is sigma * sqrt(2*ln(2)), very close to the mean. Because the distribution has only one parameter, the shape is always the same: right-skewed with skewness of about 0.631, regardless of sigma. The variance scales as sigma^2, so doubling sigma quadruples the variance and doubles the standard deviation. In wireless engineering, sigma represents the RMS amplitude of the in-phase and quadrature noise components, and the received signal envelope follows this distribution.
PDF, CDF, and the quantile function explained
The probability density function f(x) = (x / sigma^2) * exp(-x^2 / (2*sigma^2)) gives the relative likelihood of observing a value near x. It rises from zero at x = 0, peaks at x = sigma, and then decays toward zero. The cumulative distribution function F(x) = 1 - exp(-x^2 / (2*sigma^2)) gives the probability that a random draw falls at or below x, and it runs from 0 to 1 as x goes from 0 to infinity. The quantile function Q(p) = sigma * sqrt(-2 * ln(1-p)) is the exact inverse: given a probability p, it returns the x such that F(x) = p. This makes quantile computation very cheap compared with distributions that require numerical root-finding.
Key Rayleigh distribution formulas
| Quantity | Formula | At sigma = 1 (approx.) |
|---|---|---|
| Mean | sigma * sqrt(pi / 2) | 1.2533 |
| Median | sigma * sqrt(2 * ln(2)) | 1.1774 |
| Mode | sigma | 1.0000 |
| Variance | sigma^2 * (4 - pi) / 2 | 0.4292 |
| Std Dev | sigma * sqrt((4 - pi) / 2) | 0.6551 |
| Skewness | 2*sqrt(pi)*(pi-3) / (4-pi)^(3/2) | 0.6311 |
| CDF F(x) | 1 - exp(-x^2 / (2*sigma^2)) | -- |
| PDF f(x) | (x/sigma^2) * exp(-x^2 / (2*sigma^2)) | -- |
| Quantile Q(p) | sigma * sqrt(-2 * ln(1 - p)) | -- |
All quantities are expressed in terms of the single scale parameter sigma (sigma > 0). The mode equals sigma exactly, making sigma easy to interpret as the most likely value.
Frequently asked questions
What is the difference between the Rayleigh and the Weibull distribution?
The Rayleigh distribution is a special case of the Weibull distribution with shape parameter k = 2 and scale parameter lambda = sigma * sqrt(2). The Weibull adds a shape parameter that lets it model increasing, constant, or decreasing hazard rates, whereas the Rayleigh always has an increasing hazard rate, meaning failure becomes more likely over time. Use the Rayleigh when you know the underlying physics implies two equal-variance normal components; use the Weibull for more general reliability modelling.
How does sigma affect the distribution?
Every measure of location and spread is proportional to sigma. The mean, median, mode, and standard deviation all scale linearly with sigma, and the variance scales with sigma squared. Doubling sigma shifts and widens the entire distribution without changing its shape: the skewness is always approximately 0.631. You can therefore compare two Rayleigh distributions simply by comparing their sigma values.
What is a Rayleigh fading channel in wireless communications?
In a wireless environment with many reflectors and no dominant line-of-sight path, the received signal amplitude follows a Rayleigh distribution. The in-phase and quadrature components of the signal each behave like independent Gaussian noise, so their combined magnitude has a Rayleigh envelope. The parameter sigma is the RMS value of each component. Rayleigh fading is the baseline model for urban multipath channels and is used to design and benchmark diversity schemes and coding strategies.
How is the CDF of the Rayleigh distribution related to the chi-squared distribution?
If X follows a Rayleigh distribution with scale sigma, then (X / sigma)^2 follows a chi-squared distribution with 2 degrees of freedom, which is the same as an exponential distribution with rate 1/2. This relationship gives a quick way to compute CDF values using exponential tables: F_Rayleigh(x; sigma) = 1 - exp(-x^2 / (2*sigma^2)), which matches the exponential CDF with rate 1/2 evaluated at x^2 / sigma^2.
Can the Rayleigh distribution model negative values?
No. The Rayleigh distribution is defined only for x greater than or equal to zero. It models the magnitude of a two-dimensional vector, which is always non-negative. If you need a distribution for values that can be negative, consider the normal or Cauchy distribution instead.