# naginterfaces.library.stat.normal_​scores_​exact¶

naginterfaces.library.stat.normal_scores_exact(n, etol)[source]

normal_scores_exact computes a 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 g01da

https://www.nag.com/numeric/nl/nagdoc_28.7/flhtml/g01/g01daf.html

Parameters
nint

, the size of the set.

etolfloat

The maximum value for the estimated absolute error in the computed scores.

Returns
ppfloat, ndarray, shape

The Normal scores. contains the value , for .

errestfloat

A computed estimate of the maximum error in the computed scores (see Accuracy).

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

Warns
NagAlgorithmicWarning
(errno )

The function was unable to estimate the scores with estimated error less than . The best result obtained is returned together with the associated value of .

Notes

If a sample of observations from any distribution (which may be denoted by ), is sorted into ascending order, the th smallest value in the sample is often referred to as the th ‘order statistic’, sometimes denoted by (see Kendall and Stuart (1969)).

The order statistics, therefore, have the property

(If , is the sample median.)

For samples originating from a known distribution, the distribution of each order statistic in a sample of given size may be determined. In particular, the expected values of the order statistics may be found by integration. If the sample arises from a Normal distribution, the expected values of the order statistics are referred to as the ‘Normal scores’. The Normal scores provide a set of reference values against which the order statistics of an actual data sample of the same size may be compared, to provide an indication of Normality for the sample. Normal scores have other applications; for instance, they are sometimes used as alternatives to ranks in nonparametric testing procedures.

normal_scores_exact computes the th Normal score for a given sample size as

where

and denotes the complete beta function.

The function attempts to evaluate the scores so that the estimated error in each score is less than the value specified by you. All integrations are performed in parallel and arranged so as to give good speed and reasonable accuracy.

References

Kendall, M G and Stuart, A, 1969, The Advanced Theory of Statistics (Volume 1), (3rd Edition), Griffin