naginterfaces.library.stat.prob_​chisq_​noncentral_​lincomb

naginterfaces.library.stat.prob_chisq_noncentral_lincomb(a, mult, rlamda, c, tol=0.0, maxit=500)[source]

prob_chisq_noncentral_lincomb returns the lower tail probability of a distribution of a positive linear combination of random variables.

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

https://support.nag.com/numeric/nl/nagdoc_30.1/flhtml/g01/g01jcf.html

Parameters
afloat, array-like, shape

The weights, .

multint, array-like, shape

The degrees of freedom, .

rlamdafloat, array-like, shape

The noncentrality parameters, .

cfloat

, the point for which the lower tail probability is to be evaluated.

tolfloat, optional

The relative accuracy required by you in the results. If prob_chisq_noncentral_lincomb 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 terms that should be used during the summation.

Returns
pfloat

The lower tail probability associated with the linear combination of random variables with degrees of freedom, and noncentrality parameters , for .

pdffloat

The value of the probability density function of the linear combination of variables.

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: , for .

(errno )

On entry, .

Constraint: , for .

(errno )

On entry, .

Constraint: , for .

(errno )

The central calculation has failed to converge. This is an unlikely exit. A larger value of should be tried.

Warns
NagAlgorithmicWarning
(errno )

The solution has failed to converge within iterations. A larger value of or should be used. The returned value should be a reasonable approximation to the correct value.

(errno )

The solution appears to be too close to or for accurate calculation. The value returned is or as appropriate.

Notes

For a linear combination of noncentral random variables with integer degrees of freedom the lower tail probability is

where and are positive constants and where represents an independent random variable with degrees of freedom and noncentrality parameter . The linear combination may arise from considering a quadratic form in Normal variables.

Ruben’s method as described in Farebrother (1984) is used. Ruben has shown that (1) may be expanded as an infinite series of the form

where , i.e., the probability that a central is less than .

The value of is set at

unless , in which case

is used, where and , for .

References

Farebrother, R W, 1984, The distribution of a positive linear combination of random variables, Appl. Statist. (33(3))