Statistics
MomentGeneratingFunction
compute the moment generating function
Calling Sequence
Parameters
Description
Computation
Options
Examples
References
MomentGeneratingFunction(X, t, options)
MGF(X, t, options)
X
-
algebraic; random variable or distribution
t
algebraic; point
options
(optional) equation of the form numeric=value; specifies options for computing the moment generating function of a random variable
The MomentGeneratingFunction function computes the moment generating function of the specified random variable at the specified point.
The first parameter can be a distribution (see Statistics[Distribution]), a random variable, or an algebraic expression involving random variables (see Statistics[RandomVariable]).
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.
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 moment generating function is computed using exact arithmetic. To compute the moment generating function numerically, specify the numeric or numeric = true option.
with(Statistics):
Compute the moment generating function of the beta distribution with parameters p and q.
MomentGeneratingFunction('Beta'(p, q), t);
hypergeom⁡p,p+q,t
Use numeric parameters.
MomentGeneratingFunction('Beta'(3, 5), 1/2);
hypergeom⁡3,8,12
MomentGeneratingFunction('Beta'(3, 5), 1/2, numeric);
1.210195092
Define new distribution.
T := Distribution(PDF = (t -> piecewise(t < 0, 0, t < 1, 6*t*(1-t), 0))):
X := RandomVariable(T):
MGF(X, u);
6⁢ⅇu⁢u−2⁢ⅇu+u+2u3
Stuart, Alan, and Ord, Keith. Kendall's Advanced Theory of Statistics. 6th ed. London: Edward Arnold, 1998. Vol. 1: Distribution Theory.
See Also
Statistics[Computation]
Statistics[Distributions]
Statistics[RandomVariables]
Download Help Document
What kind of issue would you like to report? (Optional)