naginterfaces.library.stat.prob_​chisq_​noncentral¶

naginterfaces.library.stat.prob_chisq_noncentral(x, df, rlamda, tol=0.0, maxit=100)[source]

prob_chisq_noncentral returns the probability associated with the lower tail of the noncentral -distribution.

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

https://www.nag.com/numeric/nl/nagdoc_29/flhtml/g01/g01gcf.html

Parameters
xfloat

The deviate from the noncentral -distribution with degrees of freedom and noncentrality parameter .

dffloat

, the degrees of freedom of the noncentral -distribution.

rlamdafloat

, the noncentrality parameter of the noncentral -distribution.

tolfloat, optional

The required accuracy of the solution. If prob_chisq_noncentral is entered with greater than or equal to or less than (see machine.precision), the value of is used instead.

maxitint, optional

The maximum number of iterations to be performed.

Returns
pfloat

The probability associated with the lower tail of the noncentral -distribution.

Raises
NagValueError
(errno )

On entry, and .

Constraint: if .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

The initial value of the Poisson weight used in the summation of Equation (1) (see Notes) was too small to be calculated. The computed probability is likely to be zero.

(errno )

The solution has failed to converge in iterations. Consider increasing or .

(errno )

The value of a term required in Equation (2) (see Notes) is too large to be evaluated accurately. The most likely cause of this error is both and are too large.

(errno )

The calculations for the central chi-square probability has failed to converge. A larger value of should be used.

Notes

The lower tail probability of the noncentral -distribution with degrees of freedom and noncentrality parameter , , is defined by

where is a central -distribution with degrees of freedom.

The value of at which the Poisson weight, , is greatest is determined and the summation (1) is made forward and backward from that value of .

The recursive relationship:

is used during the summation in (1).

References

NIST Digital Library of Mathematical Functions