Probability - Maple Help

Student[Statistics]

 Probability
 compute the probability of an event

 Calling Sequence Probability(X, numeric_option, inert_option)

Parameters

 X - algebraic, relation, or set of algebraics and relations, each involving at least one random variable; an event numeric_option - (optional) equation of the form numeric=value where value is true or false inert_option - (optional) equation of the form inert=value where value is true or false

Description

 • The Probability function computes the probability of the event X.
 • The first parameter, X, is an event consisting of a relation or set of relations. An algebraic expression is interpreted as an equation set to zero. Each relation must involve at least one random variable. All random variables in X are considered independent. A set is interpreted as the intersection of the events of each of its members.
 • 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 there are floating point values or the option numeric is included, then the computation is done in floating point. Otherwise the computation is exact.
 • By default, the probability of an event is computed according to the rules mentioned above. To always compute the probability numerically, specify the numeric or numeric = true option.

Examples

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

Compute the probability of the normal random variable with parameters $a$ and $b$.

 > $N≔\mathrm{NormalRandomVariable}\left(a,b\right):$
 > $\mathrm{Probability}\left(x
 $\frac{{1}}{{2}}{-}\frac{{\mathrm{erf}}{}\left(\frac{\left({x}{-}{a}\right){}\sqrt{{2}}}{{2}{}{b}}\right)}{{2}}$ (1)

Use numeric parameters.

 > $\mathrm{Probability}\left(\mathrm{NormalRandomVariable}\left(2,3\right)
 $\frac{{1}}{{2}}{+}\frac{{\mathrm{erf}}{}\left(\frac{\left({x}{-}{2}\right){}\sqrt{{2}}}{{6}}\right)}{{2}}$ (2)
 > $\mathrm{Probability}\left(\mathrm{NormalRandomVariable}\left(2,3\right)<1\right)$
 $\frac{{1}}{{2}}{-}\frac{{\mathrm{erf}}{}\left(\frac{\sqrt{{2}}}{{6}}\right)}{{2}}$ (3)
 > $\mathrm{Probability}\left(\mathrm{NormalRandomVariable}\left(2,3\right)<1,'\mathrm{numeric}'\right)$
 ${0.369441340181764}$ (4)

Compute the probability that a exponential random variable lies in the range of (4,7). Instead of calling the function as Probability(4 < E < 7), the right way of using the function is Probability({4<E,E<7}).

 > $E≔\mathrm{ExponentialRandomVariable}\left(5\right):$
 > $\mathrm{Probability}\left(\left\{4
 ${-}{{ⅇ}}^{{-}\frac{{7}}{{5}}}{+}{{ⅇ}}^{{-}\frac{{4}}{{5}}}$ (5)

Consider a random variable that is made up by two other random variables.

 > $X≔2\mathrm{BernoulliRandomVariable}\left(\frac{1}{2}\right)+\mathrm{ExponentialRandomVariable}\left(3\right):$
 > $\mathrm{Probability}\left(X<5.0\right)$
 ${0.7216224780}$ (6)

Use the inert option.

 > $\mathrm{Probability}\left(X<5,\mathrm{inert}\right)$
 $\underset{{u}{\to }{5}{-}}{{lim}}{}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\sum }_{{\mathrm{_k}}{=}{0}}^{{1}}{}\left(\left\{\begin{array}{cc}{0}& {\mathrm{_k}}{<}{0}\\ {0}& {1}{<}{\mathrm{_k}}\\ \frac{{1}}{{2}}& {\mathrm{otherwise}}\end{array}\right\\right){}\left({{\int }}_{{-}{\mathrm{\infty }}}^{{u}{-}{2}{}{\mathrm{_k}}}\left(\left\{\begin{array}{cc}{0}& {\mathrm{_t}}{<}{0}\\ \frac{{{ⅇ}}^{{-}\frac{{\mathrm{_t}}}{{3}}}}{{3}}& {\mathrm{otherwise}}\end{array}\right\\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{\mathrm{_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.

Compatibility

 • The Student[Statistics][Probability] command was introduced in Maple 18.