naginterfaces.library.stat.prob_​chisq_​lincomb

naginterfaces.library.stat.prob_chisq_lincomb(rlam, d, c, method='D')[source]

prob_chisq_lincomb calculates the lower tail probability for a linear combination of (central) variables.

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

https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/g01/g01jdf.html

Parameters
rlamfloat, array-like, shape

The weights, , for , of the central variables.

dfloat

, the multiplier of the central variables.

cfloat

, the value of the constant.

methodstr, length 1, optional

Indicates whether Pan’s, Imhof’s or an appropriately selected procedure is to be used.

Pan’s method is used.

Imhof’s method is used.

Pan’s method is used if , for are at least distinct and ; otherwise Imhof’s method is used.

Returns
probfloat

The lower tail probability for the linear combination of central variables.

Raises
NagValueError
(errno )

On entry, .

Constraint: , or .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, for all values of , for .

Notes

Let be independent Normal variables with mean zero and unit variance, so that have independent -distributions with unit degrees of freedom. prob_chisq_lincomb evaluates the probability that

If this is equivalent to the probability that

Alternatively let

then prob_chisq_lincomb returns the probability that

Two methods are available. One due to Pan (1964) (see Farebrother (1980)) makes use of series approximations. The other method due to Imhof (1961) reduces the problem to a one-dimensional integral. If then a non-adaptive method described in quad.dim1_fin_smooth is used to compute the value of the integral otherwise quad.dim1_fin_bad is used.

Pan’s procedure can only be used if the are sufficiently distinct; prob_chisq_lincomb requires the to be at least distinct; see Further Comments. If the are at least distinct and , then Pan’s procedure is recommended; otherwise Imhof’s procedure is recommended.

References

Farebrother, R W, 1980, Algorithm AS 153. Pan’s procedure for the tail probabilities of the Durbin–Watson statistic, Appl. Statist. (29), 224–227

Imhof, J P, 1961, Computing the distribution of quadratic forms in Normal variables, Biometrika (48), 419–426

Pan, Jie–Jian, 1964, Distributions of the noncircular serial correlation coefficients, Shuxue Jinzhan (7), 328–337