ENOS
This function evaluates the expected value of a normal order statistic.
Function Return Value
ENOS  Function value, the expected value of the I‑th order statistic in a sample of size N from the standard normal distribution. (Output)
See Comment 1.
Required Arguments
I  Rank of the order statistic. (Input)
N  Sample size. (Input)
FORTRAN 90 Interface
Generic: ENOS (I, N)
Specific: The specific interface names are S_ENOS and D_ENOS.
FORTRAN 77 Interface
Single: ENOS (I, N)
Double: The double precision name is DENOS.
Description
Let X1 X2 Xn be the order statistics of a random sample of size n from a standard normal distribution. The expected value of Xi is given by
where ɸ(x) and (x) are the standard normal density and cumulative distribution functions respectively (David 1981).
Function ENOS evaluates the integral using a trapezoidal rule after first making a logarithmic transformation. This is the method used by Harter (1961). Although the method permits computations for any value of n, extremely large values of n cannot be guaranteed to be as accurate as smaller values of n. For n > 2500, the method is inappropriate.
Comments
1. If the generic version of this function is used, the immediate result must be stored in a variable before use in an expression. For example:
X = ENOS(I, N)
Y = SQRT(X)
must be used rather than
Y = SQRT(ENOS(I, N))
If this is too much of a restriction on the programmer, then the specific name can be used without this restriction.
2. Informational errors
Type
Code
Description
3
1
The rank of the order statistic is less than 1. A rank of 1 is assumed.
3
2
The rank of the order statistic is greater than sample size (N). A rank of N is assumed.
Example
In this example, we compute the expected value of the first order statistic in a sample of size 5 from a standard normal distribution.
 
USE UMACH_INT
USE ENOS_INT
 
IMPLICIT NONE
INTEGER I, N, NOUT
REAL EX
!
CALL UMACH (2, NOUT)
I = 1
N = 5
EX = ENOS(I,N)
WRITE (NOUT,99999) EX
99999 FORMAT (' The expected value of the smallest order statistic', &
/, ' in a normal sample of size 5 is ', F9.5)
END
Output
 
The expected value of the smallest order statistic
in a normal sample of size 5 is -1.16296
Published date: 03/19/2020
Last modified date: 03/19/2020