Student[Statistics] - Maple Programming Help

Home : Support : Online Help : Education : Student Package : Statistics : Student/Statistics/CumulativeDistributionFunction

Student[Statistics]

 CumulativeDistributionFunction
 compute the cumulative distribution function
 CDF
 compute the cumulative distribution function

 Calling Sequence CumulativeDistributionFunction(X, t, numeric_option, output_option, inert_option) CDF(X, t, numeric_option, output_option, inert_option)

Parameters

 X - algebraic; random variable t - algebraic; point numeric_option - (optional) equation of the form numeric=value where value is true or false output_option - (optional) equation of the form output=x where x is value, plot, or both inert_option - (optional) equation of the form inert=value where value is true or false

Description

 • The CumulativeDistributionFunction function computes the cumulative distribution function of the specified random variable at the specified point.
 • The first parameter can be a random variable or an algebraic expression involving random variables (see Student[Statistics][RandomVariable]).
 • The inverse function of the CDF is the Quantile.
 • If the option output is not included or is specified to be output=value, then the function will return the value of the cumulative density function of the specified random variable at the specified point. If output=plot is specified, then the function will return a plot of CDF(X,x) together with dash lines instructing the value at x = specified point. If output=both is specified, then both the value and the plot will be returned.
 • If the option inert is not included or is specified to be inert=false, then the function will return the actual value of the result. If inert or inert=true is specified, then the function will return the formula of evaluating the actual value.

Computation

 • By default, all computations involving random variables are performed symbolically (see option numeric below).
 • If the second parameter is a floating point value or the option numeric is included, then the computation is done in floating point. Otherwise the computation is exact.
 • By default, the CDF of the specified random variable at the specified point is computed according to the rules mentioned above. To always compute the value numerically, specify the numeric or numeric = true option.

Examples

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

Compute the cumulative distribution function of the beta random variable with parameters $p$ and $q$.

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

Use numeric parameters.

 > $\mathrm{CumulativeDistributionFunction}\left(\mathrm{BetaRandomVariable}\left(3,5\right),\frac{1}{2}\right)$
 $\frac{{35}}{{8}}{}{\mathrm{hypergeom}}{}\left(\left[{-}{4}{,}{3}\right]{,}\left[{4}\right]{,}\frac{{1}}{{2}}\right)$ (2)
 > $\mathrm{CumulativeDistributionFunction}\left(\mathrm{BetaRandomVariable}\left(3,5\right),\frac{1}{2},\mathrm{numeric}\right)$
 ${0.773437500000000}$ (3)

Define new random variable.

 > $X≔{\mathrm{NormalRandomVariable}\left(2,5\right)}^{2}$
 ${X}{≔}{{\mathrm{_R2}}}^{{2}}$ (4)
 > $\mathrm{CDF}\left(X,x\right)$
 ${{}\begin{array}{cc}{0}& {x}{\le }{0}\\ \frac{{1}}{{2}}{}{\mathrm{erf}}{}\left(\frac{{1}}{{10}}{}\sqrt{{2}}{}\sqrt{{x}}{+}\frac{{1}}{{5}}{}\sqrt{{2}}\right){+}\frac{{1}}{{2}}{}{\mathrm{erf}}{}\left(\frac{{1}}{{10}}{}\sqrt{{2}}{}\sqrt{{x}}{-}\frac{{1}}{{5}}{}\sqrt{{2}}\right)& {0}{<}{x}\end{array}$ (5)

Use the inert option.

 > $\mathrm{CDF}\left(X,x,\mathrm{inert}\right)$
 ${{∫}}_{{-}{\mathrm{∞}}}^{{x}}{{}\begin{array}{cc}{0}& {\mathrm{_t}}{\le }{0}\\ \frac{{1}}{{20}}{}\frac{\sqrt{{2}}{}\left({{ⅇ}}^{{-}\frac{{1}}{{50}}{}{\left(\sqrt{{\mathrm{_t}}}{+}{2}\right)}^{{2}}}{+}{{ⅇ}}^{{-}\frac{{1}}{{50}}{}{\left(\sqrt{{\mathrm{_t}}}{-}{2}\right)}^{{2}}}\right)}{\sqrt{{\mathrm{_t}}}{}\sqrt{{\mathrm{π}}}}& {0}{<}{\mathrm{_t}}\end{array}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{\mathrm{_t}}$ (6)

Use the output=plot option.

 > $\mathrm{CDF}\left(X,x,\mathrm{output}=\mathrm{plot}\right)$ Consider the CDF of a discrete random variable and use the output=both option.

 > $P≔\mathrm{PoissonRandomVariable}\left(3\right):$
 > $\mathrm{cdf},\mathrm{graph}≔\mathrm{CDF}\left(P,x,\mathrm{output}=\mathrm{both}\right):$
 > $\mathrm{cdf}$
 ${-}\frac{{-}{{3}}^{{\mathrm{max}}{}\left({-}{1}{,}{\mathrm{floor}}{}\left({x}\right)\right){+}{1}}{+}{3}{}{{3}}^{{\mathrm{max}}{}\left({-}{1}{,}{\mathrm{floor}}{}\left({x}\right)\right)}}{{{3}}^{{\mathrm{max}}{}\left({-}{1}{,}{\mathrm{floor}}{}\left({x}\right)\right){+}{1}}}{+}\frac{{3}{}{\mathrm{Γ}}{}\left({\mathrm{max}}{}\left({-}{1}{,}{\mathrm{floor}}{}\left({x}\right)\right){+}{1}{,}{3}\right){}{{3}}^{{\mathrm{max}}{}\left({-}{1}{,}{\mathrm{floor}}{}\left({x}\right)\right)}}{{{3}}^{{\mathrm{max}}{}\left({-}{1}{,}{\mathrm{floor}}{}\left({x}\right)\right){+}{1}}{}{\mathrm{Γ}}{}\left({\mathrm{max}}{}\left({-}{1}{,}{\mathrm{floor}}{}\left({x}\right)\right){+}{1}\right)}$ (7)
 > $\mathrm{graph}$ References

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

Compatibility

 • The Student[Statistics][CumulativeDistributionFunction] and Student[Statistics][CDF] commands were introduced in Maple 18.