naginterfaces.library.rand.dist_weibull¶
- naginterfaces.library.rand.dist_weibull(n, a, b, statecomm)[source]¶
dist_weibull
generates a vector of pseudorandom numbers from a two parameter Weibull distribution with shape parameter and scale parameter .For full information please refer to the NAG Library document for g05ss
https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/g05/g05ssf.html
- Parameters
- nint
, the number of pseudorandom numbers to be generated.
- afloat
, the shape parameter of the distribution.
- bfloat
, the scale parameter of the distribution.
- statecommdict, RNG communication object, modified in place
RNG communication structure.
This argument must have been initialized by a prior call to
init_repeat()
orinit_nonrepeat()
.
- Returns
- xfloat, ndarray, shape
The pseudorandom numbers from the specified Weibull distribution.
- Raises
- NagValueError
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, [‘state’] vector has been corrupted or not initialized.
- Notes
The distribution has PDF (probability density function)
dist_weibull
returns the value , where is a pseudorandom number from a uniform distribution over .One of the initialization functions
init_repeat()
(for a repeatable sequence if computed sequentially) orinit_nonrepeat()
(for a non-repeatable sequence) must be called prior to the first call todist_weibull
.
- References
Kendall, M G and Stuart, A, 1969, The Advanced Theory of Statistics (Volume 1), (3rd Edition), Griffin
Knuth, D E, 1981, The Art of Computer Programming (Volume 2), (2nd Edition), Addison–Wesley