Menu
Sign up Sign in

AI HL · AHL 8

Statistics 2

AHL 8.4

Linear combinations of random variables

AHL 8.4

Linear combinations of random variables

Target: I can find the mean and variance of \(aX+b\) from \(E(X)\) and \(\mathrm{Var}(X)\). (+4 more)

By the end of this section

Key points

One variable: \(aX+b\)

  • \(E(aX+b)=aE(X)+b\) and \(\mathrm{Var}(aX+b)=a^2\mathrm{Var}(X)\).
  • Adding \(b\) moves every value but does not change the spread, so \(b\) is not in the variance.
  • The variance uses \(a^2\). A negative \(a\) gives a positive multiplier: \(\mathrm{Var}(5-2X)=4\,\mathrm{Var}(X)\).
  • Standard deviation: \(\text{sd}(aX+b)=|a|\times\text{sd}(X)\).

Several independent variables

  • \(E(aX+bY+c)=aE(X)+bE(Y)+c\), always.
  • \(\mathrm{Var}(aX+bY+c)=a^2\mathrm{Var}(X)+b^2\mathrm{Var}(Y)\), only when \(X\) and \(Y\) are independent.
  • A difference still adds variances: \(\mathrm{Var}(X-Y)=\mathrm{Var}(X)+\mathrm{Var}(Y)\).
  • It extends to any number of independent variables: square each coefficient, add the terms.
  • Brackets and fractions: expand first, or divide the top by the number for the mean and by the number squared for the variance.

Two observations or one doubled

  • \(X_1+X_2\) is two different observations of \(X\): mean \(2E(X)\), variance \(2\,\mathrm{Var}(X)\).
  • \(2X\) is one observation doubled: mean \(2E(X)\), variance \(4\,\mathrm{Var}(X)\). The means match, the variances do not.
  • Five lemons weighing 54 g to 74 g each give a total from 270 g to 370 g. The total varies over a wider range than one lemon, so the variances add.
  • Three squares side by side are \(3\sigma^2\). One square enlarged by a factor of 3 is \(9\sigma^2\).
  • Never add standard deviations. Add variances, then take the square root.

Worked examples

Problems like the ones in class. Pick one, try it, then open the working.
A linear transformation

The random variable \(X\) has \(E(X)=9.2\) and \(\mathrm{Var}(X)=3.6\). The random variable \(Y\) is given by \(Y=5X-4\). Find \(E(Y)\) and \(\mathrm{Var}(Y)\).

Working
  1. The mean

    \(E(Y)=5E(X)-4=5(9.2)-4=42\)

    The mean follows the rule: multiply by 5, then subtract 4.

  2. The variance

    \(\mathrm{Var}(Y)=5^2\mathrm{Var}(X)=25(3.6)=90\)

    Square the multiplier. The \(-4\) shifts the distribution but does not spread it.

Video walkthrough coming
Three independent variables

\(X\), \(Y\) and \(Z\) are independent. \(E(X)=12.3\), \(\mathrm{Var}(X)=2.1\); \(E(Y)=3.4\), \(\mathrm{Var}(Y)=0.9\); \(E(Z)=6.8\), \(\mathrm{Var}(Z)=1.6\). The random variable \(W\) is given by \(W=2X-3Y+Z\). Find \(E(W)\) and \(\mathrm{Var}(W)\).

Working
  1. The mean

    \(E(W)=2E(X)-3E(Y)+E(Z)=2(12.3)-3(3.4)+6.8=21.2\)

    Take the coefficients as they are. Signs matter for the mean.

  2. The variance

    \(\mathrm{Var}(W)=2^2\mathrm{Var}(X)+(-3)^2\mathrm{Var}(Y)+\mathrm{Var}(Z)=2^2(2.1)+(-3)^2(0.9)+1.6=18.1\)

    Square each coefficient, so every term is positive. This only works because the variables are independent.

Video walkthrough coming
A fraction of a combination

\(X\) and \(Y\) are independent with \(E(X)=10\), \(\mathrm{Var}(X)=4\), \(E(Y)=6\) and \(\mathrm{Var}(Y)=12\). Let \(Z=\dfrac{3X+Y-8}{2}\). Find \(E(Z)\) and \(\mathrm{Var}(Z)\).

Working
  1. Write it as a combination

    \(Z=\tfrac32X+\tfrac12Y-4\)

    Divide every term by 2. The coefficients are \(\tfrac32\) and \(\tfrac12\); the constant is \(-4\).

  2. The mean

    \(E(Z)=\tfrac{3(10)+6-8}{2}=14\)

    Work out the top first, then halve.

  3. The variance

    \(\mathrm{Var}(Z)=\tfrac{3^2(4)+12}{2^2}=\tfrac{48}{4}=12\)

    Square the 3 on the top and the 2 underneath. The \(-8\) is a constant and drops out.

Video walkthrough coming
Four customers or one customer four times

The time a customer waits at a market stall has mean 4.2 minutes and standard deviation 1.5 minutes. Let \(T\) be the total waiting time of four customers, chosen independently. Find \(E(T)\), \(\mathrm{Var}(T)\) and the standard deviation of \(T\). Then compare with \(4X\), one customer's time multiplied by 4.

Working
  1. Four different customers

    \(T=X_1+X_2+X_3+X_4\), \(E(T)=4(4.2)=16.8\)

    Four separate observations of \(X\). The mean is four times the mean.

  2. The variance of T

    \(\mathrm{Var}(T)=4\mathrm{Var}(X)=4(1.5^2)=9\), sd \(=3\)

    Variances add: \(n\sigma^2\), so the sd is \(\sigma\sqrt{n}\).

  3. One customer times 4

    \(E(4X)=16.8\), \(\mathrm{Var}(4X)=4^2(1.5^2)=36\), sd \(=6\)

    Same mean, but a larger spread. One long wait, multiplied by 4, is far more extreme than four different waits that average out.

Video walkthrough coming
Two loaves minus five rolls

The mass of a loaf has mean 410 g and standard deviation 14 g. The mass of a roll has mean 85 g and standard deviation 6 g. A baker takes one loaf and doubles its mass, then subtracts the total mass of five rolls. Let \(D\) be the result. All items are independent. Find \(E(D)\), \(\mathrm{Var}(D)\) and the standard deviation of \(D\).

Working
  1. Define the variables

    \(L\) = loaf, \(R_1,\dots,R_5\) = five rolls, \(D=2L-(R_1+R_2+R_3+R_4+R_5)\)

    One loaf, doubled. Five different rolls.

  2. The mean

    \(E(D)=2(410)-5(85)=395\)

    Means follow the coefficients, whichever way the items are repeated.

  3. The variance

    \(\mathrm{Var}(D)=2^2(14^2)+5(6^2)=784+180=964\)

    Doubled loaf: \(2^2\) times its variance. Five rolls: five times one variance. The minus sign disappears.

  4. The standard deviation

    \(\sqrt{964}=31.0\) g

    Take the square root only at the end.

Video walkthrough coming