Next: , Previous: , Up: Functions and Variables for continuous distributions   [Contents][Index]

52.2.15 Rayleigh Random Variable

The Rayleigh distribution coincides with the \(\chi^2\) distribution with two degrees of freedom.

Function: pdf_rayleigh (x,b)

Returns the value at x of the density function of a \({\it Rayleigh}(b)\) random variable, with \(b>0\).

The \({\it Rayleigh}(b)\) random variable is equivalent to the \({\it Weibull}(2,1/b)\) .

The pdf is

\[f(x; b) = \cases{ 2b^2 x e^{-b^2 x^2} & for $x \ge 0$ \cr 0 & for $x < 0$ } \]
(%i1) load ("distrib")$
(%i2) pdf_rayleigh(x,b);
                              2  2
                     2     - b  x
(%o2)             2 b  x %e        unit_step(x)
Categories: Package distrib ·
Function: cdf_rayleigh (x,b)

Returns the value at x of the distribution function of a \({\it Rayleigh}(b)\) random variable, with \(b>0\).

The \({\it Rayleigh}(b)\) random variable is equivalent to the \({\it Weibull}(2,1/b)\) .

The cdf is

\[F(x; b) = \cases{ 1 - e^{-b^2 x^2} & for $x \ge 0$\cr 0 & for $x < 0$ } \]
(%i1) load ("distrib")$
(%i2) cdf_rayleigh(x,b);
                            2  2
                         - b  x
(%o2)             (1 - %e       ) unit_step(x)
Categories: Package distrib ·
Function: quantile_rayleigh (q,b)

Returns the q-quantile of a \({\it Rayleigh}(b)\) random variable, with \(b>0\); in other words, this is the inverse of cdf_rayleigh. Argument q must be an element of \([0,1]\).

The \({\it Rayleigh}(b)\) random variable is equivalent to the \({\it Weibull}(2,1/b)\) .

(%i1) load ("distrib")$
(%i2) quantile_rayleigh(0.99,b);
                        2.145966026289347
(%o2)                   -----------------
                                b
Categories: Package distrib ·
Function: mean_rayleigh (b)

Returns the mean of a \({\it Rayleigh}(b)\) random variable, with \(b>0\).

The \({\it Rayleigh}(b)\) random variable is equivalent to the \({\it Weibull}(2,1/b)\) .

The mean is

\[E[X] = {\sqrt{\pi}\over 2b} \]
(%i1) load ("distrib")$
(%i2) mean_rayleigh(b);
                            sqrt(%pi)
(%o2)                       ---------
                               2 b
Categories: Package distrib ·
Function: var_rayleigh (b)

Returns the variance of a \({\it Rayleigh}(b)\) random variable, with \(b>0\).

The \({\it Rayleigh}(b)\) random variable is equivalent to the \({\it Weibull}(2,1/b)\) .

The variance is

\[V[X] = {1\over b^2}\left(1-{\pi \over 4}\right) \]
(%i1) load ("distrib")$
(%i2) var_rayleigh(b);
                                 %pi
                             1 - ---
                                  4
(%o2)                        -------
                                2
                               b
Categories: Package distrib ·
Function: std_rayleigh (b)

Returns the standard deviation of a \({\it Rayleigh}(b)\) random variable, with \(b>0\).

The \({\it Rayleigh}(b)\) random variable is equivalent to the \({\it Weibull}(2,1/b)\) .

The standard deviation is

\[D[X] = {1\over b}\sqrt{\displaystyle 1 - {\pi\over 4}} \]
(%i1) load ("distrib")$
(%i2) std_rayleigh(b);
                                   %pi
                          sqrt(1 - ---)
                                    4
(%o2)                     -------------
                                b
Categories: Package distrib ·
Function: skewness_rayleigh (b)

Returns the skewness coefficient of a \({\it Rayleigh}(b)\) random variable, with \(b>0\).

The \({\it Rayleigh}(b)\) random variable is equivalent to the \({\it Weibull}(2,1/b)\) .

The skewness coefficient is

\[SK[X] = {2\sqrt{\pi}(\pi - 3)\over (4-\pi)^{3/2}} \]
(%i1) load ("distrib")$
(%i2) skewness_rayleigh(b);
                         3/2
                      %pi      3 sqrt(%pi)
                      ------ - -----------
                        4           4
(%o2)                 --------------------
                               %pi 3/2
                          (1 - ---)
                                4
Categories: Package distrib ·
Function: kurtosis_rayleigh (b)

Returns the kurtosis coefficient of a \({\it Rayleigh}(b)\) random variable, with \(b>0\).

The \({\it Rayleigh}(b)\) random variable is equivalent to the \({\it Weibull}(2,1/b)\) .

The kurtosis coefficient is

\[KU[X] = {32-3\pi\over (4-\pi)^2} - 3 \]
(%i1) load ("distrib")$
(%i2) kurtosis_rayleigh(b);
                                  2
                             3 %pi
                         2 - ------
                               16
(%o2)                    ---------- - 3
                              %pi 2
                         (1 - ---)
                               4
Categories: Package distrib ·
Function: random_rayleigh (b)
    random_rayleigh (b,n)

Returns a \({\it Rayleigh}(b)\) random variate, with \(b>0\). Calling random_rayleigh with a second argument n, a random sample of size n will be simulated.

The implemented algorithm is based on the general inverse method.

To make use of this function, write first load("distrib").


Next: , Previous: , Up: Functions and Variables for continuous distributions   [Contents][Index]

JavaScript license information