Moment generating functions for probability distributions: mgf

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

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.
  - parameters, any parameters that would normally be passed to distd.
- mgf(distd,parameters) returns an expression for the moment generating function for distd with parameters parameters.

Examples.

- Find the moment generating function for the standard normal distribution.
  Input:
  mgf(normald,1,0)
  Output:

  et

- Input:
  mgf(binomial,n,p)
  Output:

  ⎛ ⎝ | 1−p+p et | ⎞ ⎠ | n