pNonCentralChiSquare

pNonCentralChiSquare(*args)

Cumulative distribution function of a NonCentralChiSquare.

Parameters:
nufloat, \nu > 0

The \nu parameter.

lambdafloat, \lambda \geq 0

The \lambda parameter.

xfloat

Location.

tailbool

Tail flag.

Default value is False.

If True, the complementary CDF is computed.

precision: float

The precision of the evaluation.

maxInterint

The maximum number of iterations of the algorithm.

Returns:
p: float

The CDF or the complementary CDF 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 Benton and Krishnamoorthy’s algorithm described in [benton2003].

Examples

>>> import openturns as ot
>>> cdf = ot.DistFunc.pNonCentralChiSquare(2.5, 2.7, 3.0, True, 0.001, 100)
>>> cdf = ot.DistFunc.pNonCentralChiSquare(2.5, 2.7, 3.0, False, 0.001, 100)