Tutorials › VEE Mathematical Statistics › The MGF of an Exponential Variable

VEE Mathematical Statistics · Moment Generating Functions · Tutorial 231 of 880

The MGF of an Exponential Variable

Learn to derive and use the exponential MGF, including its domain and the parameterization traps that can lead to incorrect moments.

Intermediate 9 min read

What You'll Learn

  • Write the density of an exponential variable using a rate parameter.
  • Derive the MGF from its defining integral and determine its full domain.
  • Differentiate the MGF to obtain the mean, second moment, and variance.
  • Translate a scale parameter into a rate before using the MGF formula.
  • Check whether a requested MGF value exists before substituting into the formula.

Why the Exponential MGF Needs a Domain Check

The exponential distribution models a nonnegative waiting time when the event rate is constant. Its moment generating function has a compact form, so it is useful for finding moments and for later work with distributions. But that formula is valid only on part of the real line. Substituting a value outside that domain can produce a number from an algebraic expression even though the defining expectation is infinite.

Here the exponential distribution is parameterized by its rate. Keep the parameterization and the units in view: a rate has reciprocal units to the random variable, and the MGF argument must have those same reciprocal units.

Definition: Let \(X\) have an exponential distribution with rate \(\lambda>0\), written \(X\sim\operatorname{Exponential}(\lambda)\). Its density is \(f_X(x)=\lambda e^{-\lambda x}\) for \(x\geq 0\), and \(f_X(x)=0\) for \(x<0\). The MGF is \(M_X(t)=E[e^{tX}]\) at every real \(t\) for which this expectation is finite.

In this parameterization, the rate \(\lambda\) is not the mean. For example, if time is measured in hours, \(\lambda\) is measured in events per hour, while \(X\) is measured in hours. The MGF argument \(t\) is therefore measured in per hour.

Deriving the MGF and Its Domain

Use the density in the defining expectation. Since \(X\) is nonnegative, the integral begins at zero. Combining the exponentials reveals exactly when the integral converges.

$$ \begin{aligned} M_X(t) &=E[e^{tX}]\\ &=\int_0^\infty e^{tx}\lambda e^{-\lambda x}\,dx\\ &=\lambda\int_0^\infty e^{-(\lambda-t)x}\,dx. \end{aligned} $$

If \(t<\lambda\), then \(\lambda-t>0\), so the integrand decays exponentially. Evaluating the integral gives the MGF. If \(t=\lambda\), the integrand is the constant \(\lambda\), whose integral over \([0,\infty)\) diverges. If \(t>\lambda\), the integrand grows exponentially and also has an infinite integral.

$$ M_X(t)= \begin{cases} \dfrac{\lambda}{\lambda-t}, & t<\lambda,\\[6pt] \infty, & t\geq\lambda. \end{cases} $$
Theorem: For \(X\sim\operatorname{Exponential}(\lambda)\), the MGF is finite precisely for \(t<\lambda\), and on that domain \(M_X(t)=\lambda/(\lambda-t)\). In particular, the domain contains an open interval around zero, as required for derivatives at zero to give moments.

There is no lower bound on \(t\): every negative \(t\) is in the domain. A negative argument weights larger values of \(X\) by a smaller factor \(e^{tX}\), so it does not create a convergence problem. At \(t=0\), the formula gives \(M_X(0)=1\), as any MGF must.

Worked Example: Deriving Moments for a Waiting Time

Model and assumptions. Suppose, hypothetically, that a system's waiting time \(X\) is exponential with rate \(\lambda=0.5\) per hour. Thus \(X\) is measured in hours, its density is \(0.5e^{-0.5x}\) for \(x\geq0\), and the rate is constant. Find its MGF and domain, then use derivatives to find its mean and variance. Also evaluate the MGF at \(t=0.25\) per hour.

Method. Substitute the stated rate into the derived rate-parameterized formula:

$$ M_X(t)=\frac{0.5}{0.5-t},\qquad t<0.5. $$

The domain condition is in per-hour units: \(t\) must be less than \(0.5\) per hour. Differentiate the MGF:

$$ M_X'(t)=\frac{0.5}{(0.5-t)^2}, \qquad M_X''(t)=\frac{1.0}{(0.5-t)^3}. $$

Evaluate at zero:

$$ E[X]=M_X'(0)=\frac{0.5}{0.5^2}=2\text{ hours}, \qquad E[X^2]=M_X''(0)=\frac{1.0}{0.5^3}=8\text{ hours}^2. $$

Therefore,

$$ \operatorname{Var}(X)=E[X^2]-\big(E[X]\big)^2 =8-2^2=4\text{ hours}^2. $$

The requested argument is in the domain because \(0.25<0.5\). Its MGF value is \(M_X(0.25)=0.5/(0.5-0.25)=0.5/0.25=2\). Check: \(M_X(0)=0.5/0.5=1\), and the mean is positive with the same time units as \(X\). The common mistake this method avoids is treating the rate \(0.5\) as the mean; the mean is \(1/0.5=2\) hours.

Using Derivatives to Obtain Moments

The derivative rule for MGFs follows by differentiating the expectation. Where the MGF exists in an open interval around zero, the relevant derivatives at zero give the raw moments. For the exponential distribution, this condition holds because \(\lambda>0\) and the domain \(t<\lambda\) includes such an interval.

For the first derivative, differentiating \(e^{tX}\) with respect to \(t\) gives \(Xe^{tX}\). For the second derivative, it gives \(X^2e^{tX}\). Setting \(t=0\) removes the exponential factor, leaving \(E[X]\) and \(E[X^2]\), respectively. Directly differentiating the exponential MGF yields:

$$ M_X'(t)=\frac{\lambda}{(\lambda-t)^2}, \qquad M_X''(t)=\frac{2\lambda}{(\lambda-t)^3}, \qquad t<\lambda. $$

Evaluating at zero gives the first two raw moments. Subtracting the squared mean from the second raw moment gives the variance:

$$ E[X]=M_X'(0)=\frac{1}{\lambda}, \qquad E[X^2]=M_X''(0)=\frac{2}{\lambda^2}, \qquad \operatorname{Var}(X)=\frac{2}{\lambda^2}-\left(\frac{1}{\lambda}\right)^2 =\frac{1}{\lambda^2}. $$
Key result: If \(X\sim\operatorname{Exponential}(\lambda)\) with rate \(\lambda>0\), then \(M_X(t)=\lambda/(\lambda-t)\) for \(t<\lambda\), \(E[X]=1/\lambda\), and \(\operatorname{Var}(X)=1/\lambda^2\).

Worked Example: Converting a Scale to a Rate

Model and assumptions. Suppose, hypothetically, that a component's lifetime \(X\), measured in days, is exponential with scale \(\theta=3\) days. The density is \(f_X(x)=(1/3)e^{-x/3}\) for \(x\geq0\). Find the MGF and its domain, then calculate \(E[X]\), \(\operatorname{Var}(X)\), and \(M_X(0.1)\), where the argument is \(0.1\) per day.

Method. The formula above is expressed in terms of a rate, not a scale. Rewrite the density as \(\lambda e^{-\lambda x}\). Matching terms gives \(\lambda=1/\theta=1/3\) per day. Thus:

$$ M_X(t)=\frac{1/3}{1/3-t},\qquad t<\frac{1}{3}. $$

The derivative formulas give:

$$ E[X]=\frac{1}{\lambda}=3\text{ days}, \qquad \operatorname{Var}(X)=\frac{1}{\lambda^2}=9\text{ days}^2. $$

Since \(0.1<1/3\), the requested value exists. Compute it without changing the time units:

$$ M_X(0.1) =\frac{1/3}{1/3-0.1} =\frac{1/3}{10/30-3/30} =\frac{1/3}{7/30} =\frac{10}{7} \approx 1.4286. $$

The approximation is rounded to four decimal places. Check: the mean equals the stated scale of three days, as it should under this scale convention. The common mistake avoided here is substituting \(\theta=3\) directly for \(\lambda\), which would reverse the parameterization and give incorrect moments and domain.

Rate and Scale Conventions

Some sources describe the exponential distribution using a scale \(\theta\), rather than a rate. Under the scale convention, the density is \((1/\theta)e^{-x/\theta}\) for \(x\geq0\), with \(\theta>0\). Comparing this density with the rate form shows that \(\lambda=1/\theta\). Expressed in scale notation, the same MGF and moments are:

$$ M_X(t)=\frac{1}{1-\theta t},\qquad t<\frac{1}{\theta}, \qquad E[X]=\theta, \qquad \operatorname{Var}(X)=\theta^2. $$

These are not different distributions or competing formulas. They are the same model written with reciprocal parameters. Before calculating, identify whether the number supplied is a rate or a scale, and check that the units agree. A rate of \(4\) per year means a mean of \(1/4\) year; a scale of \(4\) years means a mean of \(4\) years.

Worked Example: Testing an MGF Argument at the Boundary

Model and assumptions. Suppose, hypothetically, that a repair duration \(X\), measured in days, is exponential with rate \(\lambda=4\) per day. A calculation requests \(M_X(5)\), with \(t=5\) per day, and also asks for the mean and variance. Determine whether the requested MGF value is finite, and find the moments.

Method. First check the domain instead of substituting into the algebraic expression. The MGF is finite only for \(t<\lambda=4\) per day. Since \(5\) is not less than \(4\), the defining expectation diverges:

$$ M_X(5)=E[e^{5X}] =4\int_0^\infty e^{(5-4)x}\,dx =4\int_0^\infty e^x\,dx =\infty. $$

For the moments, use the rate formulas:

$$ E[X]=\frac{1}{4}=0.25\text{ day}, \qquad \operatorname{Var}(X)=\frac{1}{4^2} =\frac{1}{16}=0.0625\text{ day}^2. $$

Check: \(t=0\) is inside the domain, so \(M_X(0)=4/(4-0)=1\). The request at \(t=5\), however, is outside it. The common mistake avoided is substituting into \(4/(4-5)\) and reporting \(-4\). An MGF is an expectation of a positive random variable \(e^{tX}\), so it cannot equal a negative number; in this case the expectation is infinite, not \(-4\).

Practical Checks and Exam Traps

The compact MGF formula is easy to memorize, but correct use depends on checking the model and domain first. The following checks help catch most errors:

  • Confirm the density convention. In the rate form, the coefficient of the density is \(\lambda\), and the exponent is \(-\lambda x\). If the density instead has scale \(\theta\), convert using \(\lambda=1/\theta\).
  • Check the domain before evaluating. A finite MGF value requires \(t<\lambda\). Equality does not qualify because the defining integral diverges at \(t=\lambda\).
  • Use the second raw moment for variance. The second derivative at zero is \(E[X^2]\), not the variance. Subtract \((E[X])^2\) to obtain \(\operatorname{Var}(X)\).
  • Track units. If \(X\) is measured in days, \(\lambda\) and \(t\) are measured per day. The mean is in days, and the variance is in days squared.
  • Check the basic MGF value. Any proposed formula should give \(M_X(0)=1\). The exponential formula also gives a positive value throughout its finite domain.

The MGF is useful here because differentiation provides moments from one function, while the integral that defines it makes its limitations explicit. The domain is not an optional technical detail: it determines which substitutions are legitimate. These formulas and checks are aligned with the SOA VEE Mathematical Statistics syllabus.

Check Your Understanding

For each problem, state the parameterization and units before using a formula. Check the MGF domain wherever an argument is specified.

  1. A hypothetical sensor has an exponentially distributed response time \(X\), with rate \(2\) per second. Give \(M_X(t)\) and its domain, then find \(E[X]\) and \(\operatorname{Var}(X)\). (Answer: \(M_X(t)=2/(2-t)\) for \(t<2\) per second; \(E[X]=0.5\) second; \(\operatorname{Var}(X)=0.25\) second squared.)
  2. A hypothetical claim-handling time is exponential with scale \(5\) days. Find the rate, MGF domain, mean, and variance. (Answer: rate \(1/5\) per day; \(t<1/5\) per day; mean \(5\) days; variance \(25\) days squared.)
  3. A hypothetical machine's lifetime is exponential with rate \(0.25\) per year. Calculate \(M_X(-0.25)\), \(E[X]\), and \(\operatorname{Var}(X)\). (Answer: \(M_X(-0.25)=0.25/(0.25+0.25)=0.5\); mean \(4\) years; variance \(16\) years squared.)
  4. A hypothetical service duration has density \(3e^{-3x}\) for \(x\geq0\), with \(x\) in minutes. Is \(M_X(3)\) finite? Find \(E[X]\) and \(\operatorname{Var}(X)\). (Answer: no; \(t=3\) is the boundary of the domain \(t<3\); mean \(1/3\) minute; variance \(1/9\) minute squared.)
  5. A hypothetical exponential lifetime has scale \(2\) hours. Find \(M_X(0.25)\), its domain, and the variance. (Answer: rate \(1/2\) per hour; domain \(t<1/2\) per hour; \(M_X(0.25)=(1/2)/(1/2-1/4)=2\); variance \(4\) hours squared.)
Clinical Biostats