20.4.19 Moment generating functions for probability distributions
The mgf
command finds the moment generating function for a probability
distribution (such as normal, binomial, poisson, beta, gamma).
-
mgf takes one or more mandatory arguments:
-
distd, the name of the function that finds the
distribution’s density function.
- params, any parameters that would normally be passed
to distd.
- mgf(distd,params) returns an
expression for the moment generating function for distd
with parameters params.
Examples
Find the moment generating function for
the standard normal distribution:
Find the moment generating function for
the binomial distribution: