MillsRatio - Maple Help

Statistics

 MillsRatio
 compute the Mills ratio

 Calling Sequence MillsRatio(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 Mills ratio of a random variable

Description

 • The MillsRatio ratio computes the Mills ratio 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 Mills ratio is computed using exact arithmetic. To compute the Mills ratio numerically, specify the numeric or numeric = true option.

Examples

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

Compute the Mills ratio of the beta distribution with parameters p and q.

 > $\mathrm{MillsRatio}\left('\mathrm{Β}'\left(p,q\right),t\right)$
 $\frac{{1}{-}\left(\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\\right)}{\left\{\begin{array}{cc}{0}& {t}{<}{0}\\ \frac{{{t}}^{{-}{1}{+}{p}}{}{\left({1}{-}{t}\right)}^{{-}{1}{+}{q}}}{{\mathrm{Β}}{}\left({p}{,}{q}\right)}& {t}{<}{1}\\ {0}& {\mathrm{otherwise}}\end{array}\right\}$ (1)

Use numeric parameters.

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

Define new distribution.

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

Another distribution

 > $U≔\mathrm{Distribution}\left(\mathrm{=}\left(\mathrm{CDF},t↦F\left(t\right)\right),\mathrm{=}\left(\mathrm{PDF},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{MillsRatio}\left(Y,t\right)$
 $\frac{{1}{-}{F}{}\left({t}\right)}{{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.