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 .
Syntax
C# |
---|
public static void g01db( int n, double[] pp, out int ifail ) |
Visual Basic |
---|
Public Shared Sub g01db ( _ n As Integer, _ pp As Double(), _ <OutAttribute> ByRef ifail As Integer _ ) |
Visual C++ |
---|
public: static void g01db( int n, array<double>^ pp, [OutAttribute] int% ifail ) |
F# |
---|
static member g01db : n : int * pp : float[] * ifail : int byref -> unit |
Parameters
- n
- Type: System..::..Int32On entry: , the size of the sample.Constraint: .
- pp
- Type: array<System..::..Double>[]()[][]An array of size [n]On exit: the Normal scores. contains the value , for .
- ifail
- Type: System..::..Int32%On exit: unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).
Description
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
and
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.
References
Royston J P (1982) Algorithm AS 177: expected normal order statistics (exact and approximate) Appl. Statist. 31 161–165
Error Indicators and Warnings
Errors or warnings detected by the method:
On entry, .
Accuracy
Parallelism and Performance
None.
Further Comments
The time taken by g01db is proportional to .
Example
A program to calculate the expected values of the order statistics for a sample of size .
Example program (C#): g01dbe.cs