Student[Statistics] - Maple Programming Help

Home : Support : Online Help : Education : Student Packages : Statistics : Student/Statistics/ProbabilityDensityFunction

Student[Statistics]

 ProbabilityDensityFunction
 compute the probability density function
 PDF
 compute the probability density function

 Calling Sequence ProbabilityDensityFunction(X, t, numeric_option, output_option, inert::truefalse:=false) PDF(X, t, numeric_option, output_option, inert::truefalse:=false)

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 ProbabilityDensityFunction function computes the probability density function of the specified random variable at the specified point.
 • The first parameter a random variable, or an algebraic expression involving random variables (see Student[Statistics][RandomVariable]).
 • If the option output is not included or is specified to be output=value, then the function will return the value of the probability density function of the specified random variable at the specified point. If output=plot is specified, then the function will return a density plot of the input random variable together with dash lines instructing the value at the 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 PDF 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 probability density function of the beta random variable with parameters $p$ and $q$.

 > $\mathrm{ProbabilityDensityFunction}\left(\mathrm{BetaRandomVariable}\left(p,q\right),t\right)$
 $\left\{\begin{array}{cc}{0}& {t}{<}{0}\\ \frac{{{t}}^{{-}{1}{+}{p}}{}{\left({1}{-}{t}\right)}^{{-}{1}{+}{q}}}{{\mathrm{Β}}{}\left({p}{,}{q}\right)}& {t}{<}{1}\\ {0}& {\mathrm{otherwise}}\end{array}\right\$ (1)

Use numeric parameters.

 > $\mathrm{ProbabilityDensityFunction}\left(\mathrm{BetaRandomVariable}\left(3,5\right),\frac{1}{2}\right)$
 $\frac{{105}}{{64}}$ (2)
 > $\mathrm{ProbabilityDensityFunction}\left(\mathrm{BetaRandomVariable}\left(3,5\right),\frac{1}{2},\mathrm{numeric}\right)$
 ${1.640625000}$ (3)

Use the output=plot option.

 > $\mathrm{ProbabilityDensityFunction}\left(\mathrm{BetaRandomVariable}\left(3,5\right),\frac{1}{2},\mathrm{output}=\mathrm{plot}\right)$ Define new random variable and use the output = both option and the inert option.

 > $A≔\mathrm{ExponentialRandomVariable}\left(4\right)+2\mathrm{UniformRandomVariable}\left(-3,5\right)+1:$
 > $\mathrm{pdf},\mathrm{graph}≔\mathrm{PDF}\left(A,5,\mathrm{output}=\mathrm{both},\mathrm{inert}\right):$
 > $\mathrm{PDF}\left(A,5,\mathrm{numeric}\right)$
 ${0.05736968759}$ (4)
 > $\mathrm{pdf}$
 ${{\int }}_{{-}{\mathrm{\infty }}}^{{\mathrm{\infty }}}\frac{\left(\left\{\begin{array}{cc}{0}& {\mathrm{_t}}{<}{0}\\ \frac{{{ⅇ}}^{{-}\frac{{\mathrm{_t}}}{{4}}}}{{4}}& {\mathrm{otherwise}}\end{array}\right\\right){}\left(\left\{\begin{array}{cc}{0}& {-}\frac{{\mathrm{_t}}}{{2}}{<}{-5}\\ \frac{{1}}{{8}}& {-}\frac{{\mathrm{_t}}}{{2}}{<}{3}\\ {0}& {\mathrm{otherwise}}\end{array}\right\\right)}{{2}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{\mathrm{_t}}$ (5)
 > $\mathrm{evalf}\left(\mathrm{pdf}\right)$
 ${0.05736968759}$ (6)
 > $\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][ProbabilityDensityFunction] and Student[Statistics][PDF] commands were introduced in Maple 18.
 • For more information on Maple 18 changes, see Updates in Maple 18.