NAG Library Routine Document
G01DBF 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 .
G01DBF is an adaptation of the Applied Statistics Algorithm AS
, see Royston (1982)
. If you are particularly concerned with the accuracy with which G01DBF computes the expected values of the order statistics (see Section 7
), then G01DAF
which is more accurate should be used instead at a cost of increased storage and computing time.
be the order statistics from a random sample of size
from the standard Normal distribution. Defining
is the expected value of
, the current routine approximates the Normal upper tail area corresponding to
. Estimates of
are obtained. A small correction
is necessary when
The approximation to
is thus given by
Values of the inverse Normal probability integral
are obtained from G01FAF
Royston J P (1982) Algorithm AS 177: expected normal order statistics (exact and approximate) Appl. Statist. 31 161–165
- 1: N – INTEGERInput
On entry: , the size of the sample.
- 2: PP(N) – REAL (KIND=nag_wp) arrayOutput
On exit: the Normal scores.
contains the value , for .
- 3: IFAIL – INTEGERInput/Output
must be set to
. If you are unfamiliar with this parameter you should refer to Section 3.3
in the Essential Introduction for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value
is recommended. If the output of error messages is undesirable, then the value
is recommended. Otherwise, if you are not familiar with this parameter, the recommended value is
. When the value is used it is essential to test the value of IFAIL on exit.
unless the routine detects an error or a warning has been flagged (see Section 6
6 Error Indicators and Warnings
If on entry
, explanatory error messages are output on the current error message unit (as defined by X04AAF
Errors or warnings detected by the routine:
, the maximum error is
, but G01DBF is usually accurate to
decimal places. For
, comparison with the exact scores calculated by G01DAF
shows that the maximum error is
The time taken by G01DBF is proportional to .
A program to calculate the expected values of the order statistics for a sample of size .
9.1 Program Text
Program Text (g01dbfe.f90)
9.2 Program Data
Program Data (g01dbfe.d)
9.3 Program Results
Program Results (g01dbfe.r)