• Descriptive
    • Moments
    • Concentration
    • Central Tendency
    • Variability
    • Stem-and-Leaf Plot
    • Histogram & Frequency Table
    • Data Quality Forensics
    • Conditional EDA
    • Quantiles
    • Kernel Density Estimation
    • Normal QQ Plot
    • Bootstrap Plot

    • Multivariate Descriptive Statistics
  • Distributions
    • Binomial Probabilities
    • Geometric Probabilities
    • Negative Binomial Probabilities
    • Hypergeometric Probabilities
    • Multinomial Probabilities
    • Dirichlet
    • Poisson Probabilities

    • Exponential
    • Gamma
    • Erlang
    • Weibull
    • Rayleigh
    • Maxwell-Boltzmann
    • Lognormal
    • Pareto
    • Inverse Gamma
    • Inverse Chi-Square

    • Beta
    • Power
    • Beta Prime (Inv. Beta)
    • Triangular

    • Normal (area)
    • Logistic
    • Laplace
    • Cauchy (standard)
    • Cauchy (location-scale)
    • Gumbel
    • Fréchet
    • Generalized Extreme Value

    • Normal RNG
    • ML Fitting
    • Tukey Lambda PPCC
    • Box-Cox Normality Plot
    • Noncentral t
    • Noncentral F
    • Sample Correlation r

    • Empirical Tests
  • Hypotheses
    • Theoretical Aspects of Hypothesis Testing
    • Bayesian Inference
    • Minimum Sample Size

    • Empirical Tests
    • Multivariate (pair-wise) Testing
  • Models
    • Manual Model Building
    • Guided Model Building
  • Time Series
    • Time Series Plot
    • Decomposition
    • Exponential Smoothing

    • Blocked Bootstrap Plot
    • Mean Plot
    • (P)ACF
    • VRM
    • Standard Deviation-Mean Plot
    • Spectral Analysis
    • ARIMA

    • Cross Correlation Function
    • Granger Causality
  1. Probability Distributions
  2. 34  Rayleigh Distribution
  • Preface
  • Getting Started
    • 1  Introduction
    • 2  Why Do We Need Innovative Technology?
    • 3  Basic Definitions
    • 4  The Big Picture: Why We Analyze Data
  • Introduction to Probability
    • 5  Definitions of Probability
    • 6  Jeffreys’ axiom system
    • 7  Bayes’ Theorem
    • 8  Sensitivity and Specificity
    • 9  Naive Bayes Classifier
    • 10  Law of Large Numbers

    • 11  Problems
  • Probability Distributions
    • 12  Bernoulli Distribution
    • 13  Binomial Distribution
    • 14  Geometric Distribution
    • 15  Negative Binomial Distribution
    • 16  Hypergeometric Distribution
    • 17  Multinomial Distribution
    • 18  Poisson Distribution

    • 19  Uniform Distribution (Rectangular Distribution)
    • 20  Normal Distribution (Gaussian Distribution)
    • 21  Gaussian Naive Bayes Classifier
    • 22  Chi Distribution
    • 23  Chi-squared Distribution (1 parameter)
    • 24  Chi-squared Distribution (2 parameters)
    • 25  Student t-Distribution
    • 26  Fisher F-Distribution
    • 27  Exponential Distribution
    • 28  Lognormal Distribution
    • 29  Gamma Distribution
    • 30  Beta Distribution
    • 31  Weibull Distribution
    • 32  Pareto Distribution
    • 33  Inverse Gamma Distribution
    • 34  Rayleigh Distribution
    • 35  Erlang Distribution
    • 36  Logistic Distribution
    • 37  Laplace Distribution
    • 38  Gumbel Distribution
    • 39  Cauchy Distribution
    • 40  Triangular Distribution
    • 41  Power Distribution
    • 42  Beta Prime Distribution
    • 43  Sample Correlation Distribution
    • 44  Dirichlet Distribution
    • 45  Generalized Extreme Value (GEV) Distribution
    • 46  Frechet Distribution
    • 47  Noncentral t Distribution
    • 48  Noncentral F Distribution
    • 49  Inverse Chi-Squared Distribution
    • 50  Maxwell-Boltzmann Distribution
    • 51  Distribution Relationship Map

    • 52  Problems
  • Descriptive Statistics & Exploratory Data Analysis
    • 53  Types of Data
    • 54  Datasheets

    • 55  Frequency Plot (Bar Plot)
    • 56  Frequency Table
    • 57  Contingency Table
    • 58  Binomial Classification Metrics
    • 59  Confusion Matrix
    • 60  ROC Analysis

    • 61  Stem-and-Leaf Plot
    • 62  Histogram
    • 63  Data Quality Forensics
    • 64  Quantiles
    • 65  Central Tendency
    • 66  Variability
    • 67  Skewness & Kurtosis
    • 68  Concentration
    • 69  Notched Boxplot
    • 70  Scatterplot
    • 71  Pearson Correlation
    • 72  Rank Correlation
    • 73  Partial Pearson Correlation
    • 74  Simple Linear Regression
    • 75  Moments
    • 76  Quantile-Quantile Plot (QQ Plot)
    • 77  Normal Probability Plot
    • 78  Probability Plot Correlation Coefficient Plot (PPCC Plot)
    • 79  Box-Cox Normality Plot
    • 80  Kernel Density Estimation
    • 81  Bivariate Kernel Density Plot
    • 82  Conditional EDA: Panel Diagnostics
    • 83  Bootstrap Plot (Central Tendency)
    • 84  Survey Scores Rank Order Comparison
    • 85  Cronbach Alpha

    • 86  Equi-distant Time Series
    • 87  Time Series Plot (Run Sequence Plot)
    • 88  Mean Plot
    • 89  Blocked Bootstrap Plot (Central Tendency)
    • 90  Standard Deviation-Mean Plot
    • 91  Variance Reduction Matrix
    • 92  (Partial) Autocorrelation Function
    • 93  Periodogram & Cumulative Periodogram

    • 94  Problems
  • Hypothesis Testing
    • 95  Normal Distributions revisited
    • 96  The Population
    • 97  The Sample
    • 98  The One-Sided Hypothesis Test
    • 99  The Two-Sided Hypothesis Test
    • 100  When to use a one-sided or two-sided test?
    • 101  What if \(\sigma\) is unknown?
    • 102  The Central Limit Theorem (revisited)
    • 103  Statistical Test of the Population Mean with known Variance
    • 104  Statistical Test of the Population Mean with unknown Variance
    • 105  Statistical Test of the Variance
    • 106  Statistical Test of the Population Proportion
    • 107  Statistical Test of the Standard Deviation \(\sigma\)
    • 108  Statistical Test of the difference between Means -- Independent/Unpaired Samples
    • 109  Statistical Test of the difference between Means -- Dependent/Paired Samples
    • 110  Statistical Test of the difference between Variances -- Independent/Unpaired Samples

    • 111  Hypothesis Testing for Research Purposes
    • 112  Decision Thresholds, Alpha, and Confidence Levels
    • 113  Bayesian Inference for Decision-Making
    • 114  One Sample t-Test
    • 115  Skewness & Kurtosis Tests
    • 116  Paired Two Sample t-Test
    • 117  Wilcoxon Signed-Rank Test
    • 118  Unpaired Two Sample t-Test
    • 119  Unpaired Two Sample Welch Test
    • 120  Two One-Sided Tests (TOST) for Equivalence
    • 121  Mann-Whitney U test (Wilcoxon Rank-Sum Test)
    • 122  Bayesian Two Sample Test
    • 123  Median Test based on Notched Boxplots
    • 124  Chi-Squared Tests for Count Data
    • 125  Kolmogorov-Smirnov Test
    • 126  One Way Analysis of Variance (1-way ANOVA)
    • 127  Kruskal-Wallis Test
    • 128  Two Way Analysis of Variance (2-way ANOVA)
    • 129  Repeated Measures ANOVA
    • 130  Friedman Test
    • 131  Testing Correlations
    • 132  A Note on Causality

    • 133  Problems
  • Regression Models
    • 134  Simple Linear Regression Model (SLRM)
    • 135  Multiple Linear Regression Model (MLRM)
    • 136  Logistic Regression
    • 137  Generalized Linear Models
    • 138  Multinomial and Ordinal Logistic Regression
    • 139  Cox Proportional Hazards Regression
    • 140  Conditional Inference Trees
    • 141  Leaf Diagnostics for Conditional Inference Trees
    • 142  Conditional Random Forests
    • 143  Hypothesis Testing with Linear Regression Models (from a Practical Point of View)

    • 144  Problems
  • Introduction to Time Series Analysis
    • 145  Case: the Market of Health and Personal Care Products
    • 146  Decomposition of Time Series
    • 147  Ad hoc Forecasting of Time Series
  • Box-Jenkins Analysis
    • 148  Introduction to Box-Jenkins Analysis
    • 149  Theoretical Concepts
    • 150  Stationarity
    • 151  Identifying ARMA parameters
    • 152  Estimating ARMA Parameters and Residual Diagnostics
    • 153  Forecasting with ARIMA models
    • 154  Intervention Analysis
    • 155  Cross-Correlation Function
    • 156  Transfer Function Noise Models
    • 157  General-to-Specific Modeling
  • Model Building Strategies
    • 158  Introduction to Model Building Strategies
    • 159  Manual Model Building
    • 160  Model Validation
    • 161  Regularization Methods
    • 162  Hyperparameter Optimization Strategies
    • 163  Guided Model Building in Practice
    • 164  Diagnostics, Revision, and Guided Forecasting
    • 165  Leakage, Target Encoding, and Robust Regression
  • References
  • Appendices
    • Appendices
    • A  Method Selection Guide
    • B  Presentations and Teaching Materials
    • C  R Language Concepts for Statistical Computing
    • D  Matrix Algebra
    • E  Standard Normal Table (Gaussian Table)
    • F  Critical values of Student’s \(t\) distribution with \(\nu\) degrees of freedom
    • G  Upper-tail critical values of the \(\chi^2\)-distribution with \(\nu\) degrees of freedom
    • H  Lower-tail critical values of the \(\chi^2\)-distribution with \(\nu\) degrees of freedom

Table of contents

  • 34.1 Probability Density Function
  • 34.2 Purpose
  • 34.3 Distribution Function
  • 34.4 Moment Generating Function
  • 34.5 1st Uncentered Moment
  • 34.6 2nd Uncentered Moment
  • 34.7 3rd Uncentered Moment
  • 34.8 4th Uncentered Moment
  • 34.9 2nd Centered Moment
  • 34.10 3rd Centered Moment
  • 34.11 4th Centered Moment
  • 34.12 Expected Value
  • 34.13 Variance
  • 34.14 Median
  • 34.15 Mode
  • 34.16 Coefficient of Skewness
  • 34.17 Coefficient of Kurtosis
  • 34.18 Parameter Estimation
  • 34.19 R Module
    • 34.19.1 RFC
    • 34.19.2 Direct app link
    • 34.19.3 R Code
  • 34.20 Example
  • 34.21 Random Number Generator
  • 34.22 Property 1: Special Case of Weibull
  • 34.23 Property 2: 2D Gaussian Magnitude
  • 34.24 Property 3: Constant Coefficient of Variation
  • 34.25 Related Distributions 1: Weibull Distribution
  • 34.26 Related Distributions 2: Chi Distribution
  • 34.27 Related Distributions 3: Maxwell-Boltzmann Distribution
  1. Probability Distributions
  2. 34  Rayleigh Distribution

34  Rayleigh Distribution

The Rayleigh distribution describes the magnitude (length) of a two-dimensional vector whose components are independent zero-mean Gaussian random variables. It is the standard model for signal envelope in wireless communications and for wind speed distributions.

Formally, the random variate \(X\) defined for the range \(X \in [0, \infty)\), is said to have a Rayleigh Distribution (i.e. \(X \sim \text{Rayleigh}(\sigma)\)) with scale parameter \(\sigma > 0\). If \(X_1, X_2 \overset{\text{i.i.d.}}{\sim} N(0, \sigma^2)\) then \(\sqrt{X_1^2 + X_2^2} \sim \text{Rayleigh}(\sigma)\).

34.1 Probability Density Function

\[ f(x) = \frac{x}{\sigma^2}\exp\!\left(-\frac{x^2}{2\sigma^2}\right), \quad x \geq 0 \]

The figure below shows examples of the Rayleigh Probability Density Function for different scale values.

Code
drayleigh <- function(x, sigma) {
  ifelse(x >= 0, x / sigma^2 * exp(-x^2 / (2 * sigma^2)), 0)
}

par(mfrow = c(2, 2))
x <- seq(0, 12, length = 500)

plot(x, drayleigh(x, 1), type = "l", lwd = 2, col = "blue",
     xlab = "x", ylab = "f(x)", main = expression(sigma == 1))

plot(x, drayleigh(x, 2), type = "l", lwd = 2, col = "blue",
     xlab = "x", ylab = "f(x)", main = expression(sigma == 2))

plot(x, drayleigh(x, 3), type = "l", lwd = 2, col = "blue",
     xlab = "x", ylab = "f(x)", main = expression(sigma == 3))

plot(x, drayleigh(x, 5), type = "l", lwd = 2, col = "blue",
     xlab = "x", ylab = "f(x)", main = expression(sigma == 5))

par(mfrow = c(1, 1))
Figure 34.1: Rayleigh Probability Density Function for various scale values

34.2 Purpose

The Rayleigh distribution models the Euclidean magnitude of a 2D random vector with independent, equal-variance Gaussian components. Its elegant mathematical form and connection to the Normal distribution make it ideal for modeling magnitude quantities in physics, engineering, and communications. Common applications include:

  • Wireless communications: envelope of a narrowband signal with Rayleigh fading
  • Wind energy: marginal distribution of wind speed for power generation modeling
  • Underwater acoustics: noise envelope in sonar systems
  • Optics: speckle patterns in laser imaging
  • Navigation: radial positioning error from two independent Gaussian components

Relation to the discrete setting. The Rayleigh distribution models continuous 2D Euclidean magnitude; the closest discrete analog is a 2D random walk return distance. Conceptually related to the Geometric distribution as both model “distance” to first event in their respective spaces.

34.3 Distribution Function

\[ F(x) = 1 - \exp\!\left(-\frac{x^2}{2\sigma^2}\right), \quad x \geq 0 \]

The figure below shows the Rayleigh Distribution Function for \(\sigma = 3\).

Code
prayleigh <- function(x, sigma) {
  ifelse(x >= 0, 1 - exp(-x^2 / (2 * sigma^2)), 0)
}

x <- seq(0, 12, length = 500)
plot(x, prayleigh(x, 3), type = "l", lwd = 2, col = "blue",
     xlab = "x", ylab = "F(x)", main = "Rayleigh Distribution Function",
     sub = expression(sigma == 3))
Figure 34.2: Rayleigh Distribution Function (sigma = 3)

34.4 Moment Generating Function

The moment generating function has no simple closed form. Raw moments are computed directly from the density:

\[ \mu_n' = \sigma^n\, 2^{n/2}\,\Gamma\!\left(1 + \frac{n}{2}\right) \]

34.5 1st Uncentered Moment

\[ \mu_1' = \sigma\sqrt{\frac{\pi}{2}} \]

34.6 2nd Uncentered Moment

\[ \mu_2' = 2\sigma^2 \]

34.7 3rd Uncentered Moment

\[ \mu_3' = \frac{3\sigma^3\sqrt{2\pi}}{2} \]

34.8 4th Uncentered Moment

\[ \mu_4' = 8\sigma^4 \]

34.9 2nd Centered Moment

\[ \mu_2 = \frac{(4-\pi)\sigma^2}{2} \]

34.10 3rd Centered Moment

\[ \mu_3 = \mu_3' - 3\mu_2'\mu_1' + 2(\mu_1')^3 \]

34.11 4th Centered Moment

\[ \mu_4 = \mu_4' - 4\mu_3'\mu_1' + 6\mu_2'(\mu_1')^2 - 3(\mu_1')^4 \]

34.12 Expected Value

\[ \text{E}(X) = \sigma\sqrt{\frac{\pi}{2}} \]

34.13 Variance

\[ \text{V}(X) = \frac{(4-\pi)\sigma^2}{2} \]

34.14 Median

\[ \text{Med}(X) = \sigma\sqrt{2\ln 2} \]

34.15 Mode

\[ \text{Mo}(X) = \sigma \]

The density has a unique maximum at \(x = \sigma\).

34.16 Coefficient of Skewness

\[ g_1 = \frac{2\sqrt{\pi}(\pi - 3)}{(4 - \pi)^{3/2}} \approx 0.631 \]

This is a fixed constant, independent of \(\sigma\).

34.17 Coefficient of Kurtosis

\[ g_2 = \frac{32 - 3\pi^2}{(4-\pi)^2} \approx 3.245089 \]

This is a fixed constant, independent of \(\sigma\). The corresponding excess kurtosis is \(g_2 - 3 \approx 0.245089\).

34.18 Parameter Estimation

The MLE of \(\sigma^2\) has an exact closed form:

\[ \hat\sigma^2 = \frac{1}{2n}\sum_{i=1}^n x_i^2 \]

set.seed(42)
sigma_true <- 5

# Simulate Rayleigh data via 2D Gaussian magnitude
x1 <- rnorm(100, 0, sigma_true)
x2 <- rnorm(100, 0, sigma_true)
x_obs <- sqrt(x1^2 + x2^2)

# MLE
sigma_hat <- sqrt(mean(x_obs^2) / 2)
cat("MLE sigma:", round(sigma_hat, 4), "\n")
cat("True sigma:", sigma_true, "\n")
MLE sigma: 4.8627 
True sigma: 5 

34.19 R Module

34.19.1 RFC

The Rayleigh Distribution module is available in RFC under the menu “Distributions / Rayleigh Distribution”.

34.19.2 Direct app link

  • https://shiny.wessa.net/rayleigh/

34.19.3 R Code

The following code demonstrates Rayleigh probability calculations:

sigma <- 5

drayleigh <- function(x, sigma) ifelse(x >= 0, x/sigma^2 * exp(-x^2/(2*sigma^2)), 0)
prayleigh <- function(x, sigma) ifelse(x >= 0, 1 - exp(-x^2/(2*sigma^2)), 0)
qrayleigh <- function(p, sigma) sigma * sqrt(-2 * log(1 - p))

# Density at x = 5
drayleigh(5, sigma)

# P(X <= 10)
prayleigh(10, sigma)

# P(gust > 10)
1 - prayleigh(10, sigma)

# Mean and mode
cat("Mean:", sigma * sqrt(pi / 2), "\n")
cat("Mode:", sigma, "\n")
[1] 0.1213061
[1] 0.8646647
[1] 0.1353353
Mean: 6.266571 
Mode: 5 

34.20 Example

Wind speeds at a coastal site are modeled as \(X \sim \text{Rayleigh}(\sigma = 5)\) m/s. The mean wind speed is \(\sigma\sqrt{\pi/2} \approx 6.27\) m/s. We compute the probability of a gust exceeding 10 m/s.

sigma <- 5
prayleigh <- function(x, sigma) ifelse(x >= 0, 1 - exp(-x^2/(2*sigma^2)), 0)

# P(gust > 10 m/s)
cat("P(gust > 10 m/s):", 1 - prayleigh(10, sigma), "\n")

# Mean wind speed
cat("Mean wind speed (m/s):", sigma * sqrt(pi / 2), "\n")

# Median wind speed
cat("Median wind speed (m/s):", sigma * sqrt(2 * log(2)), "\n")
P(gust > 10 m/s): 0.1353353 
Mean wind speed (m/s): 6.266571 
Median wind speed (m/s): 5.88705 
Interactive Shiny app (click to load).
Open in new tab

34.21 Random Number Generator

Rayleigh random variates are generated via the inverse-CDF method. Since \(F(x) = 1 - \exp(-x^2/(2\sigma^2))\), solving for \(X\) gives:

\[ X = \sigma\sqrt{-2\ln U} \sim \text{Rayleigh}(\sigma) \quad \text{when } U \sim \text{U}(0,1) \]

set.seed(123)
n <- 1000; sigma <- 5

# Inverse-transform method
u <- runif(n)
x_inv <- sigma * sqrt(-2 * log(u))

cat("Simulated mean:", round(mean(x_inv), 4), "\n")
cat("Theoretical mean:", sigma * sqrt(pi / 2), "\n")
cat("Simulated var:", round(var(x_inv), 4), "\n")
cat("Theoretical var:", (4 - pi) * sigma^2 / 2, "\n")
Simulated mean: 6.2946 
Theoretical mean: 6.266571 
Simulated var: 10.7059 
Theoretical var: 10.73009 
Interactive Shiny app (click to load).
Open in new tab

34.22 Property 1: Special Case of Weibull

The Rayleigh distribution is the Weibull distribution with shape \(k = 2\) and scale \(\lambda = \sigma\sqrt{2}\):

\[ \text{Rayleigh}(\sigma) = \text{Weibull}(2,\, \sigma\sqrt{2}) \]

See Chapter 31.

34.23 Property 2: 2D Gaussian Magnitude

If \(X_1, X_2 \overset{\text{i.i.d.}}{\sim} N(0, \sigma^2)\) then:

\[ \sqrt{X_1^2 + X_2^2} \sim \text{Rayleigh}(\sigma) \]

This makes the Rayleigh distribution the natural model for 2D positioning errors and for the envelope of two-dimensional noise.

34.24 Property 3: Constant Coefficient of Variation

The coefficient of variation (CV = standard deviation / mean) is:

\[ \text{CV} = \sqrt{\frac{4}{\pi} - 1} \approx 0.523 \]

This is a universal constant, independent of \(\sigma\).

34.25 Related Distributions 1: Weibull Distribution

The Rayleigh is a special case of the Weibull with shape \(k = 2\) (see Chapter 31).

34.26 Related Distributions 2: Chi Distribution

The Rayleigh distribution is the Chi distribution with 2 degrees of freedom, scaled by \(\sigma\): \(\text{Rayleigh}(\sigma) = \sigma \cdot \chi(2)\) (see Chapter 22).

34.27 Related Distributions 3: Maxwell-Boltzmann Distribution

The Maxwell-Boltzmann distribution is the three-dimensional analogue of the Rayleigh: while Rayleigh models the magnitude of a 2D Gaussian vector (\(k = 2\)), Maxwell-Boltzmann models the magnitude of a 3D Gaussian vector (\(k = 3\)). Both are special cases of the Chi distribution family (see Chapter 50).

33  Inverse Gamma Distribution
35  Erlang Distribution

© 2026 Patrick Wessa. Provided as-is, without warranty.

Feedback: e-mail | Anonymous contributions: click to copy (Sats) | click to copy (XMR)

Cookie Preferences