Skip to main content

wnoise

wnoise (shape, scale)

The wnoise function returns a pseudo-random value from the two-parameter Weibull distribution characterized by the shape and scale, the respective gamma and alpha parameters. The two-parameter Weibull probability distribution function is

f(x;α,γ)=γαxγ1exp[1αxγ]x0α>0γ>0\displaystyle f(x ; \alpha, \gamma)=\frac{\gamma}{\alpha} x^{\gamma-1} \exp \left[-\frac{1}{\alpha} x^{\gamma}\right] \quad \begin{array}{l} x \geq 0 \\ \alpha>0 \\ \gamma>0 \end{array}

The mean of the Weibull distribution is

α1γΓ(1+1γ),\displaystyle \alpha^{\frac{1}{\gamma}} \Gamma\left(1+\frac{1}{\gamma}\right),

and the variance is

α2γΓ(1+2γ)α2γ[Γ(1+1γ)]2.\displaystyle \alpha^{\frac{2}{\gamma}} \Gamma\left(1+\frac{2}{\gamma}\right)-\alpha^{\frac{2}{\gamma}}\left[\Gamma\left(1+\frac{1}{\gamma}\right)\right]^{2} .

Note that this definition of the PDF uses different scaling than the one used in StatsWeibullPDF. To match the scaling of StatsWeibullPDF multiply the result from Wnoise by the factor scale^(1-1/shape).

The random number generator initializes using the system clock when Igor Pro starts. This almost guarantees that you will never repeat a sequence. For repeatable "random" numbers, use SetRandomSeed. The algorithm uses the Mersenne Twister random number generator.

See Also

SetRandomSeed, Noise Functions, Statistical Analysis