Properties of Expectation: Linearity and the Algebra of E(X)

Expectation is a linear operator. For any integrable random variables XX, YY, meaning E(∣X∣)E(|X|) and E(∣Y∣)E(|Y|) are finite, and constants a,b,ca, b, c:


  • E(aX+b)=aE(X)+bE(aX+b) = aE(X)+b
  • E(X+Y)=E(X)+E(Y)E(X+Y) = E(X)+E(Y) - this holds whether or not X and Y are independent
  • E(aX+bY+c)=aE(X)+bE(Y)+cE(aX+bY+c) = aE(X)+bE(Y)+c


These rules let you find the expected value of a combination of random variables even if you never know their joint distribution. The only thing you cannot always do is pull expectation inside a nonlinear function: in general E(g(X))≠g(E(X))E(g(X)) \ne g(E(X)), For integrable XX and YY, independence guarantees E(XY)=E(X)E(Y)E(XY)=E(X)E(Y), though equality can also occur for some dependent variables.

Probability mass function of the discrete random variable X

Probability mass function of the discrete random variable X

Worked example

Let XX be the number of heads in 3 fair coin flips, so E(X)=1.5E(X)=1.5. Let Y=2X+4Y = 2X+4 (perhaps Y is a payout in dollars). Then by linearity:


E(Y)=2E(X)+4=2(1.5)+4=7E(Y) = 2E(X)+4 = 2(1.5)+4 = 7


Notice we never needed the distribution of Y - only the number E(X)E(X) and the linear rule connecting X and Y.


Now compare with a nonlinear transformation: E(X2)E(X^2) is not (E(X))2(E(X))^2. For our coin example, E(X2)=3E(X^2)=3 (computed directly from the pmf of X, or as Var(X)+(E(X))2=0.75+2.25\text{Var}(X) + (E(X))^2 = 0.75 + 2.25), while (E(X))2=1.52=2.25(E(X))^2 = 1.5^2 = 2.25. These differ - a reminder that only linear combinations pass cleanly through the expectation operator.

Reading an expectation off a probability mass function

When the distribution is given as a list of values and probabilities, E(X)=∑x p(x)E(X) = \sum x\,p(x) is the probability-weighted average, not the ordinary average of the listed values.


For a variable taking 0, 10 and 20 with probabilities 0.5, 0.3 and 0.2, the expectation is 0(0.5)+10(0.3)+20(0.2)=70(0.5)+10(0.3)+20(0.2) = 7, well below the unweighted mean of 10, because the smallest value carries half the probability. Always confirm the probabilities sum to 1 before trusting the weighted sum.

The three-value distribution of W, with each probability written under its value, together with the straight line V = 2W + 1; the dashed line marks E(W) on the horizontal axis.

The three-value distribution of W, with each probability written under its value, together with the straight line V = 2W + 1; the dashed line marks E(W) on the horizontal axis.



Suppose E(X)=4E(X) = 4. What is E(3X+5)E(3X + 5)?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

In the figure, the random variable WW takes the three values shown on the horizontal axis with the probabilities marked beneath them, and its mean E(W)=2.1E(W) = 2.1 is indicated by the dashed line. The straight line shows the transformation V=2W+1V = 2W + 1. Using the properties of expectation rather than recomputing the full distribution of VV, what is E(V)E(V)?

The three-value distribution of W, with each probability written under its value, together with the straight line V = 2W + 1; the dashed line marks E(W) on the horizontal axis.

The three-value distribution of W, with each probability written under its value, together with the straight line V = 2W + 1; the dashed line marks E(W) on the horizontal axis.

Probability mass function of the discrete random variable X

Probability mass function of the discrete random variable X

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Random variables XX and YY are not known to be independent. Given E(X)=3E(X) = 3 and E(Y)=−2E(Y) = -2, find E(2X−3Y+1)E(2X - 3Y + 1).

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors