Tutorials › Statistical Theory I - Probability and Distribution Theory › Definition and Elementary Characteristic Functions

Characteristic Functions · Tutorial 545 of 994

Definition and Elementary Characteristic Functions

Learn the definition of a characteristic function and how to calculate it directly for three basic distributions.

Advanced 9 min read

What You'll Learn

  • Define the characteristic function using a real argument and a complex exponential
  • Express characteristic functions as sums or integrals using a probability mass function or density
  • Derive the characteristic function of a Bernoulli random variable
  • Integrate directly to obtain the uniform and exponential characteristic functions
  • Handle the value at zero and check calculations against the distributions
  • Distinguish the characteristic function from the moment-generating function

From a Distribution to a Complex-Valued Function

A probability distribution can be summarized in many ways, but a characteristic function packages the whole distribution into an expectation of an oscillating complex exponential. The result is a function of a real argument \(t\), and its values may be complex even when the random variable itself is real. The calculations in this tutorial show how that expectation becomes a sum or an integral for elementary distributions.

The key point in direct calculation is to keep the exponent \(itx\) intact long enough to integrate it correctly. Here \(i\) is the imaginary unit, so \(i^2=-1\), and Euler's formula gives \(e^{itx}=\cos(tx)+i\sin(tx)\) for real \(t,x\). Thus the real and imaginary parts are ordinary expectations of cosine and sine, respectively.

Definition: For a real-valued random variable \(X\), its characteristic function is the function \(\varphi_X:\mathbb{R}\to\mathbb{C}\) defined by
$$ \varphi_X(t)=E[e^{itX}],\qquad t\in\mathbb{R}. $$
The expectation of a complex random variable is defined by taking expectations of its real and imaginary parts. In this case,
$$ \varphi_X(t)=E[\cos(tX)]+iE[\sin(tX)]. $$

This expectation is well-defined for every real \(t\), without requiring moments of \(X\). Indeed, \(|e^{itX}|=1\), so both its real and imaginary parts are bounded and have finite expectations. The argument \(t\) is real throughout this definition.

Writing the Expectation as a Sum or Integral

The expectation formula turns directly into a sum when \(X\) is discrete and into an integral when \(X\) has a density. These are applications of the standard expectation formula for a function of a random variable.

Theorem: If \(X\) has probability mass function \(f\) on a countable support \(\mathcal{X}\), then
$$ \varphi_X(t)=\sum_{x\in\mathcal{X}} e^{itx}f(x). $$
If \(X\) has density \(f\) with respect to Lebesgue measure, then
$$ \varphi_X(t)=\int_{-\infty}^{\infty}e^{itx}f(x)\,dx. $$

Justification. For a discrete random variable, the expectation of a function \(g(X)\) is \(\sum_{x\in\mathcal{X}}g(x)f(x)\) when the expectation exists. Take \(g(x)=e^{itx}\). The series is absolutely convergent because

$$ \sum_{x\in\mathcal{X}}|e^{itx}f(x)| =\sum_{x\in\mathcal{X}}f(x)=1. $$

For a random variable with density \(f\), the expectation formula is \(E[g(X)]=\int g(x)f(x)\,dx\) for integrable \(g(X)\). Here the integral is absolutely convergent since

$$ \int_{-\infty}^{\infty}|e^{itx}f(x)|\,dx =\int_{-\infty}^{\infty}f(x)\,dx=1. $$

Therefore the respective formulas apply. In either case, taking real and imaginary parts is equivalent to integrating or summing cosine and sine separately. This is useful when checking a complex calculation component by component.

Worked Calculations

The following examples use three common parameterizations: a Bernoulli success probability \(p\), a uniform distribution on an interval \((a,b)\), and an exponential distribution with rate \(\lambda\). Keeping the support and parameter convention explicit prevents many sign and scaling errors.

Worked Example: Bernoulli Random Variable

Let \(X\sim\operatorname{Bernoulli}(p)\), where \(P(X=1)=p\) and \(P(X=0)=1-p\), with \(0\leq p\leq1\). The support has only two points, so the discrete formula gives

$$ \begin{aligned} \varphi_X(t) &=e^{it\cdot 0}(1-p)+e^{it\cdot 1}p\\ &=(1-p)+pe^{it}\\ &=(1-p)+p\cos(t)+ip\sin(t). \end{aligned} $$

For example, take \(p=0.3\) and \(t=\pi/2\). Since \(e^{i\pi/2}=i\),

$$ \varphi_X(\pi/2)=0.7+0.3i. $$

The same value follows by separating the outcomes: the outcome \(X=0\) contributes \(0.7e^0=0.7\), and \(X=1\) contributes \(0.3e^{i\pi/2}=0.3i\). At \(t=0\), the formula gives \((1-p)+p=1\), as required for an expectation of the constant \(1\).

Worked Example: Uniform Distribution on an Interval

Let \(X\sim\operatorname{Uniform}(a,b)\), with \(a<b\). Its density is \(f(x)=1/(b-a)\) for \(a<x<b\), and zero elsewhere. For \(t\ne0\), integrate the complex exponential:

$$ \begin{aligned} \varphi_X(t) &=\frac{1}{b-a}\int_a^b e^{itx}\,dx\\ &=\frac{1}{b-a}\left[\frac{e^{itx}}{it}\right]_{a}^{b}\\ &=\frac{e^{itb}-e^{ita}}{it(b-a)}. \end{aligned} $$

The antiderivative is \(e^{itx}/(it)\) because its derivative with respect to \(x\) is \(e^{itx}\). The displayed expression is not used at \(t=0\), where division by \(t\) would be undefined. At zero, the defining expectation gives \(\varphi_X(0)=1\).

As a numerical check, take \(X\sim\operatorname{Uniform}(0,1)\) and \(t=\pi\). Then

$$ \varphi_X(\pi) =\frac{e^{i\pi}-1}{i\pi} =\frac{-2}{i\pi} =\frac{2i}{\pi}. $$

Directly from the real and imaginary parts, \(E[\cos(\pi X)]=\int_0^1\cos(\pi x)\,dx=0\), while \(E[\sin(\pi X)]=\int_0^1\sin(\pi x)\,dx=2/\pi\). These agree with the complex integral.

Worked Example: Exponential Distribution With Rate Parameter

Let \(X\sim\operatorname{Exponential}(\lambda)\), where \(\lambda>0\) is the rate, so the density is \(f(x)=\lambda e^{-\lambda x}\) for \(x\geq0\). For real \(t\), combine the real and imaginary terms in the exponent:

$$ \begin{aligned} \varphi_X(t) &=\int_0^\infty e^{itx}\lambda e^{-\lambda x}\,dx\\ &=\lambda\int_0^\infty e^{-(\lambda-it)x}\,dx. \end{aligned} $$

Because the real part of \(\lambda-it\) is \(\lambda>0\), the endpoint term \(e^{-(\lambda-it)R}\) tends to zero as \(R\to\infty\): its magnitude is \(e^{-\lambda R}\). Evaluating first on \([0,R]\) and then taking the limit gives

$$ \begin{aligned} \varphi_X(t) &=\lambda\lim_{R\to\infty} \left[-\frac{e^{-(\lambda-it)x}}{\lambda-it}\right]_{0}^{R}\\ &=\frac{\lambda}{\lambda-it}. \end{aligned} $$

For instance, if the rate is \(\lambda=2\) and \(t=1\), then

$$ \varphi_X(1)=\frac{2}{2-i} =\frac{2(2+i)}{(2-i)(2+i)} =\frac{4+2i}{5}. $$

The real and imaginary parts are \(4/5\) and \(2/5\). Equivalently, \(\varphi_X(1)=E[\cos X]+iE[\sin X]\), so the complex result records both expectations in one value.

A Basic Check at the Origin

Every characteristic function has a simple value at \(t=0\). This is both a useful check on a formula and a direct consequence of the definition.

Proposition: For every real-valued random variable \(X\), \(\varphi_X(0)=1\).

Proof. Since \(e^{i0X}=e^0=1\) for every outcome, the definition gives

$$ \varphi_X(0)=E[e^{i0X}]=E[1]=1. $$

This argument requires no density, mass function, or moment assumption. In the formulas above, the Bernoulli expression gives \((1-p)+p=1\), and the integral formulas give the same value either directly from the defining expectation or by evaluating the integral at \(t=0\) before using any expression that divides by \(t\). \(\square\)

Why the Complex Form Matters

The characteristic function turns a distribution into a function whose values retain oscillatory information about where probability is located. The complex exponential is compact notation for two real transforms at once: cosine averages and sine averages. In calculations, it is often more efficient to integrate the single exponential and then, if needed, identify its real and imaginary parts.

Unlike the moment-generating function, which uses \(E[e^{sX}]\) and may fail to exist for some real \(s\), the characteristic function is defined for every real \(t\). For real \(X\), the integrand \(e^{itX}\) has real and imaginary parts bounded in absolute value by one, so their expectations exist. The parameter \(t\) is not a moment-generating-function argument: it appears multiplied by \(i\), producing oscillation rather than exponential growth.

Common Mistakes

  • Dropping the \(i\). Replacing \(e^{itx}\) by \(e^{tx}\) changes the function and may produce an integral that does not converge. Keep the imaginary unit in the exponent.
  • Using the wrong exponential parameterization. Here \(\lambda\) is a rate, so the density is \(\lambda e^{-\lambda x}\) and the result is \(\lambda/(\lambda-it)\). A scale parameter would require a different density and a correspondingly rewritten formula.
  • Applying the uniform formula at \(t=0\). The expression with denominator \(it\) is derived only for \(t\ne0\). At zero, evaluate the characteristic function from its definition.
  • Assuming the answer must be real. A characteristic function can have a nonzero imaginary part, as the Bernoulli and exponential examples show. The imaginary part is \(E[\sin(tX)]\), not an algebraic error by itself.
Key takeaway: Start from \(\varphi_X(t)=E[e^{itX}]\), substitute the mass function or density, and evaluate the resulting sum or complex integral. State the distribution's parameter convention and handle \(t=0\) separately whenever a derived formula contains division by \(t\).

Check Your Understanding

Use the defining expectation and the parameter conventions stated in each question.

  1. For \(X\sim\operatorname{Bernoulli}(p)\), write \(\varphi_X(t)\) and identify its real and imaginary parts.
  2. For \(X\sim\operatorname{Uniform}(2,5)\), calculate \(\varphi_X(t)\) for \(t\ne0\). What is its value at \(t=0\)?
  3. For an exponential random variable with rate \(\lambda\), explain why the endpoint term in the improper integral vanishes as the upper limit tends to infinity.
  4. Calculate the characteristic function at \(t=1\) for an exponential distribution with rate \(1\).
  5. Why is the characteristic function defined for every real \(t\) even when the moment-generating function does not exist at some real argument?