This functon evaluates Mill’s ratio (the ratio of the ordinate to the upper tail area of the standardized normal distribution).
AMILLR − Function value, Mill’s ratio. (Output)
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.
Generic: AMILLR (X)
Specific: The specific interface names are S_AMILLR and D_AMILLR.
Single: AMILLR (X)
Double: The double precision name is DMILLR.
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.
Informational error
Type Code
2 1 The function underflows because X is too small.
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
Mill’s ratio at -1.0 is 0.28760
PHONE: 713.784.3131 FAX:713.781.9260 |