Compute the moment-generating function of a normal distribution.
- User
Compute the moment-generating function of a normal distribution.
- Assistant
The moment-generating function (MGF) of a normal random variable (X \sim \mathcal{N}(\mu, \sigma^2)) is [ M_X(t) = \mathbb{E}[e^{tX}] = \exp\left(\mu t + \frac{1}{2} \sigma^2 t^2 \right). ]
Derivation
The probability density function is [ f(x) = \frac{1}{\sigma \sqrt{2\pi}} \exp\left( -\frac{(x - \mu)^2}{2\sigma^2} \right). ] Thus, [ M_X(t) = \int_{-\infty}^\infty e^{tx} \cdot \frac{1}{\sigma \sqrt{2\pi}} \exp\left( -\frac{(x - \mu)^2}{2\sigma^2} \right) , dx = \frac{1}{\sigma \sqrt{2\pi}} \int_{-\infty}^\infty \exp\left( tx - \frac{(x - \mu)^2}{2\sigma^2} \right) , dx. ] The exponent is [ tx - \frac{(x - \mu)^2}{2\sigma^2} = tx - \frac{x^2 - 2\mu x + \mu^2}{2\sigma^2} = -\frac{1}{2\sigma^2} x^2 + \left(t + \frac{\mu}{\sigma^2}\right) x - \frac{\mu^2}{2\sigma^2}. ] Let (b = t + \frac{\mu}{\sigma^2}). Completing the square gives [ -\frac{1}{2\sigma^2} x^2 + b x = -\frac{1}{2\sigma^2} \left[ x^2 - 2 b \sigma^2 x \right] = -\frac{1}{2\sigma^2} \left[ (x - b \sigma^2)^2 - (b \sigma^2)^2 \right] = -\frac{(x - b \sigma^2)^2}{2\sigma^2} + \frac{(b \sigma^2)^2}{2\sigma^2}. ] Note that (b \sigma^2 = \mu + \sigma^2 t). Substituting back, [ tx - \frac{(x - \mu)^2}{2\sigma^2} = -\frac{(x - (\mu + \sigma^2 t))^2}{2\sigma^2} + \frac{(\mu + \sigma^2 t)^2}{2\sigma^2} - \frac{\mu^2}{2\sigma^2}. ] Now, [ \frac{(\mu + \sigma^2 t)^2}{2\sigma^2} - \frac{\mu^2}{2\sigma^2} = \frac{\mu^2 + 2\mu \sigma^2 t + \sigma^4 t^2 - \mu^2}{2\sigma^2} = \mu t + \frac{1}{2} \sigma^2 t^2. ] So, [ M_X(t) = \exp\left( \mu t + \frac{1}{2} \sigma^2 t^2 \right) \cdot \frac{1}{\sigma \sqrt{2\pi}} \int_{-\infty}^\infty \exp\left( -\frac{(x - (\mu + \sigma^2 t))^2}{2\sigma^2} \right) , dx. ] The integral is 1 (it is the integral of a (\mathcal{N}(\mu + \sigma^2 t, \sigma^2)) density). Thus, (M_X(t) = \exp\left( \mu t + \frac{1}{2} \sigma^2 t^2 \right)).
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.