1.8. Expectation of a Random Variable¶
1.8.1. Expectation and Its Basic Properties¶
Definition 1.8.1 : Expectation
Let \(X\) be a random variable. If \(X\) is a continuous random variable with pdf \(f(x)\) and
then the expectation of \(X\) is
If \(X\) is a discrete random variable with pmf \(p(x)\) and
then the expectation of \(X\) is
The expectation \(E(X)\) is also called the mathematical expectation, expected value, or mean of \(X\). When the mean designation is used, \(E(X)\) is often denoted by \(\mu\); that is, \(\mu=E(X)\).
Theorem 1.8.2 : Expectation of a function of a random variable
Let \(X\) be a random variable and let \(Y=g(X)\) for a function \(g\).
-
(a) Suppose \(X\) has a pdf \(f_X(x)\). If \(\int_{-\infty}^{\infty}|g(x)|f_X(x)\,dx<\infty\), then the expectation of \(Y\) exists and is given by
\[ E(Y)=\int_{-\infty}^{\infty}g(x)f_X(x)\,dx. \] -
(b) Suppose \(X\) is discrete with pmf \(p_X(x)\) and support \(\mathcal{S}_X\). If \(\sum_{x\in\mathcal{S}_X}|g(x)|p_X(x)<\infty\), then the expectation of \(Y\) exists and is given by
\[ E(Y)=\sum_{x\in\mathcal{S}_X}g(x)p_X(x). \]
Proof
The continuous case is stated without proof. In the discrete case, the result follows by grouping the values of \(X\) that give the same value of \(Y\). Let \(\mathcal{S}_Y\) denote the support of \(Y\). Absolute convergence permits the regrouping
Thus \(E(Y)\) exists. The same regrouping is valid without the absolute values, so
Theorem 1.8.3 : Linearity of expectation
Let \(g_1(X)\) and \(g_2(X)\) be functions of a random variable \(X\) whose expectations exist. Then, for any constants \(k_1\) and \(k_2\), the expectation of \(k_1g_1(X)+k_2g_2(X)\) exists and
Proof
Suppose first that \(X\) is continuous with pdf \(f_X\). The triangle inequality gives
Hence the expectation exists. By the linearity of the integral and Theorem 1.8.2,
Now suppose that \(X\) is discrete with pmf \(p_X\) and support \(\mathcal{X}\). Since the expectations of \(g_1(X)\) and \(g_2(X)\) exist, the triangle inequality gives
Hence the expectation exists. By absolute convergence, the linearity of sums, and Theorem 1.8.2,