g01mb returns the reciprocal of Mills' Ratio.

# Syntax

C# |
---|

public static double g01mb( double x ) |

Visual Basic |
---|

Public Shared Function g01mb ( _ x As Double _ ) As Double |

Visual C++ |
---|

public: static double g01mb( double x ) |

F# |
---|

static member g01mb : x : float -> float |

#### Parameters

- x
- Type: System..::..Double
*On entry*: $x$, the argument of the reciprocal of Mills' Ratio.

#### Return Value

g01mb returns the reciprocal of Mills' Ratio.

# Description

g01mb calculates the reciprocal of Mills' Ratio, the hazard rate, $\lambda \left(x\right)$, 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,

The calculation is based on a Chebyshev expansion as described in s15ag.

$$\lambda \left(x\right)=\frac{Z\left(x\right)}{Q\left(x\right)}=\frac{\frac{1}{\sqrt{2\pi}}{e}^{-\left({x}^{2}/2\right)}}{\frac{1}{\sqrt{2\pi}}\underset{x}{\overset{\infty}{\int}}{e}^{-\left({t}^{2}/2\right)}dt}\text{.}$$ |

# References

Gross A J and Clark V A (1975)

*Survival Distributions: Reliability Applications in the Biomedical Sciences*Wiley# Error Indicators and Warnings

None.

# Accuracy

In the left-hand tail, $x<0.0$, if $\frac{1}{2}{e}^{-\left(1/2\right){x}^{2}}\le \text{}$ the safe range parameter (x02am), then $0.0$ is returned, which is close to the true value.

The relative accuracy is bounded by the effective machine precision. See s15ag for further discussion.

# Parallelism and Performance

None.

# Further Comments

If, before entry, $x$ is not a standard Normal variable, it has to be standardized, and on exit, g01mb has to be divided by the standard deviation. That is, if the Normal distribution has mean $\mu $ and variance ${\sigma}^{2}$, then its hazard rate, $\lambda \left(x;\mu ,{\sigma}^{2}\right)$, is given by

$$\lambda \left(x;\mu ,{\sigma}^{2}\right)=\lambda \left(\left(x-\mu \right)/\sigma \right)/\sigma \text{.}$$ |

# Example

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

Example program (C#): g01mbe.cs