Compute the Probability Function of a Discrete Random Variable - Maple Programming Help

Compute the Probability Function of a Discrete Random Variable

 Description Compute the PMF (probability mass function, or probability function) of a discrete random variable.

Create discrete random variables using the probability distributions already available in Maple or by creating custom distributions. The parameters to the distributions can be symbolic, numeric, or a mix.

 > $X≔\mathrm{Statistics}\left[\mathrm{RandomVariable}\right]\left({\mathrm{Binomial}}\left({10}{,}{p}\right)\right):$

Compute the probability function of the random variable at a point. The point may be numeric or symbolic.

 > $P:=\mathrm{Statistics}\left[\mathrm{ProbabilityFunction}\right]\left(X,{x}\right)$
 $\colorbox[rgb]{0,0,0}{{P}}\colorbox[rgb]{0,0,0}{{:=}}\colorbox[rgb]{0,0,0}{{{}}\begin{array}{cc}\colorbox[rgb]{0,0,0}{{0}}& \colorbox[rgb]{0,0,0}{{x}}\colorbox[rgb]{0,0,0}{{<}}\colorbox[rgb]{0,0,0}{{0}}\\ \colorbox[rgb]{0,0,0}{{\mathrm{binomial}}}\colorbox[rgb]{0,0,0}{{}}\left(\colorbox[rgb]{0,0,0}{{10}}\colorbox[rgb]{0,0,0}{{,}}\colorbox[rgb]{0,0,0}{{x}}\right)\colorbox[rgb]{0,0,0}{{}}{\colorbox[rgb]{0,0,0}{{p}}}^{\colorbox[rgb]{0,0,0}{{x}}}\colorbox[rgb]{0,0,0}{{}}{\left(\colorbox[rgb]{0,0,0}{{1}}\colorbox[rgb]{0,0,0}{{-}}\colorbox[rgb]{0,0,0}{{p}}\right)}^{\colorbox[rgb]{0,0,0}{{10}}\colorbox[rgb]{0,0,0}{{-}}\colorbox[rgb]{0,0,0}{{x}}}& \colorbox[rgb]{0,0,0}{{\mathrm{otherwise}}}\end{array}$ (1)
 Commands Used