rNonCentralChiSquare

rNonCentralChiSquare(*args)

Realization of a NonCentralChiSquare distribution.

Parameters:
nufloat, \nu > 0

The \nu parameter.

lambdafloat, \lambda \geq 0

The \lambda parameter.

sizeint

The number of realizations (optional).

Default value is 1.

Returns:
realizationsfloat or sequence of float

The realizations of the distribution.

Notes

The probability density function is defined as:

f_X(x) = \sum_{j=0}^{\infty} e^{-\lambda}
                             \frac{\lambda^j}{j!}p_{\chi^2(\nu + 2j)}(x),
         \quad x \in [0; +\infty[

where p_{\chi^2(q)} is the probability density function of a \chi^2(q) random variate.

Examples

>>> import openturns as ot
>>> ot.RandomGenerator.SetSeed(0)
>>> r = ot.DistFunc.rNonCentralChiSquare(2.5, 0.5)
>>> r = ot.DistFunc.rNonCentralChiSquare(2.5, 0.5, 10)