SurvivalFunction - Maple Help

Statistics

 SurvivalFunction
 compute the survival function

 Calling Sequence SurvivalFunction(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 survival function of a random variable

Description

 • The SurvivalFunction function computes the survival function of the random variable X at the point t, which is defined as the probability that X takes a value greater than t. In other words, if $S\left(t\right)$ denotes the survival function of X and $F\left(t\right)$ denotes the cumulative distribution function of X, then $S\left(t\right)=1-F\left(t\right)$ for all real values of t.
 • 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).
 • For more information about computation in the Statistics package, see the Statistics[Computation] help page.

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 survival function is computed using exact arithmetic. To compute the survival function numerically, specify the numeric or numeric = true option.

Examples

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

Compute the survival function of the beta distribution with parameters p and q.

 > $\mathrm{SurvivalFunction}\left('\mathrm{Β}'\left(p,q\right),t\right)$
 ${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)$ (1)

If p = 3 and q = 5, the plot of the survival function is as follows:

 > $\mathrm{plot}\left(\mathrm{SurvivalFunction}\left('\mathrm{Β}'\left(3,5\right),t\right),t=0..1\right)$

The survival function can also be evaluated directly using numeric parameters.

 > $\mathrm{SurvivalFunction}\left('\mathrm{Β}'\left(3,5\right),\frac{1}{2}\right)$
 ${1}{-}\frac{{35}{}{\mathrm{hypergeom}}{}\left(\left[{-4}{,}{3}\right]{,}\left[{4}\right]{,}\frac{{1}}{{2}}\right)}{{8}}$ (2)
 > $\mathrm{simplify}\left(\right)$
 $\frac{{29}}{{128}}$ (3)

The numeric option gives a floating point result.

 > $\mathrm{SurvivalFunction}\left('\mathrm{Β}'\left(3,5\right),\frac{1}{2},\mathrm{numeric}\right)$
 ${0.226562500000000}$ (4)

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 }}}$ (5)
 > $\mathrm{SurvivalFunction}\left(X,t\right)$
 ${1}{-}\frac{{\mathrm{\pi }}{+}{2}{}{\mathrm{arctan}}{}\left({t}\right)}{{2}{}{\mathrm{\pi }}}$ (6)
 > $\mathrm{plot}\left(,t=-10..10\right)$

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)$ (7)
 > $\mathrm{SurvivalFunction}\left(Y,t\right)$
 ${1}{-}{F}{}\left({t}\right)$ (8)

References

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