Moment generating functions for probability distributions: mgf

### 7.4.19 Moment generating functions for probability distributions: mgf

The mgf command will compute the moment generating function for a probability distribution (such as normal, binomial, poisson, beta, gamma). It takes as arguments the name of the distribution and any necessary parameters. To find the moment generating function for the standard normal distribution, you can enter

mgf(normald,1,0)

and get

exp(t)

If you enter

mgf(binomial,n,p)

you will get

(1-p+p*exp(t))^n