AMILLR
This functon evaluates Mill’s ratio (the ratio of the ordinate to the upper tail area of the standardized normal distribution).
Function Return Value
AMILLR  Function value, Mill’s ratio. (Output)
Required Arguments
X  Value at which Mill’s ratio is evaluated. (Input)
In order to avoid overflow, X must be less than a bound that is machine dependent. On most machines, the bound is greater than –13. The function underflows (and is set to 0.0) for small values of X. On most machines, the underflow does not occur unless X is less than 13.
FORTRAN 90 Interface
Generic: AMILLR (X)
Specific: The specific interface names are S_AMILLR and D_AMILLR.
FORTRAN 77 Interface
Single: AMILLR (X)
Double: The double precision name is DMILLR.
Description
Function AMILLR evaluates Mill’s ratio, the hazard rate for the standard normal distribution. It is computed as the ratio of the ordinate to the upper tail area of the standard normal distribution, that is, ɸ(x)/(1  Φ(x)), where ɸ(x) and Φ(x) are the standard normal density and cumulative distribution functions, respectively. The reciprocal of Mill’s ratio is called the failure rate in reliability and life testing applications. As x becomes small, the ratio goes to zero. For large x (how large is machine dependent), the ratio cannot be computed. Function AMILLR computes 1  Φ(x) using the complementary error function (IMSL 1991) rather than as one minus the normal distribution function, which would underflow sooner as x gets small.
Comments
Informational Error
Type
Code
Description
2
1
The function underflows because X is too small.
Example
In this example, we compute Mill’s ratio at x = 1.0.
 
USE UMACH_INT
USE AMILLR_INT
 
IMPLICIT NONE
INTEGER NOUT
REAL R, X
!
CALL UMACH (2, NOUT)
X = -1.0
R = AMILLR(X)
WRITE (NOUT,99999) R
99999 FORMAT (' Mill''s ratio at -1.0 is ', F8.5)
END
Output
 
Mill’s ratio at -1.0 is 0.28760