Adding Expectations Without an Independence Assumption
Expectations turn random quantities into numerical summaries, and many calculations require the expectation of a sum. The key fact is that expectation is linear: under appropriate finiteness conditions, the expectation of a sum is the sum of the expectations. No independence assumption is needed. A second basic fact is monotonicity: if one random variable is no larger than another, except possibly on an event of probability zero, then its expectation is no larger either. These facts are useful in probability calculations because they let us work with sums and inequalities without first finding the full distribution of every expression.
Work on a probability space \((\Omega,\mathcal{F},\mathbb{P})\). A real-valued random variable \(X\) is integrable if \(\mathbb{E}|X|<\infty\). For a discrete random variable with possible values \(x\) and probability mass function \(p_X(x)=\mathbb{P}(X=x)\), this means \(\sum_x |x|p_X(x)<\infty\), and its expectation is \(\mathbb{E}X=\sum_x xp_X(x)\). For a variable with density \(f_X\), integrability means \(\int_{\mathbb{R}}|x|f_X(x)\,dx<\infty\), and \(\mathbb{E}X=\int_{\mathbb{R}}xf_X(x)\,dx\).
In statements involving two random variables, the probability mass function or density of the pair describes their joint distribution. This matters because the variables may be dependent. The marginal expectations are calculated from their individual distributions, while a direct calculation of a function of both variables uses the joint distribution.
Proof. First suppose \((X,Y)\) has a discrete joint probability mass function \(p(x,y)=\mathbb{P}(X=x,Y=y)\). The inequality \(|aX+bY+c|\le |a||X|+|b||Y|+|c|\) shows that \(aX+bY+c\) is integrable: the expectation of the right side is \(|a|\mathbb{E}|X|+|b|\mathbb{E}|Y|+|c|<\infty\). Absolute convergence therefore permits summing over the joint support and regrouping terms. Since \(\sum_{x,y}p(x,y)=1\), and the marginal masses are obtained by summing the joint masses, we have $$ \begin{aligned} \mathbb{E}[aX+bY+c] &=\sum_{x,y}(ax+by+c)p(x,y)\\ &=a\sum_{x,y}x p(x,y)+b\sum_{x,y}y p(x,y)+c\sum_{x,y}p(x,y)\\ &=a\mathbb{E}X+b\mathbb{E}Y+c. \end{aligned} $$ For a pair with joint density \(f(x,y)\), the same integrability bound makes the integrands absolutely integrable. Linearity of integration then gives \(\int_{\mathbb{R}^2}(ax+by+c)f(x,y)\,dx\,dy=a\int_{\mathbb{R}^2}xf(x,y)\,dx\,dy+b\int_{\mathbb{R}^2}yf(x,y)\,dx\,dy+c\int_{\mathbb{R}^2}f(x,y)\,dx\,dy\). Integrating the joint density over the other coordinate gives the marginal densities, and the joint density integrates to \(1\). The expression is thus \(a\mathbb{E}X+b\mathbb{E}Y+c\), as claimed. \(\square\)
For a finite sum of integrable random variables, apply the two-variable result repeatedly. Thus \(\mathbb{E}[\sum_{k=1}^n a_kX_k]=\sum_{k=1}^n a_k\mathbb{E}X_k\) for finite \(n\) and finite constants \(a_k\). The statement concerns expectation of a sum; it does not say that the distribution of the sum can be found by adding marginal distributions.
Worked Example: An Affine Combination on a Discrete Joint Support
Suppose \((X,Y)\) takes the values \((0,1)\), \((2,0)\), and \((1,2)\) with probabilities \(\tfrac14,\tfrac14,\tfrac12\), respectively. Find \(\mathbb{E}[2X-3Y+1]\) in two ways.
The probabilities sum to \(\tfrac14+\tfrac14+\tfrac12=1\), so they define a probability distribution. First calculate the marginal expectations: $$ \mathbb{E}X=0\cdot\tfrac14+2\cdot\tfrac14+1\cdot\tfrac12=1,\qquad \mathbb{E}Y=1\cdot\tfrac14+0\cdot\tfrac14+2\cdot\tfrac12=\tfrac54. $$ Linearity gives \(\mathbb{E}[2X-3Y+1]=2(1)-3(\tfrac54)+1=-\tfrac34\).
Check by direct calculation on the joint support. The expression \(2X-3Y+1\) equals \(-2\) at \((0,1)\), \(5\) at \((2,0)\), and \(-3\) at \((1,2)\). Its expectation is \((-\!2)\tfrac14+5\tfrac14+(-\!3)\tfrac12=-\tfrac12+\tfrac54-\tfrac32=-\tfrac34\), agreeing with the linearity calculation.
Linearity with Joint Densities
For continuous random variables, a joint density provides a direct route to the same identity. If \(f(x,y)\) is the joint density of \((X,Y)\), then \(\mathbb{E}[aX+bY]\) is the integral of \(ax+by\) against \(f(x,y)\). When \(X\) and \(Y\) are integrable, this integral is absolutely convergent, so its terms can be separated and evaluated using the marginal densities. The joint density need not factor into a product: that product form would be an extra condition, not a requirement for linearity.
Worked Example: A Linear Function of a Joint Density
Let \((X,Y)\) have joint density \(f(x,y)=1\) on the square \(0\le x\le1,\ 0\le y\le1\), and \(f(x,y)=0\) elsewhere. Compute \(\mathbb{E}[3X+2Y]\) directly and by linearity.
The density is valid because its integral over the square is \(\int_0^1\int_0^1 1\,dy\,dx=1\). Direct integration gives $$ \begin{aligned} \mathbb{E}[3X+2Y] &=\int_0^1\int_0^1(3x+2y)\,dy\,dx\\ &=\int_0^1(3x+1)\,dx =\tfrac32+1=\tfrac52. \end{aligned} $$ For comparison, the marginal density of \(X\) is \(\int_0^1 1\,dy=1\) on \([0,1]\), and the marginal density of \(Y\) is \(\int_0^1 1\,dx=1\) on \([0,1]\). Hence \(\mathbb{E}X=\int_0^1 x\,dx=\tfrac12\) and \(\mathbb{E}Y=\int_0^1 y\,dy=\tfrac12\). Linearity gives \(3(\tfrac12)+2(\tfrac12)=\tfrac52\), the same value.
Monotonicity: Preserving Almost-Sure Order
For random variables, \(X\le Y\) almost surely means \(\mathbb{P}(X\le Y)=1\); the inequality is allowed to fail on a set of probability zero. Expectations are insensitive to changes on such sets. Monotonicity says that, when both variables are integrable, this almost-sure order is preserved after taking expectations.
Proof. Define \(D=Y-X\). Since \(|D|\le |Y|+|X|\), \(D\) is integrable. The assumption gives \(D\ge0\) almost surely. For a discrete joint distribution, \(\mathbb{E}D=\sum_{x,y}(y-x)p(x,y)\); every term with positive probability is nonnegative, so the sum is nonnegative. For a joint density, \(\mathbb{E}D=\int_{\mathbb{R}^2}(y-x)f(x,y)\,dx\,dy\). The integrand is nonnegative almost everywhere under the assumption, so its integral is nonnegative. In either setting, linearity gives \(\mathbb{E}Y-\mathbb{E}X=\mathbb{E}(Y-X)\ge0\), which proves the claim. \(\square\)
Worked Example: Comparing Two Ordered Discrete Variables
Suppose \((X,Y)\) takes \((0,1)\), \((2,3)\), and \((4,4)\) with probabilities \(\tfrac14,\tfrac12,\tfrac14\), respectively. Verify the order and compare the expectations.
The probabilities sum to \(\tfrac14+\tfrac12+\tfrac14=1\). At the three outcomes, \(0\le1\), \(2\le3\), and \(4\le4\), so \(X\le Y\) at every outcome of positive probability. The expectations are $$ \mathbb{E}X=0\cdot\tfrac14+2\cdot\tfrac12+4\cdot\tfrac14=2,\qquad \mathbb{E}Y=1\cdot\tfrac14+3\cdot\tfrac12+4\cdot\tfrac14=\tfrac{11}{4}. $$ Thus \(\mathbb{E}X\le\mathbb{E}Y\). As a second check, the differences \(Y-X\) at the three outcomes are \(1,1,0\), so \(\mathbb{E}(Y-X)=1\cdot\tfrac14+1\cdot\tfrac12+0\cdot\tfrac14=\tfrac34\). This agrees with \(\mathbb{E}Y-\mathbb{E}X=\tfrac{11}{4}-2=\tfrac34\).
Why the Conditions Matter
Monotonicity is useful for bounding expectations: if a random quantity can be bounded above or below by a simpler integrable variable, its expectation inherits that bound. Linearity can simplify a sum even when the variables are dependent. The joint distribution may affect other features of a sum, but it does not change this expectation identity.
Common mistake: requiring independence for linearity. In the first worked example, \(X\) and \(Y\) are dependent because the three listed pairs constrain which values occur together. It would be incorrect to say that \(\mathbb{E}[2X-3Y+1]\) cannot be split because of that dependence. The correct calculation uses linearity and gives \(2(1)-3(\tfrac54)+1=-\tfrac34\), which the direct joint-support calculation verifies.
Common mistake: using linearity when expectations are undefined. Integrability is not a technical decoration. For example, let a discrete variable \(X\) have probabilities \(\mathbb{P}(X=n)=\mathbb{P}(X=-n)=c/n^2\) for \(n\ge1\), where \(c\) is chosen to make the total probability one. Then the positive and negative parts of \(X\) both have infinite expectation, so \(\mathbb{E}X\) is undefined. Although \(X+(-X)=0\), writing \(\mathbb{E}[X+(-X)]=\mathbb{E}X+\mathbb{E}[-X]\) is not a valid numerical calculation: the right side is undefined. The theorem applies when the variables being combined are integrable.
For order comparisons, check the direction before taking expectations: \(X\le Y\) implies \(\mathbb{E}X\le\mathbb{E}Y\), not the reverse. The proof reduces the comparison to the nonnegativity of \(Y-X\). In a discrete model, check the difference at every joint outcome with positive probability; in a density model, check it almost everywhere under the joint density. Neither condition should be replaced by a comparison of unrelated marginal support endpoints.
Check Your Understanding
For each question, state any integrability condition you use and verify calculations by substitution or direct evaluation.
- If \(X\) and \(Y\) are integrable, what is \(\mathbb{E}[4X-Y+2]\), and is independence required?
- A discrete pair takes \((1,0)\) and \((3,2)\) with probabilities \(\tfrac12\) each. Compute \(\mathbb{E}(X+Y)\) directly and using linearity.
- If \(X\le Y\) almost surely and both are integrable, which difference has nonnegative expectation? Explain why.
- For a joint density \(f\), what condition makes the integral of \(aX+bY\) absolutely integrable when \(X\) and \(Y\) are integrable?
- Why does the identity for the expectation of a sum not imply that the random variables in the sum are independent?