Prob and StatsRandom Variables

Sums and Differences of Random Variables

Means add; for independent variables, variances add.

Not started Jump to practice

A commute has two legs; a package's weight is box plus contents; a test score is part 1 plus part 2. Each piece is random, and we want the mean and spread of the total. You already know how shifting and scaling affect the mean and standard deviation of one variable. Now we combine two.

Key idea

For any random variables: $E(X + Y) = E(X) + E(Y)$ and $E(X - Y) = E(X) - E(Y)$. If $X$ and $Y$ are independent: $$\text{Var}(X + Y) = \text{Var}(X - Y) = \text{Var}(X) + \text{Var}(Y).$$ Variances add; standard deviations do not. Also $E(a + bX) = a + bE(X)$ and $\sigma_{a + bX} = |b|\sigma_X$.

Why it works

Means add because averages of sums are sums of averages. For variance, write the deviation of the sum as $(X - \mu_X) + (Y - \mu_Y)$ and square it: $$\text{Var}(X + Y) = \text{Var}(X) + \text{Var}(Y) + 2E[(X - \mu_X)(Y - \mu_Y)].$$ For independent variables the last term is 0: a high X is equally likely to come with a high or a low Y, so the cross products cancel on average. For $X - Y$, the cross term flips sign but is still 0, and $\text{Var}(-Y) = (-1)^2\text{Var}(Y)$, so the variances add again. Like the legs of a right triangle, independent spreads combine by the Pythagorean rule, not by plain addition.

Worked example: A two-part commute

The drive to the station has mean 20 minutes and SD 3. The train ride has mean 35 minutes and SD 4, independent of the drive. Find the mean and SD of the total time.
  1. Mean: $20 + 35 = 55$ minutes.
  2. Variances: $3^2 + 4^2 = 9 + 16 = 25$.
  3. SD: $\sqrt{25} = 5$ minutes (not $3 + 4 = 7$).

Answer: Mean 55 minutes, SD 5 minutes.

Worked example: A difference

With the same X and Y, find the SD of $Y - X$, how much longer the train ride is than the drive.
  1. Mean: $35 - 20 = 15$ minutes.
  2. Variances still add: $\text{Var}(Y - X) = 16 + 9 = 25$.
  3. SD: $5$ minutes. Subtracting one uncertain amount from another does not cancel the uncertainty.

Answer: Mean 15 minutes, SD 5 minutes.

Worked example: Many independent pieces

Each bag of apples weighs a mean of 10 pounds with SD 2 pounds, independently. Find the mean and SD of the total weight of 4 bags.
  1. Mean: $4 \times 10 = 40$ pounds.
  2. Variance: $4 \times 2^2 = 16$.
  3. SD: $\sqrt{16} = 4$ pounds, which is $2\sqrt{4}$, not $4 \times 2 = 8$.

Answer: Mean 40 pounds, SD 4 pounds.

The sum of two dice: each die has SD about 1.71, and the sum has SD √2 × 1.71 ≈ 2.42, not 3.42. Extreme sums are rare because high and low rolls tend to offset.

Common mistake

Adding standard deviations ($3 + 4 = 7$), or subtracting variances for a difference ($16 - 9$). Check: for independent pieces, always square the SDs, add, then take the square root, whether you are adding or subtracting the variables.

Practice

Pass with 3 right answers, the last 2 in a row. Each right answer earns 3 XP.

Loading practice…

Builds on

Leads to

Sources and further reading

  • OpenStax, Introductory Statistics 2e, section 4.2 Mean or Expected Value and Standard Deviation
  • MIT OpenCourseWare, 18.05 Introduction to Probability and Statistics (Spring 2014): readings on expectation and variance of random variables
@teddyrookbook GitHub