g01db 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 .
Public Shared Sub g01db ( _ n As Integer, _ pp As Double(), _ <OutAttribute> ByRef ifail As Integer _ )
public: static void g01db( int n, array<double>^ pp, [OutAttribute] int% ifail )
- Type: System..::..Int32On entry: , the size of the sample.Constraint: .
- Type: array<System..::..Double>()An array of size [n]On exit: the Normal scores. contains the value , for .
g01db is an adaptation of the Applied Statistics Algorithm AS , see Royston (1982). If you are particularly concerned with the accuracy with which g01db computes the expected values of the order statistics (see [Accuracy]), then g01da 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
where is the expected value of , the current method 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 g01fa.
Royston J P (1982) Algorithm AS 177: expected normal order statistics (exact and approximate) Appl. Statist. 31 161–165
Errors or warnings detected by the method:
On entry, .
The time taken by g01db is proportional to .
A program to calculate the expected values of the order statistics for a sample of size .