naginterfaces.library.rand.quasi_​lognormal

naginterfaces.library.rand.quasi_lognormal(xmean, std, n, comm)[source]

quasi_lognormal generates a quasi-random sequence from a log-normal distribution. It must be preceded by a call to one of the initialization functions quasi_init() or quasi_init_scrambled().

For full information please refer to the NAG Library document for g05yk

https://www.nag.com/numeric/nl/nagdoc_27.1/flhtml/g05/g05ykf.html

Parameters
xmeanfloat, array-like, shape

Specifies, for each dimension, the mean of the underlying Normal distribution.

stdfloat, array-like, shape

Specifies, for each dimension, the standard deviation of the underlying Normal distribution.

nint

The number of quasi-random numbers required.

commdict, communication object, modified in place

Communication structure.

This argument must have been initialized by a prior call to quasi_init() or quasi_init_scrambled().

Returns
quasfloat, ndarray, shape

Contains the quasi-random numbers of dimension idim.

If , holds the th value for the th dimension.

If , holds the th value for the th dimension.

Raises
NagValueError
(errno )

On entry, [‘iref’] has either not been initialized or has been corrupted.

(errno )

On entry, .

Constraint: .

(errno )

On entry, and .

Constraint: .

(errno )

There have been too many calls to the generator.

(errno )

On entry, and .

Constraint: .

Notes

quasi_lognormal generates a quasi-random sequence from a log-normal distribution by first generating a uniform quasi-random sequence which is then transformed into a log-normal sequence using the exponential of the inverse of the Normal CDF. The type of uniform sequence used depends on the initialization function called and can include the low-discrepancy sequences proposed by Sobol, Faure or Niederreiter. If the initialization function quasi_init_scrambled() was used then the underlying uniform sequence is first scrambled prior to being transformed (see Notes for quasi_init_scrambled for details).

References

Bratley, P and Fox, B L, 1988, Algorithm 659: implementing Sobol’s quasirandom sequence generator, ACM Trans. Math. Software (14(1)), 88–100

Fox, B L, 1986, Algorithm 647: implementation and relative efficiency of quasirandom sequence generators, ACM Trans. Math. Software (12(4)), 362–376

Wichura, 1988, Algorithm AS 241: the percentage points of the Normal distribution, Appl. Statist. (37), 477–484