\(\newcommand{\R}{\mathbb{R}}\)
\(\newcommand{\N}{\mathbb{N}}\)
\(\newcommand{\E}{\mathbb{E}}\)
\(\newcommand{\P}{\mathbb{P}}\)
\(\newcommand{\var}{\text{var}}\)
\(\newcommand{\sd}{\text{sd}}\)
\(\newcommand{\cov}{\text{cov}}\)
\(\newcommand{\cor}{\text{cor}}\)
\(\newcommand{\skew}{\text{skew}}\)
\(\newcommand{\kurt}{\text{kurt}}\)

- Virtual Laboratories
- 4. Special Distributions
- The Rayleigh Distribution

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.

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.

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.

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

\((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}\).

The formula for the PDF follows immediately from the distribution function since \(g(x) = G^\prime(x)\). Part (a) follows from \(g^\prime(x) = e^{-x^2 / 2}(1 - x^2)\) and part (b) follows from \(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

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 \(H\) given by \(H(x) = e^{-x^2/2}\) for \(x \in [0, \infty)\).

Recall that the reliability function is simply the right-tail distribution function, so \(H(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.

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

Once again we assume that \( R \) has the standard Rayleigh distribution.

\(R\) has moment generating function \(m\) given by \(m(t) = \E(e^{tR}) = 1 + \sqrt{2 \pi} t e^{t^2/2} \Phi(t)\) for \(t \in \R\) where \(\Phi\) is the standard normal distribution function.

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, and standard deviation of \(R\) are

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

For part (a) 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). For part (b), 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\]

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 moments of \(R\) (about 0) are \(\E(R^n) = 2^{n/2} \Gamma(1 + n/2)\) for \(n \in \N\), where \(\Gamma\) is the gamma function.

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

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

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\).

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.

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.

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 \gt 0\) then \(X = \sqrt{U_1^2 + U_2^2}\) has the Rayleigh distribution with scale parameter \(\sigma\).

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.

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

\(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)\).

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\).

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

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 \(H\) given by \(H(x) = \exp\left(-\frac{x^2}{2 b^2}\right)\) for \(x \in [0, \infty)\).

Recall that \(H(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.

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

Again, we assume that \(X\) has the Rayleigh distribution with scale parameter \(b\).

\(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)\) for \(t \in \R\) where \(\Phi\) is the standard normal distribution function.

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

The mean, variance, and standard deviation of \(R\) are

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

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.

The moments of \(X\) (about 0) are \(\E(X^n) = b^n 2^{n/2} \Gamma(1 + n/2)\) for \(n \in \N\), where \(\Gamma\) is the gamma function.

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

The skewness and kurtosis of \(X\) are

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

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.

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\) 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 Weibull distribution with shape parameter 2 and scale parameter \(b\) is the Rayleigh distribution with scale parameter \(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\) then \(X^2\) has the exponential distribution with scale parameter \(2 b^2\).

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.

Connections to the standard uniform distribution.

- 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\) then \(X\) has a one-parameter exponential distribution with natural parameter \(-1/b^2\) and natural statistic \(X^2 / 2\).

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