CONTENTS

Solution: MGF Computation — Exponential and Gamma

Part 1

MX(s)=0esxλeλxdx=λ0e(λs)xdx.M_X(s) = \int_0^\infty e^{sx}\cdot \lambda e^{-\lambda x}\,dx = \lambda\int_0^\infty e^{-(\lambda - s)x}\,dx.

This converges iff λs>0\lambda - s > 0, i.e. s<λs < \lambda. For such ss:

MX(s)=λ1λs=λλs,s<λ.M_X(s) = \lambda\cdot \frac{1}{\lambda - s} = \frac{\lambda}{\lambda - s}, \qquad s < \lambda.

Part 2

MX(s)=λ/(λs)2M_X'(s) = \lambda/(\lambda - s)^2. At s=0s = 0: MX(0)=1/λ=E[X]M_X'(0) = 1/\lambda = \mathbb{E}[X]. ✓

MX(s)=2λ/(λs)3M_X''(s) = 2\lambda/(\lambda - s)^3. At s=0s = 0: MX(0)=2/λ2=E[X2]M_X''(0) = 2/\lambda^2 = \mathbb{E}[X^2].

So Var(X)=E[X2](E[X])2=2/λ21/λ2=1/λ2\text{Var}(X) = \mathbb{E}[X^2] - (\mathbb{E}[X])^2 = 2/\lambda^2 - 1/\lambda^2 = 1/\lambda^2. ✓

Part 3

By independence and the product-of-MGFs rule:

MY(s)=i=1nMYi(s)=i=1nλλs=(λλs)n,s<λ.M_Y(s) = \prod_{i=1}^n M_{Y_i}(s) = \prod_{i=1}^n \frac{\lambda}{\lambda - s} = \left(\frac{\lambda}{\lambda - s}\right)^n, \qquad s < \lambda. \quad \checkmark

Part 4

From the table of canonical MGFs, (λ/(λs))n(\lambda/(\lambda - s))^n is the MGF of a gamma distribution with shape nn and rate λ\lambda — i.e. YGamma(n,λ)Y \sim \text{Gamma}(n, \lambda).

By the uniqueness theorem, this identification is rigorous: the sum of nn i.i.d. exponentials is gamma with integer shape nn.

Takeaways

  • Exponential MGF is a rational function λ/(λs)\lambda/(\lambda - s), finite only for s<λs < \lambda. Limited domain is typical of exponential-tailed distributions.
  • MGF differentiation reads moments. First derivative at 00 gives E[X]\mathbb{E}[X]; second derivative gives E[X2]\mathbb{E}[X^2]; variance follows.
  • Gamma == sum of i.i.d. exponentials (when shape is integer). This is the classical proof — three lines with MGFs. It also explains why gamma is the waiting time until the nn-th Poisson arrival.
  • Product-of-MGFs under independence is the engine. In nearly every "distribution of a sum" question, the MGF (or characteristic function) approach is faster and more rigorous than direct convolution.
Solution — MGF Computation: Exponential and Gamma | q4quant.studio