Probability - Maple Help

Statistics

 Probability
 compute the probability of an event

 Calling Sequence Probability(X, options)

Parameters

 X - algebraic, relation, or set of algebraics and relations, each involving at least one random variable; an event options - (optional) equation of the form numeric=value; specifies options for computing the probability density function of a random variable

Description

 • The Probability command 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.

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

Examples

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

Compute the probability of the normal distribution.

 > $X≔\mathrm{RandomVariable}\left(\mathrm{Normal}\left(0,1\right)\right):$
 > $\mathrm{Probability}\left({X}^{2}<1\right)$
 ${\mathrm{erf}}{}\left(\frac{\sqrt{{2}}}{{2}}\right)$ (1)
 > $\mathrm{Probability}\left({X}^{2}<1,'\mathrm{numeric}'\right)$
 ${0.682689492137086}$ (2)

Compute the probability that the product of 3 independent random variables uniformly distributed on between 0 and 1 is less than t.

 > $X≔\left[\mathrm{seq}\left(\mathrm{RandomVariable}\left(\mathrm{Uniform}\left(0,1\right)\right),i=1..4\right)\right]:$
 > $Y≔X\left[1\right]X\left[2\right]X\left[3\right]:$
 > $\mathrm{Probability}\left(Y
 $\left\{\begin{array}{cc}{0}& {t}{\le }{0}\\ \frac{{{\mathrm{ln}}{}\left({t}\right)}^{{2}}{}{t}}{{2}}{-}{t}{}{\mathrm{ln}}{}\left({t}\right){+}{t}& {t}{\le }{1}\\ {1}& {1}{<}{t}\end{array}\right\$ (3)

Compute the probability that the distance between two points randomly chosen from a 1x1 square is less than 1.

 > $Z≔{\left({\left(X\left[1\right]-X\left[3\right]\right)}^{2}+{\left(X\left[2\right]-X\left[4\right]\right)}^{2}\right)}^{\frac{1}{2}}:$
 > $\mathrm{Probability}\left(Z<\frac{1}{2}\right)$
 ${-}\frac{{29}}{{96}}{+}\frac{{\mathrm{\pi }}}{{4}}$ (4)

References

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