콘텐츠로 이동

1.9. Some Special Expectations

1.9.1. Mean and Variance

Definition 1.9.1 : Mean

Let \(X\) be a random variable whose expectation exists. The mean value \(\mu\) of \(X\) is defined to be \(\mu=E(X)\).

Definition 1.9.2 : Variance

Let \(X\) be a random variable with finite mean \(\mu\) such that \(E\left[(X-\mu)^{2}\right]\) is finite. The variance of \(X\) is defined to be \(E\left[(X-\mu)^{2}\right]\). It is usually denoted by \(\sigma^{2}\) or by \(\operatorname{Var}(X)\).

Theorem 1.9.3 : Variance formula

Let \(\mu=E(X)\) and \(\sigma^{2}=\operatorname{Var}(X)\). Then

\[ \operatorname{Var}(X)=E\left(X^{2}\right)-[E(X)]^{2}. \]

This formula often provides an easier way to compute the variance of \(X\).

Proof

Expanding the square and using the linearity of \(E\) gives

\[ \begin{aligned} \sigma^{2} &=E\left[(X-\mu)^{2}\right] \\ &=E\left(X^{2}-2\mu X+\mu^{2}\right) \\ &=E\left(X^{2}\right)-2\mu E(X)+\mu^{2} \\ &=E\left(X^{2}\right)-2\mu^{2}+\mu^{2} \\ &=E\left(X^{2}\right)-\mu^{2}. \end{aligned} \]

Definition 1.9.4 : Standard deviation

The standard deviation of \(X\) (or of its distribution) is \(\sigma\), the positive square root of the variance.

The number \(\sigma\) is sometimes interpreted as a measure of the dispersion of the points of the space relative to the mean value \(\mu\). If the space contains only one point \(k\) for which \(p(k)>0\), then \(p(k)=1\), \(\mu=k\), and \(\sigma=0\).

Theorem 1.9.5 : Variance of a linear transformation

Let \(X\) be a random variable with finite mean \(\mu\) and variance \(\sigma^{2}\). Then for all constants \(a\) and \(b\),

\[ \operatorname{Var}(a X+b)=a^{2}\operatorname{Var}(X). \]

Proof

Because \(E\) is linear, \(E(a X+b)=a\mu+b\). Hence, by definition,

\[ \operatorname{Var}(a X+b) =E\left\{[(a X+b)-(a\mu+b)]^{2}\right\} =E\left\{a^{2}[X-\mu]^{2}\right\} =a^{2}\operatorname{Var}(X). \]

Corollary 1.9.6 : Standard deviation under an affine transformation

For standard deviations,

\[ \sigma_{a X+b}=|a|\sigma_X. \]

1.9.2. Moment Generating Function

Definition 1.9.7 : Moment generating function

Let \(X\) be a random variable such that, for some \(h>0\), the expectation of \(e^{tX}\) exists for \(-h<t<h\). The moment generating function of \(X\), abbreviated mgf, is the function

\[ M(t)=E\left(e^{tX}\right), \qquad -h<t<h. \]

When discussing several random variables, we may write \(M_X\) to denote the mgf of \(X\).

Example 1.9.8 : Moment generating function for a spinner

Suppose a fair spinner has the numbers 1, 2, and 3, and the spins are independent. Let \(X\) be the number of spins until the first 3 occurs. The pmf of \(X\) is

\[ p(x)=\frac{1}{3}\left(\frac{2}{3}\right)^{x-1}, \quad x=1,2,3,\ldots \]

Using the geometric series (Theorem 1.2.13), the mgf of \(X\) is

\[ \begin{aligned} M(t)=E\left(e^{tX}\right) &=\sum_{x=1}^{\infty}e^{tx}\frac{1}{3}\left(\frac{2}{3}\right)^{x-1} \\ &=\frac{1}{3}e^t\sum_{x=1}^{\infty}\left(e^t\frac{2}{3}\right)^{x-1} \\ &=\frac{1}{3}e^t\left(1-e^t\frac{2}{3}\right)^{-1}, \end{aligned} \]

provided that \(e^t(2/3)<1\), or equivalently, \(t<\log(3/2)\). This interval is an open interval about 0, so the mgf of \(X\) exists and is given by the final expression above.

Theorem 1.9.9 : Uniqueness of moment generating functions

Let \(X\) and \(Y\) be random variables with moment generating functions \(M_X\) and \(M_Y\), respectively, existing in open intervals about \(0\). Then \(F_X(z)=F_Y(z)\) for all \(z \in \mathbb{R}\) if and only if \(M_X(t)=M_Y(t)\) for all \(t \in (-h,h)\) for some \(h>0\).

This theorem is used without proof.

Example 1.9.10 : Identifying discrete distributions from their mgfs

The discrete case illustrate the uniqueness of a distribution determined by its mgf.

Suppose a random variable \(X\) of the discrete type has mgf

\[ M(t)=\frac{1}{10}e^t+\frac{2}{10}e^{2t}+\frac{3}{10}e^{3t}+\frac{4}{10}e^{4t},\qquad t\in\mathbb{R}. \]

If \(p(x)\) is its pmf with support \(\{a_1,a_2,a_3,\ldots\}\), then

\[ M(t)=\sum_x e^{tx}p(x), \]

so

\[ \frac{1}{10}e^t+\frac{2}{10}e^{2t}+\frac{3}{10}e^{3t}+\frac{4}{10}e^{4t} =p(a_1)e^{a_1t}+p(a_2)e^{a_2t}+\cdots. \]

Since this identity holds for every real \(t\), it suggests that the right-hand side consists of four terms matching those on the left. Thus we may take \(a_i=i\) and \(p(a_i)=i/10\) for \(i=1,2,3,4\), giving

\[ p(x)=\begin{cases} \dfrac{x}{10} & x=1,2,3,4,\\ 0 & \text{elsewhere}. \end{cases} \]

Example 1.9.11 : Identifying continuous distributions from their mgfs

The continuous case illustrates the uniqueness of a distribution determined by its mgf.

Suppose \(X\) is of the continuous type and has mgf

\[ M(t)=\frac{1}{1-t},\qquad t<1. \]

Its pdf \(f(x)\) must satisfy

\[ \frac{1}{1-t}=\int_{-\infty}^{\infty}e^{tx}f(x)\,dx,\qquad t<1. \]

Although it is not obvious how to recover \(f(x)\) directly from this identity, consider the pdf

\[ f(x)=\begin{cases} e^{-x} & 0<x<\infty,\\ 0 & \text{elsewhere}. \end{cases} \]

Substituting this pdf into the defining integral gives, for \(t<1\),

\[ \begin{aligned} M(t) &=\int_{-\infty}^{\infty}e^{tx}f(x)\,dx\\ &=\int_0^{\infty}e^{tx}e^{-x}\,dx\\ &=\int_0^{\infty}e^{-(1-t)x}\,dx\\ &=\lim_{b\to\infty}\left[-\frac{e^{-(1-t)x}}{1-t}\right]_0^b\\ &=\frac{1}{1-t}. \end{aligned} \]

The last equality holds because \(1-t>0\), so \(e^{-(1-t)b}\to0\) as \(b\to\infty\). Thus this pdf has the required mgf \(M(t)=(1-t)^{-1}\) for \(t<1\). By the uniqueness of the mgf in Theorem 1.9.9, \(X\) has a distribution with this pdf.

Theorem 1.9.12 : Existence of derivatives of all orders

If the mgf \(M_X(t)=E[e^{tX}]\) is finite for \(-h<t<h\) for some \(h>0\), then derivatives of \(M_X\) of every order exist at \(t=0\), and

\[ M_X^{(n)}(0)=E[X^n],\qquad n=0,1,2,\ldots. \]

Moreover,

\[ M_X(t)=\sum_{n=0}^\infty \frac{E[X^n]}{n!}t^n \quad\text{for all }|t|<h. \]

Proof

Choose any \(a\) with \(0<a<h\). Since \(e^{a|x|}\leq e^{ax}+e^{-ax}\) for every real \(x\),

\[ E[e^{a|X|}]\leq M_X(a)+M_X(-a)<\infty. \]

The exponential series has nonnegative terms, so

\[ \frac{a^n|x|^n}{n!}\leq e^{a|x|},\qquad n=0,1,2,\ldots. \]

Taking expectations gives

\[ E[|X|^n]\leq \frac{n!}{a^n}E[e^{a|X|}]<\infty. \]

Thus every moment \(E[X^n]\) exists and is finite.

To obtain a power series for \(M_X\), fix \(t\) with \(0<|t|<a\) and let \(q=|t|/a<1\). By the exponential series, for every nonnegative integer \(N\),

\[ \begin{aligned} \left|e^{tx}-\sum_{n=0}^{N}\frac{t^nx^n}{n!}\right| &\leq \sum_{n=N+1}^{\infty}\frac{|t|^n|x|^n}{n!}\\ &\leq q^{N+1}\sum_{n=N+1}^{\infty}\frac{a^n|x|^n}{n!}\\ &\leq q^{N+1}e^{a|x|}. \end{aligned} \]

Taking expectations and using linearity for the finite sum yields

\[ \left|M_X(t)-\sum_{n=0}^{N}\frac{E[X^n]}{n!}t^n\right| \leq q^{N+1}E[e^{a|X|}]\longrightarrow 0. \]

The identity also holds at \(t=0\), where \(M_X(0)=1\), so

\[ M_X(t)=\sum_{n=0}^{\infty}\frac{E[X^n]}{n!}t^n,\qquad |t|<a. \]

This argument justifies the expansion by bounding the expected remainder directly. Moreover, the moment bound gives

\[ \sum_{n=0}^{\infty}\left|\frac{E[X^n]}{n!}t^n\right| \leq E[e^{a|X|}]\sum_{n=0}^{\infty}\left(\frac{|t|}{a}\right)^n <\infty,\qquad |t|<a. \]

Hence the power series has radius of convergence at least \(a\) and can be differentiated term by term any number of times within this interval. For each nonnegative integer \(k\),

\[ M_X^{(k)}(t)=\sum_{n=k}^{\infty}\frac{E[X^n]}{(n-k)!}t^{n-k},\qquad |t|<a. \]

Evaluating at \(t=0\) leaves only the term with \(n=k\), giving

\[ M_X^{(k)}(0)=E[X^k]. \]

Since \(a\) can be chosen arbitrarily close to \(h\), the power series representation in fact holds for every \(|t|<h\).

Definition 1.9.13 : Moment of a distribution

\(E\left(X^{m}\right)\) is called the \(m\)th moment of the distribution, or the \(m\)th moment of \(X\).

Example 1.9.14 : A distribution without an mgf

The series

\[ \frac{1}{1^{2}}+\frac{1}{2^{2}}+\frac{1}{3^{2}}+\cdots \]

converges to \(\pi^{2}/6\). Therefore,

\[ p(x)=\begin{cases} \dfrac{6}{\pi^{2}x^{2}} & x=1,2,3,\ldots,\\ 0 & \text{elsewhere} \end{cases} \]

is the pmf of a discrete random variable \(X\). The mgf of this distribution, if it exists, is given by

\[ \begin{aligned} M(t)&=E\left(e^{tX}\right)=\sum_x e^{tx}p(x)\\ &=\sum_{x=1}^{\infty}\frac{6e^{tx}}{\pi^{2}x^{2}}. \end{aligned} \]

By the ratio test, this series diverges if \(t>0\). Thus, there is no positive number \(h\) such that \(M(t)\) exists for \(-h<t<h\). Accordingly, this distribution has a pmf but does not have an mgf.

Example 1.9.15 : Nonexistence of the Cauchy mgf

Let \(X\) be a continuous random variable with pdf

\[ f(x)=\frac{1}{\pi}\frac{1}{x^{2}+1}, \quad -\infty<x<\infty. \]

This is the Cauchy pdf.

Let \(t>0\) be given. If \(x>0\), then the mean value theorem gives, for some \(0<\xi_{0}<tx\),

\[ \frac{e^{tx}-1}{tx}=e^{\xi_{0}}\geq 1. \]

Hence, \(e^{tx}\geq 1+tx\geq tx\), which yields the second inequality below:

\[ \begin{aligned} \int_{-\infty}^{\infty}e^{tx}\frac{1}{\pi}\frac{1}{x^{2}+1}\,dx &\geq \int_{0}^{\infty}e^{tx}\frac{1}{\pi}\frac{1}{x^{2}+1}\,dx \\ &\geq \int_{0}^{\infty}\frac{1}{\pi}\frac{tx}{x^{2}+1}\,dx=\infty. \end{aligned} \]

Because \(t>0\) was arbitrary, the integral does not exist in an open interval about \(0\). Hence, the mgf of the Cauchy distribution does not exist.

Example 1.9.16 : Moments from a Maclaurin series

Let \(X\) have the mgf

\[ M(t)=e^{t^{2}/2}, \qquad -\infty<t<\infty. \]

As discussed in Chapter 3, this is the mgf of a standard normal distribution. The moments of \(X\) can be found by repeatedly differentiating \(M(t)\), or by comparing coefficients in its Maclaurin series. Expanding the exponential gives

\[ \begin{aligned} e^{t^{2}/2} &=1+\frac{1}{1!}\left(\frac{t^{2}}{2}\right) +\frac{1}{2!}\left(\frac{t^{2}}{2}\right)^{2} +\cdots+\frac{1}{k!}\left(\frac{t^{2}}{2}\right)^{k}+\cdots \\ &=1+\frac{1}{2!}t^{2}+\frac{(3)(1)}{4!}t^{4} +\cdots+\frac{(2k-1)\cdots(3)(1)}{(2k)!}t^{2k}+\cdots. \end{aligned} \]

On the other hand, the Maclaurin series of \(M(t)\) is

\[ \begin{aligned} M(t) &=M(0)+\frac{M^{\prime}(0)}{1!}t +\frac{M^{\prime\prime}(0)}{2!}t^{2} +\cdots+\frac{M^{(m)}(0)}{m!}t^{m}+\cdots \\ &=1+\frac{E(X)}{1!}t+\frac{E\left(X^{2}\right)}{2!}t^{2} +\cdots+\frac{E\left(X^{m}\right)}{m!}t^{m}+\cdots. \end{aligned} \]

Thus the coefficient of \(t^{m}/m!\) is \(E\left(X^{m}\right)\). Comparing the two expansions yields

\[ \begin{aligned} E\left(X^{2k}\right) &=(2k-1)(2k-3)\cdots(3)(1) =\frac{(2k)!}{2^{k}k!}, \qquad k=1,2,3,\ldots, \\ E\left(X^{2k-1}\right) &=0, \qquad k=1,2,3,\ldots. \end{aligned} \]

This result is used in Section 3.4.

1.9.3. Characteristic Function

Definition 1.9.17 : Characteristic function

Let \(i\) denote the imaginary unit and \(t\) an arbitrary real number. The characteristic function of the distribution of \(X\) is defined by

\[ \varphi(t)=E\left(e^{i t X}\right). \]

This expectation exists for every distribution.

Theorem 1.9.18 : Existence of the characteristic function

The characteristic function \(\varphi(t)\) exists for every \(t\in\mathbb{R}\) and satisfies

\[ |\varphi(t)|\leq1. \]

Proof

Suppose \(X\) is continuous with pdf \(f(x)\). For every real \(t\) and \(x\),

\[ |e^{itx}|=|\cos tx+i\sin tx| =\sqrt{\cos^{2}tx+\sin^{2}tx}=1. \]

Since \(f(x)\geq0\), we have

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

Thus the integral defining \(\varphi(t)\) converges absolutely for every \(t\in\mathbb{R}\). Moreover,

\[ |\varphi(t)| =\left|\int_{-\infty}^{\infty}e^{itx}f(x)\,dx\right| \leq\int_{-\infty}^{\infty}|e^{itx}f(x)|\,dx=1. \]

In the discrete case, the same argument applies with a summation in place of the integral.

Theorem 1.9.19 : Uniqueness of characteristic functions and distributions

Every probability distribution has a unique characteristic function, and each characteristic function corresponds to a unique probability distribution.

This theorem is used without proof.

Theorem 1.9.20 : Obtaining moments from the characteristic function

Let \(X\) have characteristic function \(\varphi(t)=E(e^{itX})\). If \(E(|X|^n)<\infty\) for a positive integer \(n\), then \(\varphi\) is \(n\) times continuously differentiable on \(\mathbb{R}\) and, for each \(k=1,\ldots,n\),

\[ \varphi^{(k)}(t)=E\left[(iX)^k e^{itX}\right]. \]

In particular,

\[ \varphi^{(k)}(0)=i^kE(X^k), \qquad E(X^k)=\frac{\varphi^{(k)}(0)}{i^k}. \]

Proof

Since \(|x|^k\leq 1+|x|^n\) for \(0\leq k\leq n\), all the expectations

\[ F_k(t)=E\left[(iX)^k e^{itX}\right], \qquad k=0,\ldots,n, \]

are finite, and \(F_0=\varphi\). We prove that \(F_k'=F_{k+1}\) for \(k<n\) by controlling the difference quotient explicitly. Elementary calculus gives, for real \(u\),

\[ |e^{iu}-1|\leq |u|, \qquad |e^{iu}-1-iu|\leq \frac{u^2}{2}. \]

For \(h\neq 0\),

\[ \frac{F_k(t+h)-F_k(t)}{h}-F_{k+1}(t) =E\left[(iX)^k e^{itX} \left(\frac{e^{ihX}-1}{h}-iX\right)\right]. \]

On \(|X|\leq A\), the absolute value of the integrand is at most \(|h|A^{k+2}/2\). On \(|X|>A\), it is at most \(2|X|^{k+1}\). Writing \(\mathbf{1}_{\{|X|>A\}}\) for the indicator of the event \(|X|>A\), we obtain

\[ \left|\frac{F_k(t+h)-F_k(t)}{h}-F_{k+1}(t)\right| \leq \frac{|h|A^{k+2}}{2} +2E\left[|X|^{k+1}\mathbf{1}_{\{|X|>A\}}\right]. \]

The second term tends to zero as \(A\to\infty\) because it is the tail of the finite absolute moment \(E(|X|^{k+1})\). First choose \(A\) so that this term is arbitrarily small, and then let \(h\to 0\) with \(A\) fixed. This proves \(F_k'(t)=F_{k+1}(t)\), so induction gives the asserted derivative formula.

The same separation into \(|X|\leq A\) and \(|X|>A\) gives

\[ |F_n(t+h)-F_n(t)| \leq |h|A^{n+1} +2E\left[|X|^n\mathbf{1}_{\{|X|>A\}}\right]. \]

Choosing \(A\) first and then letting \(h\to 0\) proves continuity of \(F_n\). Each \(F_k\) with \(k<n\) is differentiable and hence continuous. Thus \(\varphi\) is \(n\) times continuously differentiable, and evaluating at \(t=0\) gives the moment identities.

Note that the existence of a characteristic function alone does not guarantee differentiability. For example, a standard Cauchy random variable has characteristic function \(\varphi(t)=e^{-|t|}\), whose left and right derivatives at zero are \(1\) and \(-1\), respectively.

Concept 1.9.21 : Connection to Laplace and Fourier transforms

The moment-generating function \(M(t)\) and the characteristic function \(\varphi(t)\) are similar to Laplace and Fourier transforms. The uniqueness of these transforms allows us to assert the uniqueness of the moment-generating and characteristic functions.