Next: Laplace Random Variable, Previous: Weibull Random Variable, Up: Functions and Variables for continuous distributions [Contents][Index]
The Rayleigh distribution coincides with the \(\chi^2\) distribution with two degrees of freedom.
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)
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)
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
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
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
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
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
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
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: Laplace Random Variable, Previous: Weibull Random Variable, Up: Functions and Variables for continuous distributions [Contents][Index]