Statistics - Maple Programming Help

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

Statistics

 ProbabilityFunction
 compute the probability function

 Calling Sequence ProbabilityFunction(X, t, options)

Parameters

 X - algebraic; random variable or distribution t - algebraic; point (assumed to be an integer) options - (optional) equation of the form numeric=value; specifies options for computing the probability function of a random variable

Description

 • The ProbabilityFunction function computes the probability function of the specified discrete random variable at the specified point.
 • The first parameter can be either a discrete distribution (see Statistics[Distribution]) or a discrete random variable

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 probability function is computed using exact arithmetic. To compute the probability function numerically, specify the numeric or numeric = true option.
 • mainbranch - returns the main branch of the distribution only.

Examples

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

Compute the probability function of the Geometric distribution with parameters p and q.

 > $\mathrm{ProbabilityFunction}\left(\mathrm{Geometric}\left(\frac{1}{3}\right),i\right)$
 $\left\{\begin{array}{cc}{0}& {i}{<}{0}\\ \frac{{\left(\frac{{2}}{{3}}\right)}^{{i}}}{{3}}& {\mathrm{otherwise}}\end{array}\right\$ (1)

Use numeric parameters.

 > $\mathrm{ProbabilityFunction}\left(\mathrm{Geometric}\left(\frac{1}{3}\right),5\right)$
 $\frac{{32}}{{729}}$ (2)
 > $\mathrm{ProbabilityFunction}\left(\mathrm{Geometric}\left(\frac{1}{3}\right),5,\mathrm{numeric}\right)$
 ${0.04389574760}$ (3)

References

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