MomentGeneratingFunction - Maple Help

Home : Support : Online Help : Education : Student Packages : Statistics : MomentGeneratingFunction

Student[Statistics]

 MomentGeneratingFunction
 compute the moment generating function

 Calling Sequence MomentGeneratingFunction(X, t, numeric_option, inert_option) MGF(X, t, numeric_option, inert_option)

Parameters

 X - algebraic; random variable t - algebraic; point 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 MomentGeneratingFunction function computes the moment generating function of the specified random variable at the specified point.
 • The first parameter can be a random variable or an algebraic expression involving random variables (see Student[Statistics][RandomVariable]).

Computation

 • By default, all computations involving random variables are performed symbolically (see option numeric below).
 • If the input point is a floating point value, then the output will be given in a floating point. Otherwise, the output is exact.
 • The value of the moment generating function of the input random variable at the specified point is computed according to the rules mentioned above. To always compute the outcome numerically, specify the numeric or numeric=true option.

Examples

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

Compute the moment generating function of the beta random variable with parameters $n$ and $p$.

 > $\mathrm{MomentGeneratingFunction}\left(\mathrm{BinomialRandomVariable}\left(n,p\right),t\right)$
 ${\left({p}{}{{ⅇ}}^{{t}}{+}{1}{-}{p}\right)}^{{n}}$ (1)

Use numeric parameters.

 > $\mathrm{MomentGeneratingFunction}\left(\mathrm{BinomialRandomVariable}\left(10,\frac{1}{2}\right),3\right)$
 ${\left(\frac{{{ⅇ}}^{{3}}}{{2}}{+}\frac{{1}}{{2}}\right)}^{{10}}$ (2)

If the numeric option is specified or the second parameter is given in a floating point value, then a floating point value will be returned.

 > $\mathrm{MomentGeneratingFunction}\left(\mathrm{BinomialRandomVariable}\left(10,0.5\right),3,\mathrm{numeric}\right)$
 ${1.696471963}{×}{{10}}^{{10}}$ (3)

MGF functions the same way as MomentGeneratingFunction.

 > $\mathrm{MomentGeneratingFunction}\left(\mathrm{BinomialRandomVariable}\left(10,0.5\right),3.0\right)$
 ${1.696471963}{×}{{10}}^{{10}}$ (4)

Use the inert option.

 > $\mathrm{MomentGeneratingFunction}\left(\mathrm{BinomialRandomVariable}\left(10,\frac{1}{2}\right),3,\mathrm{inert}\right)$
 ${\sum }_{{\mathrm{_t}}{=}{0}}^{{10}}{}{{ⅇ}}^{{3}{}{\mathrm{_t}}}{}\left(\genfrac{}{}{0}{}{{10}}{{\mathrm{_t}}}\right){}{\left(\frac{{1}}{{2}}\right)}^{{\mathrm{_t}}}{}{\left(\frac{{1}}{{2}}\right)}^{{10}{-}{\mathrm{_t}}}$ (5)
 > $\mathrm{evalf}\left(\mathrm{MomentGeneratingFunction}\left(\mathrm{BinomialRandomVariable}\left(10,\frac{1}{2}\right),3,\mathrm{inert}\right)\right)$
 ${1.696471965}{×}{{10}}^{{10}}$ (6)

Define a new random variable.

 > $X≔3\mathrm{PoissonRandomVariable}\left(a\right)+2\mathrm{ExponentialRandomVariable}\left(b\right):$
 > $\mathrm{MGF}\left(X,t\right)$
 $\frac{{{ⅇ}}^{{a}{}\left({{ⅇ}}^{{3}{}{t}}{-}{1}\right)}}{{-}{2}{}{b}{}{t}{+}{1}}$ (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][MomentGeneratingFunction] command was introduced in Maple 18.