The Rayleigh distribution is what randomness looks like when it has a magnitude but no direction — the length of a two-dimensional random walk step, the amplitude of noise, the wind speed over open ground. This Rayleigh distribution calculator takes the scale parameter σ and an x value, and returns the density, the cumulative probability P(X ≤ x), the tail probability, and the distribution’s landmarks: mode, median, mean and variance.
The Distribution and Its Formulas
A Rayleigh random variable has density f(x) = (x/σ²) · e^(−x²/(2σ²)) for x ≥ 0, and cumulative probability F(x) = 1 − e^(−x²/(2σ²)) — one of the few distributions whose CDF needs no tables or numerical integration. Its landmarks are closed-form too: mode = σ, median = σ√(2 ln 2) ≈ 1.1774σ, mean = σ√(π/2) ≈ 1.2533σ, variance = (4 − π)/2 · σ² ≈ 0.4292σ². The default σ = 2, x = 2 runs the full set: density 0.3033, P(X ≤ 2) = 0.3935, mean 2.5066, median 2.3548. Notice the ordering — mode 2, median 2.35, mean 2.51 — the signature right skew of a distribution born at zero with a long upper tail.
Where the Rayleigh Comes From
Take two independent normal variables with the same spread σ — a dart’s horizontal and vertical misses, a radio signal’s in-phase and quadrature noise, the east and north components of wind error. The distance from the origin, √(X² + Y²), is Rayleigh with that same σ. This origin explains its empire: radar and communications (envelope of a narrowband signal), wind engineering (hourly wind speeds fit it well), target and error analysis, reliability of systems stressed in two dimensions, and ocean-wave heights, whose distribution is famously Rayleigh in deep water. Whenever a magnitude is built from two perpendicular Gaussian parts, this is the distribution that falls out.
Reading the Three Probabilities
The density f(x) is a rate, not a probability — useful for likelihoods and for seeing where the mass concentrates, meaningless as “the chance of exactly x” (always zero for a continuous distribution). The CDF F(x) is the working number: P(X ≤ x), the share of outcomes no larger than yours. And the tail 1 − F(x) prices the extreme: with σ = 2, P(X > 6) = e^(−36/8) ≈ 0.011 — about one outcome in ninety exceeds three sigmas. Engineers sizing for gusts, tolerances or signal fades live in that tail; the formula being closed-form means the calculator returns it exactly rather than interpolating a table.
Estimating σ From Data
Given measurements, σ can be estimated three consistent ways, and comparing them diagnoses fit: from the mean (σ ≈ mean ÷ 1.2533), from the median (σ ≈ median ÷ 1.1774), or by maximum likelihood, σ = √( (Σx²) ÷ (2n) ) — the root-mean-square of the data divided by √2. When the three estimates agree, the Rayleigh model is describing the data honestly; when the mean-based estimate towers over the median-based one, the data’s tail is fatter than Rayleigh allows (lognormal and Weibull country) and a one-parameter fit should not be trusted with extremes.
Relatives in the Family
The Rayleigh is the chi distribution with two degrees of freedom wearing engineering clothes. Set σ = 1 and scale, and it nests inside the Weibull family (Weibull with shape 2 is Rayleigh); its square is exponential; in three dimensions the same construction gives the Maxwell–Boltzmann speed distribution — the physics of gas molecules is this page’s mathematics with one more perpendicular component. Recognising the family resemblances keeps you from re-deriving what is already tabulated somewhere on this hub. It also explains the Rayleigh’s habit of appearing uninvited: any time a problem hands you the length of a two-component vector — resultant wind from component forecasts, total error from independent axis errors, signal strength from quadrature channels — the distribution on this page is already in the room, whether or not anyone named it.
Common Mistakes
Feeding the calculator a variance or a mean where σ belongs — the parameter is the scale of the underlying normal components, and the conversions live in the landmarks above. Expecting values below zero (impossible — magnitudes do not go negative, and a fitted data set containing negatives is not Rayleigh). Quoting the density as a probability. And forgetting that Rayleigh assumes the two components share σ and are independent: elliptical error patterns (one axis sloppier) need the more general Hoyt distribution.
Related Tools
The distribution family continues in the Statistics Calculators hub — the Conditional Probability Calculator handles the discrete side, and the Effect Size Calculator quantifies differences between groups.
Frequently Asked Questions
What is the Rayleigh distribution used for?
It models magnitudes built from two perpendicular Gaussian components: wind speeds, wave heights, signal envelopes in communications, target errors and noise amplitudes. If a length comes from a 2-D random process, Rayleigh is the default shape.
What are the mean and median of a Rayleigh distribution?
Mean = σ√(π/2) ≈ 1.2533σ and median = σ√(2 ln 2) ≈ 1.1774σ. For σ = 2: mean 2.5066, median 2.3548. The mode is exactly σ, so mode, median and mean march upward in that order — a right-skew signature.
How do you calculate P(X ≤ x) for a Rayleigh variable?
F(x) = 1 − e^(−x²/(2σ²)) — a closed form, no tables needed. At x = σ the value is 1 − e^(−1/2) ≈ 0.3935 for any σ, a useful landmark.
How do I estimate sigma from measurements?
Maximum likelihood gives σ = √(Σx² / 2n). Quick checks: divide the sample mean by 1.2533 or the sample median by 1.1774. If the three estimates disagree strongly, the data is not well described by a Rayleigh model.
Is the Rayleigh distribution symmetric?
No — it starts at zero, rises to its mode at σ, and tails off to the right. Its skewness is a fixed constant (about 0.631), independent of σ, which only stretches the axis.
What is the relationship between Rayleigh and Weibull?
A Weibull distribution with shape parameter 2 and scale λ is a Rayleigh distribution with σ = λ/√2. Rayleigh is also the chi distribution with two degrees of freedom, rescaled by σ.