Discord

INAIO Guide Stage 1 9Random Variables and Expected Value

9.3 Linearity of expectation

Add expectations directly, even for dependent variables, and use indicators to count events.

Sometimes the full distribution of a total is difficult to find, but the average contribution of each part is easy. Linearity of expectation lets you add those contributions. It is especially useful for counts of many events that overlap or depend on one another.

This is intermediate probability. Review expectation in Module 9.2, then see MIT OpenCourseWare's lecture notes on indicators and linearity.

A basic idea: add the parts

For random variables X1,…,XnX_1,\ldots,X_n with finite expectations,

E[X1+⋯+Xn]=E[X1]+⋯+E[Xn].E[X_1+\cdots+X_n]=E[X_1]+\cdots+E[X_n].

The variables do not need to be independent. This is a statement about averages, not a claim that their probabilities multiply. If a total is a count, let IiI_i be 11 when event ii happens and 00 otherwise. Then E[Ii]=P(Ii=1)E[I_i]=P(I_i=1) and

E[number of events]=∑iP(event i).E[\text{number of events}]=\sum_i P(\text{event }i).

Three card-match indicators each have expected value one third, and their expected values add to one expected match even though the events are dependent.Three card-match indicators each have expected value one third, and their expected values add to one expected match even though the events are dependent.
Add the expected contributions without assuming independence.

A quick tour of properties

Constants also pass through sums: E[aX+bY+c]=aE[X]+bE[Y]+cE[aX+bY+c]=aE[X]+bE[Y]+c. Linearity works for any finite number of terms with finite expectations. It does not say E[XY]=E[X]E[Y]E[XY]=E[X]E[Y] without further conditions.

Application 1: matching cards

Three distinct cards are placed at random, one per envelope, into three matching labelled envelopes. Let Ii=1I_i=1 if card ii lands in its matching envelope. How many matches are expected?

  1. Each card has probability 1/31/3 of matching its own envelope.
  2. The total matches are M=I1+I2+I3M=I_1+I_2+I_3.
  3. E[M]=1/3+1/3+1/3=1E[M]=1/3+1/3+1/3=1 match.

The match events are dependent: matching two cards forces the third. Linearity still works.

Application 2: two dependent costs

Rain has probability 0.30.3. Transport costs 1010 on a dry day and 1212 on a rainy day; on rainy days you also pay 44 for shelter. Let XX be the transport cost and YY the shelter cost. Both depend on the weather, so they are dependent. Still,

E[X+Y]=E[X]+E[Y]=[10(0.7)+12(0.3)]+[4(0.3)]=10.6+1.2=11.8.E[X+Y]=E[X]+E[Y]=[10(0.7)+12(0.3)]+[4(0.3)]=10.6+1.2=11.8.

Check directly: the total is 1010 or 1616, and 10(0.7)+16(0.3)=11.810(0.7)+16(0.3)=11.8.

Resources

SourceTitleWhy read it
MIT OpenCourseWareLecture 22: ExpectationSee indicator variables and linearity applied to counts.

Finished this module? Mark it done.

Comments

Stuck on something, spotted a mistake, or found a resource that helped you? Tell us below.

Loading comments