naginterfaces.library.rand.dist_​f

naginterfaces.library.rand.dist_f(n, df1, df2, statecomm)[source]

dist_f generates a vector of pseudorandom numbers taken from an (or Fisher’s variance ratio) distribution with and degrees of freedom.

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

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

Parameters
nint

, the number of pseudorandom numbers to be generated.

df1int

, the number of degrees of freedom of the distribution.

df2int

, the number of degrees of freedom 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() or init_nonrepeat().

Returns
xfloat, ndarray, shape

The pseudorandom numbers from the specified -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_f calculates the values

where and are generated by dist_gamma() from gamma distributions with parameters and respectively (i.e., from -distributions with and degrees of freedom).

One of the initialization functions init_repeat() (for a repeatable sequence if computed sequentially) or init_nonrepeat() (for a non-repeatable sequence) must be called prior to the first call to dist_f.

References

Knuth, D E, 1981, The Art of Computer Programming (Volume 2), (2nd Edition), Addison–Wesley