St · Statistics & Probability

How to Find the Expected Value of an Exponential Function

Published By the 9to5Science editorial team

At a glance

  1. 1. Identify the function

    Decide whether you need the expectation of e to the power of a random variable, or the exponential of a particular distribution.

  2. 2. Use the distribution

    Compute the expectation by summing or integrating the exponential function against the random variable's probability distribution.

  3. 3. Check existence

    Verify that the sum or integral is finite; some exponential expectations do not exist.

  4. 4. Apply a standard formula

    For a beta random variable, the answer is a confluent hypergeometric function; for a gamma random variable, it has a simple closed form.

The phrase “expected value of an exponential function” most often means finding E[eX]\mathbb{E}[e^X] for a random variable XX. The answer depends on the distribution of XX, and the expectation may be infinite.

The general method is to average exe^x over the probability distribution of XX. This article works out the common Beta-distribution case and explains how the answer differs when XX itself has an exponential distribution.

The general expectation formula

For a discrete random variable with possible values xix_i and probabilities pip_i,

E[eX]=∑iexipi.\mathbb{E}[e^X] = \sum_i e^{x_i}p_i.

For a continuous random variable with density fX(x)f_X(x),

E[eX]=∫−∞∞exfX(x) dx,\mathbb{E}[e^X] = \int_{-\infty}^{\infty} e^x f_X(x)\,dx,

provided the integral is finite. If XX is supported only on an interval, integrate over that interval instead. More generally, the moment-generating function (MGF) is MX(t)=E[etX]M_X(t)=\mathbb{E}[e^{tX}], so the quantity in question is MX(1)M_X(1) when that value exists.

If X has a Beta distribution

Suppose X∼Beta⁡(a,b)X\sim\operatorname{Beta}(a,b), with a,b>0a,b>0. Its density on 0<x<10<x<1 is

fX(x)=xa−1(1−x)b−1B(a,b),f_X(x)=\frac{x^{a-1}(1-x)^{b-1}}{B(a,b)},

where B(a,b)B(a,b) is the beta function. Direct substitution gives

E[etX]=1B(a,b)∫01etxxa−1(1−x)b−1 dx=1F1(a;a+b;t).\mathbb{E}[e^{tX}] =\frac{1}{B(a,b)}\int_0^1 e^{tx}x^{a-1}(1-x)^{b-1}\,dx ={}_1F_1(a;a+b;t).

Here 1F1{}_1F_1 is the confluent hypergeometric function. Therefore,

E[eX]=1F1(a;a+b;1).\mathbb{E}[e^X]={}_1F_1(a;a+b;1).

This result can also be seen from the power series for the exponential. The kkth raw moment of a Beta random variable is E[Xk]=(a)k/(a+b)k\mathbb{E}[X^k]=(a)_k/(a+b)_k, where (q)k(q)_k is the rising factorial. Thus

E[etX]=∑k=0∞tkk!(a)k(a+b)k.\mathbb{E}[e^{tX}] =\sum_{k=0}^{\infty}\frac{t^k}{k!}\frac{(a)_k}{(a+b)_k}.

Because 0≤X≤10\leq X\leq1, this expectation is finite for every real tt.

Worked example: X ~ Beta(2,3)

For X∼Beta⁡(2,3)X\sim\operatorname{Beta}(2,3), the density is 12x(1−x)212x(1-x)^2 on 0<x<10<x<1. The expectation is

E[eX]=12∫01exx(1−x)2 dx=12∫01ex(x−2x2+x3) dx=132−48e≈1.5225.\begin{aligned} \mathbb{E}[e^X] &=12\int_0^1 e^x x(1-x)^2\,dx\\ &=12\int_0^1 e^x(x-2x^2+x^3)\,dx\\ &=132-48e\\ &\approx 1.5225. \end{aligned}

The result is plausible: XX lies between 0 and 1, so eXe^X lies between 1 and ee. In fact, E[X]=2/5\mathbb{E}[X]=2/5, and the convexity of exe^x implies E[eX]≥eE[X]≈1.4918\mathbb{E}[e^X]\geq e^{\mathbb{E}[X]}\approx1.4918, consistent with the computed value.

If X is exponentially distributed

A different interpretation is that XX itself has an exponential distribution. Use the rate convention X∼Exp⁡(λ)X\sim\operatorname{Exp}(\lambda), whose density is λe−λx\lambda e^{-\lambda x} for x≥0x\geq0. Then

E[eX]=λ∫0∞e(1−λ)x dx.\mathbb{E}[e^X] =\lambda\int_0^\infty e^{(1-\lambda)x}\,dx.

This integral converges only if λ>1\lambda>1. In that case,

E[eX]=λλ−1.\mathbb{E}[e^X]=\frac{\lambda}{\lambda-1}.

For λ≤1\lambda\leq1, the expectation is infinite. More generally, E[etX]=λ/(λ−t)\mathbb{E}[e^{tX}]=\lambda/(\lambda-t) for t<λt<\lambda. If the exponential distribution is parameterized by its mean (scale) θ=1/λ\theta=1/\lambda, the condition for E[eX]\mathbb{E}[e^X] to be finite is θ<1\theta<1, and the value is 1/(1−θ)1/(1-\theta).

Common mistakes

  • Confusing eXe^X with an exponential random variable. eXe^X is a function of XX; an exponential random variable instead has an exponential probability density.
  • Using only the mean of XX. In general, E[eX]≠eE[X]\mathbb{E}[e^X]\ne e^{\mathbb{E}[X]}. For example, the Beta example gives about 1.52251.5225, while eE[X]e^{\mathbb{E}[X]} is about 1.49181.4918.
  • Ignoring whether the expectation is finite. For an exponential random variable, the integral diverges when the rate is at most 1.
  • Mixing up rate and scale. The rate is λ\lambda in λe−λx\lambda e^{-\lambda x}; the scale is 1/λ1/\lambda. Check which convention is being used before applying a formula.

References

  1. NIST Digital Library of Mathematical Functions, Chapter 13: Confluent Hypergeometric Functions
  2. Continuous Univariate Distributions, Volume 2 — N. L. Johnson, S. Kotz, and N. Balakrishnan

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.