# 5.14: The Rayleigh Distribution

- Page ID
- 10354

The Rayleigh distribution, named for William Strutt, Lord Rayleigh, is the distribution of the magnitude of a two-dimensional random vector whose coordinates are independent, identically distributed, mean 0 normal variables. The distribution has a number of applications in settings where magnitudes of normal variables are important.

## The Standard Rayleigh Distribution

### Definition

Suppose that \(Z_1\) and \(Z_2\) are independent random variables with standard normal distributions. The magnitude \(R = \sqrt{Z_1^2 + Z_2^2}\) of the vector \((Z_1, Z_2)\) has the standard Rayleigh distribution.

So in this definition, \((Z_1, Z_2)\) has the standard bivariate normal distribution

### Distribution Functions

We give five functions that completely characterize the standard Rayleigh distribution: the distribution function, the probability density function, the quantile function, the reliability function, and the failure rate function. For the remainder of this discussion, we assume that \(R\) has the standard Rayleigh distribution.

\(R\) has distribution function \(G\) given by \(G(x) = 1 - e^{-x^2/2}\) for \(x \in [0, \infty)\).

## Proof

\((Z_1, Z_2)\) has joint PDF \((z_1, z_2) \mapsto \frac{1}{2 \pi} e^{-(z_1^2 + z_2^2)/2}\) on \(\R^2\). Hence \[\P(R \le x) = \int_{C_x} \frac{1}{2 \pi} e^{-(z_1^2 + z_2^2)/2} d(z_1, z_2)\] where \(C_x = \{(z_1, z_2) \in \R^2: z_1^2 + z_2^2 \le x^2\}\). Convert to polar coordinates with \(z_1 = r \cos \theta\), \(z_2 = r \sin \theta\) to get \[\P(R \le x) = \int_0^{2\pi} \int_0^x \frac{1}{2 \pi} e^{-r^2/2} r \, dr \, d\theta\] The result now follows by simple integration.

\(R\) has probability density function \(g\) given by \(g(x) = x e^{-x^2 / 2}\) for \(x \in [0, \infty)\).

- \(g\) increases and then decreases with mode at \(x = 1\).
- \(g\) is concave downward and then upward with inflection point at \(x = \sqrt{3}\).

## Proof

The formula for the PDF follows immediately from the distribution function since \(g(x) = G^\prime(x)\).

- \(g^\prime(x) = e^{-x^2 / 2}(1 - x^2)\)
- \(g^{\prime\prime}(x) = x e^{-x^2/2}(x^2 - 3)\).

Open the Special Distribution Simulator and select the Rayleigh distribution. Keep the default parameter value and note the shape of the probability density function. Run the simulation 1000 times and compare the emprical density function to the probability density function.

\(R\) has quantile function \(G^{-1}\) given by \(G^{-1}(p) = \sqrt{-2 \ln(1 - p)}\) for \(p \in [0, 1)\). In particular, the quartiles of \(R\) are

- \(q_1 = \sqrt{4 \ln 2 - 2 \ln 3} \approx 0.7585\), the first quartile
- \(q_2 = \sqrt{2 \ln 2} \approx 1.1774\), the median
- \(q_3 = \sqrt{4 \ln 2} \approx 1.6651\), the third quartile

## Proof

The formula for the quantile function follows immediately from the distribution function by solving \(p = G(x)\) for \(x\) in terms of \(p \in [0, 1)\).

Open the Special Distribution Calculator and select the Rayleigh distribution. Keep the default parameter value. Note the shape and location of the distribution function. Compute selected values of the distribution function and the quantile function.

\(R\) has reliability function \(G^c\) given by \(G^c(x) = e^{-x^2/2}\) for \(x \in [0, \infty)\).

## Proof

Recall that the reliability function is simply the right-tail distribution function, so \(G^c(x) = 1 - G(x)\).

\(R\) has failure rate function \(h\) given by \(h(x) = x\) for \(x \in [0, \infty)\). In particular, \(R\) has increasing failure rate.

## Proof

Recall that the failure rate function is \(h(x) = g(x) \big/ G^c(x)\).

### Moments

Once again we assume that \( R \) has the standard Rayleigh distribution. We can express the moment generating function of \(R\) in terms of the standard normal distribution function \(\Phi\). Recall that \(\Phi\) is so commonly used that it is a special function of mathematics.

\(R\) has moment generating function \(m\) given by \[m(t) = \E(e^{tR}) = 1 + \sqrt{2 \pi} t e^{t^2/2} \Phi(t), \quad t \in \R\]

## Proof

By definition \(m(t) = \int_0^\infty e^{t x} x e^{-x^2/2} dx\). Combining the exponential and completing the square in \(x\) gives \[m(t) = e^{t^2/2} \int_0^\infty x e^{-(x - t)^2/2} dx = \sqrt{2 \pi} \int_0^\infty \frac{1}{\sqrt{2 \pi}} x e^{-(x - t)^2/2} dx \] But \(x \mapsto \frac{1}{\sqrt{2 \pi}} e^{-(x - t)^2/2}\) is the PDF of the normal distribution with mean \(t\) and variance 1. The rest of the derivation follows from basic calculus.

The mean, variance of \(R\) are

- \(\E(R) = \sqrt{\pi / 2} \approx 1.2533\)
- \(\var(R) = 2 - \pi/2\)

## Proof

- Note that \[\E(R) = \int_0^\infty x^2 e^{-x^2/2} dx = \sqrt{2 \pi} \int_0^\infty x^2 \frac{1}{\sqrt{2 \pi}}e^{-x^2/2} dx\] But \(x \mapsto \frac{1}{\sqrt{2 \pi}} e^{-x^2/2}\) is the PDF of the standard normal distribution. Hence the second integral is \(\frac{1}{2}\) (since the variance of the standard normal distribution is 1).
- An integration by parts gives \[\E\left(R^2\right) = \int_0^\infty x^3 e^{-x^2/2} dx = 0 + 2 \int_0^\infty x e^{-x^2/2} dx = 2\]

Numerically, \(\E(R) \approx 1.2533\) and \(\sd(R) \approx 0.6551\).

Open the Special Distribution Simulator and select the Rayleigh distribution. Keep the default parameter value. Note the size and location of the mean\(\pm\)standard deviation bar. Run the simulation 1000 times and compare the empirical mean and stadard deviation to the true mean and standard deviation.

The general moments of \(R\) can be expressed in terms of the gamma function \(\Gamma\).

\(\E(R^n) = 2^{n/2} \Gamma(1 + n/2)\) for \(n \in \N\).

## Proof

The substitution \(u = x^2/2\) gives \[\E(R^n) = \int_0^\infty x^n x e^{-x^2/2} dx = \int_0^\infty (2 u)^{n/2} e^{-u} du = 2^{n/2} \int_0^\infty u^{n/2} e^{-u} du\] The last integral is \(\Gamma(1 + n/2)\) by definition.

Of course, the formula for the general moments gives an alternate derivation of the mean and variance above, since \(\Gamma(3/2) = \sqrt{\pi} / 2\) and \(\Gamma(2) = 1\). On the other hand, the moment generating function can be also be used to derive the formula for the general moments.

The skewness and kurtosis of \(R\) are

- \(\skw(R) = 2 \sqrt{\pi}(\pi - 3) \big/ (4 - \pi)^{3/2} \approx 0.6311\)
- \(\kur(R) = (32 - 3 \pi^2) \big/ (4 - \pi)^2 \approx 3.2451\)

## Proof

These results follow from the standard formulas for the skewness and kurtosis in terms of the moments, since \(\E(R) = \sqrt{\pi/2}\), \(\E\left(R^2\right) = 2\), \(\E\left(R^3\right) = 3 \sqrt{2 \pi}\), and \(\E\left(R^4\right) = 8\).

### Related Distributions

The fundamental connection between the standard Rayleigh distribution and the standard normal distribution is given in the very definition of the standard Rayleigh, as the distribution of the magnitude of a point with independent, standard normal coordinates.

Connections to the chi-square distribution.

- If \(R\) has the standard Rayleigh distribution then \(R^2\) has the chi-square distribution with 2 degrees of freedom.
- If \(V\) has the chi-square distribution with 2 degrees of freedom then \(\sqrt{V}\) has the standard Rayleigh distribution.

## Proof

This follows directly from the definition of the standard Rayleigh variable \(R = \sqrt{Z_1^2 + Z_2^2}\), where \(Z_1\) and \(Z_2\) are independent standard normal variables.

Recall also that the chi-square distribution with 2 degrees of freedom is the same as the exponential distribution with scale parameter 2.

Since the quantile function is in closed form, the standard Rayleigh distribution can be simulated by the random quantile method.

Connections between the standard Rayleigh distribution and the standard uniform distribution.

- If \(U\) has the standard uniform distribution (a random number) then \(R = G^{-1}(U) = \sqrt{-2 \ln(1 - U)}\) has the standard Rayleigh distribution.
- If \( R \) has the standard Rayleigh distribution then \( U = G(R) = 1 - \exp(-R^2/2) \) has the standard uniform distribution

In part (a), note that \( 1 - U \) has the same distribution as \( U \) (the standard uniform). Hence \( R = \sqrt{-2 \ln U} \) also has the standard Rayleigh distribution.

Open the random quantile simulator and select the Rayleigh distribution with the default parameter value (standard). Run the simulation 1000 times and compare the empirical density function to the true density function.

There is another connection with the uniform distribution that leads to the most common method of simulating a pair of independent standard normal variables. We have seen this before, but it's worth repeating. The result is closely related to the definition of the standard Rayleigh variable as the magnitude of a standard bivariate normal pair, but with the addition of the polar coordinate angle.

Suppose that \( R \) has the standard Rayleigh distribution, \( \Theta \) is uniformly distributed on \( [0, 2 \pi) \), and that \( R \) and \( \Theta \) are independent. Let \( Z = R \cos \Theta \), \( W = R \sin \Theta \). Then \( (Z, W) \) have the standard bivariate normal distribution.

## Proof

By independence, the joint PDF \( f \) of \( (R, \Theta) \) is given by \[ f(r, \theta) = r e^{-r^2/2} \frac{1}{2 \pi}, \quad r \in [0, \infty), \, \theta \in [0, 2 \pi) \] As we recall from calculus, the Jacobian of the transformation \( z = r \cos \theta \), \( w = r \sin \theta \) is \( r \), and hence the Jacobian of the inverse transformation that takes \( (z, w) \) into \( (r, \theta) \) is \( 1 / r \). Moreover, \( r = \sqrt{z^2 + w^2} \). From the change of variables theorem, the PDF \( g \) of \( (Z, W) \) is given by \( g(z, w) = f(r, \theta) \frac{1}{r} \). This leads to \[ g(z, w) = \frac{1}{2 \pi} e^{-(z^2 + w^2) / 2} = \frac{1}{\sqrt{2 \pi}} e^{-z^2 / 2} \frac{1}{\sqrt{2 \pi}} e^{-w^2 / 2}, \quad z \in \R, \, w \in \R \] Hence \( (Z, W) \) has the standard bivariate normal distribution.

## The General Rayleigh Distribution

### Definition

The standard Rayleigh distribution is generalized by adding a scale parameter.

If \(R\) has the standard Rayleigh distribution and \(b \in (0, \infty)\) then \(X = b R\) has the Rayleigh distribution with scale parameter \(b\).

Equivalently, the Rayleigh distribution is the distribution of the magnitude of a two-dimensional vector whose components have independent, identically distributed mean 0 normal variables.

If \(U_1\) and \(U_2\) are independent normal variables with mean 0 and standard deviation \(\sigma \in (0, \infty)\) then \(X = \sqrt{U_1^2 + U_2^2}\) has the Rayleigh distribution with scale parameter \(\sigma\).

## Proof

We can take \(U_1 = \sigma Z_1\) and \(U_2 = \sigma Z_2\) where \(Z_1\) and \(Z_2\) are independent standard normal variables. Then \(X = \sigma \sqrt{Z_1^2 + Z_2^2} = \sigma R\) where \(R\) has the standard Rayleigh distribution.

### Distribution Functions

In this section, we assume that \(X\) has the Rayleigh distribution with scale parameter \(b \in (0, \infty)\).

\(X\) has cumulative distribution function \(F\) given by \(F(x) = 1 - \exp \left(-\frac{x^2}{2 b^2}\right)\) for \(x \in [0, \infty)\).

## Proof

Recall that \(F(x) = G(x / b)\) where \(G\) is the standard Rayleigh CDF.

\(X\) has probability density function \(f\) given by \(f(x) = \frac{x}{b^2} \exp\left(-\frac{x^2}{2 b^2}\right)\) for \(x \in [0, \infty)\).

- \(f\) increases and then decreases with mode at \(x = b\).
- \(f\) is concave downward and then upward with inflection point at \(x = \sqrt{3} b\).

## Proof

Recall that \(f(x) = \frac{1}{b} g\left(\frac{x}{b}\right)\) where \(g\) is the standard Rayleigh PDF.

Open the Special Distribution Simulator and select the Rayleigh distribution. Vary the scale parameter and note the shape and location of the probability density function. For various values of the scale parameter, run the simulation 1000 times and compare the emprical density function to the probability density function.

\(X\) has quantile function \(F^{-1}\) given by \(F^{-1}(p) = b \sqrt{-2 \ln(1 - p)}\) for \(p \in [0, 1)\). In particular, the quartiles of \(X\) are

- \(q_1 = b \sqrt{4 \ln 2 - 2 \ln 3}\), the first quartile
- \(q_2 = b \sqrt{2 \ln 2}\), the median
- \(q_3 = b \sqrt{4 \ln 2}\), the third quartile

## Proof

Recall that \(F^{-1}(p) = b G^{-1}(p)\) where \(G^{-1}\) is the standard Rayleigh quantile function.

Open the Special Distribution Calculator and select the Rayleigh distribution. Vary the scale parameter and note the location and shape of the distribution function. For various values of the scale parameter, compute selected values of the distribution function and the quantile function.

\(X\) has reliability function \(F^c\) given by \(F^c(x) = \exp\left(-\frac{x^2}{2 b^2}\right)\) for \(x \in [0, \infty)\).

## Proof

Recall that \(F^c(x) = 1 - F(x)\).

\(X\) has failure rate function \(h\) given by \(h(x) = x / b^2\) for \(x \in [0, \infty)\). In particular, \(X\) has increasing failure rate.

## Proof

Recall that \(h(x) = f(x) \big/ H(x)\).

### Moments

Again, we assume that \(X\) has the Rayleigh distribution with scale parameter \(b\), and recall that \(\Phi\) denotes the standard normal distribution function.

\(X\) has moment generating function \(M\) given by \[M(t) = \E(e^{t X}) = 1 + \sqrt{2 \pi} b t \exp\left(\frac{b^2 t^2}{2}\right) \Phi(t), \quad t \in \R\]

## Proof

Recall that \(M(t) = m(b t)\) where \(m\) is the standard Rayleigh MGF.

The mean and variance of \(R\) are

- \(\E(X) = b \sqrt{\pi / 2}\)
- \(\var(X) = b^2 (2 - \pi/2)\)

## Proof

These result follow from standard mean and variance and basic properties of expected value and variance.

Open the Special Distribution Simulator and select the Rayleigh distribution. Vary the scale parameter and note the size and location of the mean\(\pm\)standard deviation bar. For various values of the scale parameter, run the simulation 1000 times and compare the empirical mean and stadard deviation to the true mean and standard deviation.

Again, the general moments can be expressed in terms of the gamma function \(\Gamma\).

\(\E(X^n) = b^n 2^{n/2} \Gamma(1 + n/2)\) for \(n \in \N\).

## Proof

This follows from the standard moments and basic properties of expected value.

The skewness and kurtosis of \(X\) are

- \(\skw(X) = 2 \sqrt{\pi}(\pi - 3) \big/ (4 - \pi)^{3/2} \approx 0.6311\)
- \(\kur(X) = (32 - 3 \pi^2) \big/ (4 - \pi)^2 \approx 3.2451\)

## Proof

Recall that skewness and kurtosis are defined in terms of the standard score, and hence are unchanged by a scale transformation. Thus the results follow from the standard skewness and kurtosis.

### Related Distributions

The fundamental connection between the Rayleigh distribution and the normal distribution is the defintion, and of course, is the primary reason that the Rayleigh distribution is *special* in the first place. By construction, the Rayleigh distribution is a scale family, and so is closed under scale transformations.

If \(X\) has the Rayleigh distribution with scale parameter \(b \in (0, \infty)\) and if \(c \in (0, \infty)\) then \(c X\) has the Rayleigh distribution with scale parameter \(b c\).

The Rayleigh distribution is a special case of the Weibull distribution.

The Rayleigh distribution with scale parameter \( b \in (0, \infty) \) is the Weibull distribution with shape parameter \( 2 \) and scale parameter \( \sqrt{2} b \).

The following result generalizes the connection between the standard Rayleigh and chi-square distributions.

If \(X\) has the Rayleigh distribution with scale parameter \(b \in (0, \infty)\) then \(X^2\) has the exponential distribution with scale parameter \(2 b^2\).

## Proof

We can take \(X = b R\) where \(R\) has the standard Rayleigh distribution. Then \(X^2 = b^2 R^2\), and \(R^2\) has the exponential distribution with scale parameter 2. Hence \(X^2\) has the exponential distribution with scale parameter \(2 b^2\).

Since the quantile function is in closed form, the Rayleigh distribution can be simulated by the random quantile method.

Suppose that \( b \in (0, \infty) \).

- If \(U\) has the standard uniform distribution (a random number) then \(X = F^{-1}(U) = b \sqrt{-2 \ln(1 - U)}\) has the Rayleigh distribution with scale parameter \(b\).
- If \( X \) has the Rayleigh distribution with scale parameter \( b \) then \( U = F(X) = 1 - \exp(-X^2/2 b^2) \) has the standard uniform distribution

In part (a), note that \( 1 - U \) has the same distribution as \( U \) (the standard uniform). Hence \( X = b \sqrt{-2 \ln U} \) also has the Rayleigh distribution with scale parameter \( b \).

Open the random quantile simulator and select the Rayleigh distribution. For selected values of the scale parameter, run the simulation 1000 times and compare the empirical density function to the true density function.

Finally, the Rayleigh distribution is a member of the general exponential family.

If \(X\) has the Rayleigh distribution with scale parameter \(b \in (0, \infty)\) then \(X\) has a one-parameter exponential distribution with natural parameter \(-1/b^2\) and natural statistic \(X^2 / 2\).

## Proof

This follows directly from the definition of the general exponential distribution.