Rayleigh Distribution Calculator

Enter the scale parameter σ and a value x to evaluate the Rayleigh distribution.

How it is calculated

Enter the scale parameter σ (greater than zero) and a point x (zero or more). The tool returns the density at that point, f(x) = (x ÷ σ²) × e−x² ÷ (2σ²), and the cumulative probability, F(x) = 1 − e−x² ÷ (2σ²), which is the chance that a Rayleigh variable is at most x. It also gives the distribution's mean σ × √(π ÷ 2), variance (4 − π) ÷ 2 × σ² and mode σ, which depend only on σ. Density and cumulative probability are shown to six decimals, the other three to four. Note that σ is not the standard deviation of the Rayleigh variable itself; it is the scale of the two underlying normal components. A density value is not a probability and can exceed 1 for a small σ.

Worked example

Take σ = 2 and x = 3. First, x² ÷ (2σ²) = 9 ÷ 8 = 1.125, and e−1.125 = 0.324652. Density: (3 ÷ 4) × 0.324652 = 0.243489. Cumulative probability: 1 − 0.324652 = 0.675348, so there is about a 67.5% chance the value is 3 or less. Mean: 2 × √(π ÷ 2) = 2.5066. Variance: (4 − π) ÷ 2 × 4 = 1.7168. Mode: 2.0000, the peak of the curve, equal to σ.

Try this example →

Common mistakes

  • Treating σ as the standard deviation of the Rayleigh variable. It is the scale parameter, and the actual standard deviation is the square root of the variance, about 0.655 × σ.
  • Reading the density as a probability. The value 0.243489 is a height of the curve; use the cumulative figure for the chance of staying below x.
  • Using the cumulative value for the chance of exceeding x. That chance is 1 − F(x), here 0.324652.
  • Entering a negative x. The Rayleigh distribution only exists for zero and above, so the tool gives no result.

About this calculator

The Rayleigh distribution describes the magnitude of a 2D vector whose components are independent, zero-mean, equally-scaled normal random variables. Its probability density function is f(x) = (x/σ²) × e^(−x²/2σ²) and its cumulative distribution function is F(x) = 1 − e^(−x²/2σ²), with mean = σ√(π/2), variance = (4−π)/2 × σ², and mode = σ.

Wireless communications engineers use it to model signal amplitude fading in environments with many scattered, reflected signal paths and no dominant line-of-sight (Rayleigh fading), meteorologists use it to model wind speed distributions, and reliability engineers use it for failure-time analysis when a failure rate increases linearly with time.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    Sigma is the mode of a Rayleigh curve, not its average or its spread. With sigma 2 the tool reports a mode of 2.0000, a mean of 2.5066 and a variance of 1.7168, so a measured mean must be divided by about 1.2533 before it estimates sigma. The shape suits the length of a two-dimensional vector with equal, centred errors, such as wind speed components. What data are you trying to fit with it?

Popular calculators

All Calculators