qChiSquare

qChiSquare(nu, p, tail=False)

Quantile of a ChiSquare distribution on [0,+\infty[.

Parameters:
nufloat, \nu > 0

The number of degrees of freedom.

pfloat, in [0,1]

The probability.

tailbool, optional

Tail flag. Default value is False. If True, the quantile associated to (1-p) is computed.

Returns:
qfloat

The quantile of order p or (1-p).

Notes

The probability density function is defined as:

f_X(x) = \frac{1}{2^{\nu/2}\Gamma(\nu/2)}
         x^{\nu/2 - 1}
         \exp\left(-\frac{x}{2}\right),
         \quad x \in [0; +\infty[

with \nu > 0.

Examples

>>> import openturns as ot
>>> q = ot.DistFunc.qChiSquare(2.5, 0.95)
>>> q = ot.DistFunc.qChiSquare(2.5, 0.95, True)