dNonCentralChiSquare

dNonCentralChiSquare(*args)

Probability density function of a NonCentralChiSquare distribution.

Parameters:
nufloat, \nu > 0

The \nu parameter.

lambdafloat, \lambda \geq 0

The \lambda parameter.

xfloat

The location.

precisionfloat, optional

The precision of the algorithm.

Default value is fixed in the ResourceMap, key (scalar) DistFunc-Precision.

maximum_iterationint, optional

The max number of iterations of the algorithm.

Default value is fixed in the ResourceMap, key (integer) DistFunc-MaximumIteration.

Returns:
dfloat

The PDF at x.

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.

We use the algorithms described in [benton2003] and Johnson and al algorithm described in [johnson1995].

Examples

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