Statistics - Maple Programming Help

Home : Support : Online Help : Statistics and Data Analysis : Statistics Package : Quantities : Statistics/HazardRate

Statistics

 HazardRate
 compute the hazard rate

 Calling Sequence HazardRate(X, t, options) FailureRate(X, t, options)

Parameters

 X - algebraic; random variable or distribution t - algebraic; point options - (optional) equation of the form numeric=value; specifies options for computing the hazard rate of a random variable

Description

 • The HazardRate rate computes the hazard (failure) rate of the specified random variable at the specified point.
 • The first parameter can be a distribution (see Statistics[Distribution]), a random variable, or an algebraic expression involving random variables (see Statistics[RandomVariable]).

Computation

 • By default, all computations involving random variables are performed symbolically (see option numeric below).

Options

 The options argument can contain one or more of the options shown below. More information for some options is available in the Statistics[RandomVariables] help page.
 • numeric=truefalse -- By default, the hazard rate is computed using exact arithmetic. To compute the hazard rate numerically, specify the numeric or numeric = true option.

Examples

 > $\mathrm{with}\left(\mathrm{Statistics}\right):$

Compute the hazard rate of the beta distribution with parameters p and q.

 > $\mathrm{HazardRate}\left('\mathrm{Β}'\left(p,q\right),t\right)$
 $\frac{{{}\begin{array}{cc}{0}& {t}{<}{0}\\ \frac{{{t}}^{{-}{1}{+}{p}}{}{\left({1}{-}{t}\right)}^{{q}{-}{1}}}{{\mathrm{Β}}{}\left({p}{,}{q}\right)}& {t}{<}{1}\\ {0}& {\mathrm{otherwise}}\end{array}}{{1}{-}\left({{}\begin{array}{cc}{0}& {t}{<}{0}\\ \frac{{{t}}^{{p}}{}{\mathrm{hypergeom}}{}\left(\left[{p}{,}{1}{-}{q}\right]{,}\left[{1}{+}{p}\right]{,}{t}\right)}{{\mathrm{Β}}{}\left({p}{,}{q}\right){}{p}}& {t}{<}{1}\\ {1}& {\mathrm{otherwise}}\end{array}\right)}$ (1)

Use numeric parameters.

 > $\mathrm{HazardRate}\left('\mathrm{Β}'\left(3,5\right),\frac{1}{2}\right)$
 $\frac{{105}}{{64}{}\left({1}{-}\frac{{35}}{{8}}{}{\mathrm{hypergeom}}{}\left(\left[{-}{4}{,}{3}\right]{,}\left[{4}\right]{,}\frac{{1}}{{2}}\right)\right)}$ (2)
 > $\mathrm{HazardRate}\left('\mathrm{Β}'\left(3,5\right),\frac{1}{2},\mathrm{numeric}\right)$
 ${7.241379317}$ (3)

Define new distribution.

 > $T≔\mathrm{Distribution}\left(\mathrm{PDF}=\left(t→\frac{1}{\mathrm{π}\left({t}^{2}+1\right)}\right)\right):$
 > $X≔\mathrm{RandomVariable}\left(T\right):$
 > $\mathrm{CDF}\left(X,t\right)$
 $\frac{{1}}{{2}}{}\frac{{\mathrm{π}}{+}{2}{}{\mathrm{arctan}}{}\left({t}\right)}{{\mathrm{π}}}$ (4)
 > $\mathrm{FailureRate}\left(X,t\right)$
 $\frac{{1}}{{\mathrm{π}}{}\left({{t}}^{{2}}{+}{1}\right){}\left({1}{-}\frac{{1}}{{2}}{}\frac{{\mathrm{π}}{+}{2}{}{\mathrm{arctan}}{}\left({t}\right)}{{\mathrm{π}}}\right)}$ (5)

Another distribution

 > $U≔\mathrm{Distribution}\left(\mathrm{CDF}=\left(t→F\left(t\right)\right),\mathrm{PDF}=\left(t→f\left(t\right)\right)\right):$
 > $Y≔\mathrm{RandomVariable}\left(U\right):$
 > $\mathrm{CDF}\left(Y,t\right)$
 ${F}{}\left({t}\right)$ (6)
 > $\mathrm{FailureRate}\left(Y,t\right)$
 $\frac{{f}{}\left({t}\right)}{{1}{-}{F}{}\left({t}\right)}$ (7)

References

 Stuart, Alan, and Ord, Keith. Kendall's Advanced Theory of Statistics. 6th ed. London: Edward Arnold, 1998. Vol. 1: Distribution Theory.