naginterfaces.library.stat.normal_​scores_​approx

naginterfaces.library.stat.normal_scores_approx(n)[source]

normal_scores_approx calculates an approximation to the set of Normal Scores, i.e., the expected values of an ordered set of independent observations from a Normal distribution with mean and standard deviation .

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

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

Parameters
nint

, the size of the sample.

Returns
ppfloat, ndarray, shape

The Normal scores. contains the value , for .

Raises
NagValueError
(errno )

On entry, .

Constraint: .

Notes

No equivalent traditional C interface for this routine exists in the NAG Library.

normal_scores_approx is an adaptation of the Applied Statistics Algorithm AS , see Royston (1982). If you are particularly concerned with the accuracy with which normal_scores_approx computes the expected values of the order statistics (see Accuracy), then normal_scores_exact() which is more accurate should be used instead at a cost of increased storage and computing time.

Let be the order statistics from a random sample of size from the standard Normal distribution. Defining

and

where is the expected value of , the current function approximates the Normal upper tail area corresponding to as,

, for , and . Estimates of , , , and are obtained. A small correction to is necessary when and .

The approximation to is thus given by

Values of the inverse Normal probability integral are obtained from inv_cdf_normal().

References

Royston, J P, 1982, Algorithm AS 177: expected normal order statistics (exact and approximate), Appl. Statist. (31), 161–165