Click or drag to resize
RandomNextWeibull Method
Generate a pseudorandom number from a Weibull distribution.

Namespace: Imsl.Stat
Assembly: ImslCS (in ImslCS.dll) Version: 6.5.2.0
Syntax
public virtual double NextWeibull(
	double a
)

Parameters

a
Type: SystemDouble
A double which specifies the shape parameter of the Weibull distribution, a \gt 0.

Return Value

Type: Double
A double which specifies a pseudorandom number from a Weibull distribution.
Remarks

Method NextWeibull generates pseudorandom numbers from a Weibull distribution with shape parameter a. The probability density function is

f\left( x \right) = Ax^{A - 1} e^{ - x^A } 
            \,for\,x \ge 0

NextWeibull uses an antithetic inverse CDF technique to generate a Weibull variate; that is, a uniform random deviate U is generated and the inverse of the Weibull cumulative distribution function is evaluated at 1.0 - u to yield the Weibull deviate.

Deviates from the two-parameter Weibull distribution with shape parameter a can be generated by using NextWeibull and then multiplying the result by b.

The Rayleigh distribution with probability density function,

r\left( x \right) = \frac{1}{{\alpha ^2 
            }}x\, e^{\left( { - x^2 /2\alpha ^2 } \right)} \,\,for\,x \ge 0

is the same as a Weibull distribution with shape parameter a equal to 2 and scale parameter b equal to

\sqrt {2\alpha }

hence, NextWeibull and simple multiplication can be used to generate Rayleigh deviates.

See Also