G01MBF (PDF version)
G01 Chapter Contents
G01 Chapter Introduction
NAG Library Manual

NAG Library Routine Document

G01MBF

Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

+ Contents

    1  Purpose
    7  Accuracy

1  Purpose

G01MBF returns the reciprocal of Mills' Ratio, via the routine name.

2  Specification

FUNCTION G01MBF ( X)
REAL (KIND=nag_wp) G01MBF
REAL (KIND=nag_wp)  X

3  Description

G01MBF calculates the reciprocal of Mills' Ratio, the hazard rate, λx, for the standard Normal distribution. It is defined as the ratio of the ordinate to the upper tail area of the standard Normal distribution, that is,
λx=Zx Qx =12πe-x2/2 12πxe-t2/2dt .
The calculation is based on a Chebyshev expansion as described in S15AGF.

4  References

Gross A J and Clark V A (1975) Survival Distributions: Reliability Applications in the Biomedical Sciences Wiley

5  Parameters

1:     X – REAL (KIND=nag_wp)Input
On entry: x, the argument of the reciprocal of Mills' Ratio.

6  Error Indicators and Warnings

None.

7  Accuracy

In the left-hand tail, x<0.0, if 12e-1/2x2 the safe range parameter (X02AMF), then 0.0 is returned, which is close to the true value.
The relative accuracy is bounded by the effective machine precision. See S15AGF for further discussion.

8  Further Comments

If, before entry, x is not a standard Normal variable, it has to be standardized, and on exit, G01MBF has to be divided by the standard deviation. That is, if the Normal distribution has mean μ and variance σ2, then its hazard rate, λx;μ,σ2, is given by
λx;μ,σ2=λx-μ/σ/σ.

9  Example

The hazard rate is evaluated at different values of x for Normal distributions with different means and variances. The results are then printed.

9.1  Program Text

Program Text (g01mbfe.f90)

9.2  Program Data

Program Data (g01mbfe.d)

9.3  Program Results

Program Results (g01mbfe.r)


G01MBF (PDF version)
G01 Chapter Contents
G01 Chapter Introduction
NAG Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2012