HomeLearning HubA Level MathsS2 2: Linear combinations of random variables
S2 2

Linear combinations of random variables

Probability & Statistics 2 · Paper 6

🎯What you need to be able to do

  • Find the mean and variance of \( aX + b \).
  • Find the mean and variance of \( aX + bY \) for independent \(X\) and \(Y\).
  • Distinguish \( nX \) from the sum of \(n\) independent observations of \(X\).
  • Use the fact that a linear combination of independent normal variables is normal.
  • Use the corresponding result for sums of independent Poisson variables.
  • Find the mean and variance of a sample mean.

📚The mathematics

One variable, scaled and shifted

\( \mathrm{E}(aX + b) = a\,\mathrm{E}(X) + b \)
\( \mathrm{Var}(aX + b) = a^{2}\,\mathrm{Var}(X) \)

Two things to notice. The variance ignores \(b\) entirely — shifting every value by the same amount moves the distribution but does not spread it. And the multiplier is squared, because variance is measured in squared units. Doubling every value quadruples the variance but only doubles the standard deviation.

Two independent variables

\( \mathrm{E}(aX + bY) = a\,\mathrm{E}(X) + b\,\mathrm{E}(Y) \)
\( \mathrm{Var}(aX + bY) = a^{2}\,\mathrm{Var}(X) + b^{2}\,\mathrm{Var}(Y) \)

The expectation result holds always; the variance result requires independence, and you should say so when you use it.

Variances add, even for a difference. Since \( b = -1 \) gives \( b^{2} = 1 \), \( \mathrm{Var}(X - Y) = \mathrm{Var}(X) + \mathrm{Var}(Y) \). Subtracting the variances is the standard error on this topic, and it can produce a negative “variance” — an impossibility that should stop you immediately. Intuitively, both variables are uncertain, so combining them in any way makes the result more spread out, not less. The means, by contrast, do subtract: \( \mathrm{E}(X - Y) = \mathrm{E}(X) - \mathrm{E}(Y) \).

\( nX \) is not \( X_1 + X_2 + \cdots + X_n \)

This distinction is the one examiners return to. Suppose \( \mathrm{Var}(X) = \sigma^{2} \).

  • \( 2X \) means one observation, doubled. Its variance is \( 2^{2}\sigma^{2} = 4\sigma^{2} \).
  • \( X_1 + X_2 \) means two independent observations added. Its variance is \( \sigma^{2} + \sigma^{2} = 2\sigma^{2} \).

Both have mean \( 2\mu \), so the mean cannot tell them apart — only the variance can. The sum of two independent observations is less variable than one doubled, because two independent draws partly cancel each other’s deviations, whereas doubling amplifies whatever deviation the single draw had.

Read the context: “the weight of 2 bags” is \( X_1 + X_2 \); “twice the weight of a bag” is \( 2X \).

In general, for \(n\) independent observations,

\( \mathrm{E}\!\left(\sum X_i\right) = n\mu \)
\( \mathrm{Var}\!\left(\sum X_i\right) = n\sigma^{2} \)

The sample mean

Since \( \bar{X} = \dfrac{1}{n}\sum X_i \), applying both rules gives

\( \mathrm{E}(\bar{X}) = \mu \)
\( \mathrm{Var}(\bar{X}) = \dfrac{\sigma^{2}}{n} \)

The mean is unchanged but the variance shrinks with \(n\). That is the whole justification for taking larger samples, and it underpins everything in S2 4.

Which distributions survive combination

  • Normal: any linear combination of independent normal variables is itself normal. So \( X \sim \mathrm{N}(\mu_1, \sigma_1^{2}) \) and \( Y \sim \mathrm{N}(\mu_2, \sigma_2^{2}) \) independent gives \( X - Y \sim \mathrm{N}\!\left(\mu_1 - \mu_2,\ \sigma_1^{2} + \sigma_2^{2}\right) \). This is what makes probability questions about differences answerable.
  • Poisson: the sum of independent Poissons is Poisson, with the parameters added (see S2 1). A difference of Poissons is not Poisson — it can be negative.
  • Binomial: not generally preserved. \( \mathrm{B}(n_1, p) + \mathrm{B}(n_2, p) \) is binomial only when \(p\) is the same in both.

✏️Worked example

\( X \sim \mathrm{N}(50, 16) \) and \( Y \sim \mathrm{N}(30, 9) \) are independent. (a) Find the distribution of \( X - Y \), and hence \( \mathrm{P}(X - Y > 25) \). (b) Find the mean and variance of \( 3X \). (c) Find the mean and variance of \( X_1 + X_2 + X_3 \), the sum of three independent observations of \(X\), and comment on the comparison with (b). (d) Find \( \mathrm{P}(X_1 + X_2 + X_3 > 160) \).

(a) Both are normal and independent, so the difference is normal:

\( \mathrm{E}(X - Y) = 50 - 30 = 20 \)
\( \mathrm{Var}(X - Y) = 16 + 9 = 25 \)

So \( X - Y \sim \mathrm{N}(20, 25) \) with \( \sigma = 5 \). Then \( z = \dfrac{25 - 20}{5} = 1 \) and

\[ \mathrm{P}(X - Y > 25) = 1 - \Phi(1) = 1 - 0.8413 = 0.159 \]

(b) \( \mathrm{E}(3X) = 3(50) = 150 \) and \( \mathrm{Var}(3X) = 3^{2}(16) = 144 \).

(c) \( \mathrm{E}(X_1 + X_2 + X_3) = 3(50) = 150 \), the same as in (b), but

\[ \mathrm{Var}(X_1 + X_2 + X_3) = 16 + 16 + 16 = 48 \]

which is exactly one third of 144. Three independent observations are far less variable than one observation tripled, even though they share a mean.

(d) The sum is normal with \( \sigma = \sqrt{48} = 6.928 \), so

\[ z = \frac{160 - 150}{6.928} = 1.443, \qquad \mathrm{P} = 1 - \Phi(1.443) = 0.0745 \]
Check it. In (a), \( \mathrm{Var}(X - Y) = 25 \) is larger than either individual variance, as combining two uncertain quantities must make it. In (c), the ratio \( 144 : 48 = 3 : 1 \) is the general result \( n^{2}\sigma^{2} \) against \( n\sigma^{2} \) — a quick way to confirm you have used the right one. And had (d) been asked about \( 3X \) instead, \( \sigma = 12 \) would have given \( z = 0.833 \) and a probability of 0.202, nearly three times as large — the two are not interchangeable.
“Three bags” is not “three times one bag”. The wording decides it. Three separate bags weighed together is \( X_1 + X_2 + X_3 \) with variance 48; a single bag whose weight is then tripled is \( 3X \) with variance 144. Underline the phrase in the question before writing any variance, because the mean gives you no warning that you chose wrong.

📝Practise

Work through these, then reveal the answer.

1. \( \mathrm{E}(X) = 12 \) and \( \mathrm{Var}(X) = 5 \). Find \( \mathrm{E}(3X - 2) \) and \( \mathrm{Var}(3X - 2) \).
\( \mathrm{E}(3X - 2) = 3(12) - 2 = 34 \). \( \mathrm{Var}(3X - 2) = 3^{2}(5) = 45 \) — the \( -2 \) has no effect on the variance, and the 3 is squared.
2. \(X\) and \(Y\) are independent with \( \mathrm{Var}(X) = 10 \) and \( \mathrm{Var}(Y) = 4 \). Find \( \mathrm{Var}(2X - 3Y) \).
\( \mathrm{Var}(2X - 3Y) = 2^{2}(10) + (-3)^{2}(4) = 40 + 36 = 76 \). Both coefficients are squared, so the minus sign disappears and the variances add.
3. \( X \sim \mathrm{N}(20, 9) \). Find the distribution of \( 2X \) and of \( X_1 + X_2 \), and state the standard deviation of each.
\( 2X \sim \mathrm{N}(40, 36) \), standard deviation 6. \( X_1 + X_2 \sim \mathrm{N}(40, 18) \), standard deviation \( \sqrt{18} = 4.24 \). Same mean, different spread — the sum of two independent observations is the less variable of the two.
4. Independent Poisson variables \( X \sim \mathrm{Po}(2.4) \) and \( Y \sim \mathrm{Po}(3.6) \). State the distribution of \( X + Y \) and find \( \mathrm{P}(X + Y = 4) \). Why can nothing similar be said about \( X - Y \)?
\( X + Y \sim \mathrm{Po}(6) \), so \( \mathrm{P}(X+Y=4) = e^{-6}\dfrac{6^{4}}{4!} = 0.134 \). A Poisson variable can only take non-negative values, but \( X - Y \) can be negative, so it cannot be Poisson — even though its mean, \( -1.2 \), is perfectly well defined.
5. An empty box has weight \( \mathrm{N}(250, 25) \) grams and each of 12 items has weight \( \mathrm{N}(40, 4) \) grams, all independent. Find the probability that a full box weighs more than 745 g.
Total mean \( = 250 + 12(40) = 730 \) g. The items are twelve separate observations, so the variance is \( 25 + 12(4) = 73 \), giving \( \sigma = 8.544 \). Then \( z = \dfrac{745 - 730}{8.544} = 1.756 \) and the probability is \( 1 - \Phi(1.756) = 0.0396 \). Using \( 12^{2}(4) \) here would be the classic error.
6. A population has \( \mu = 60 \) and \( \sigma^{2} = 100 \). Find the mean and standard deviation of the mean of a random sample of 25, and explain what happens as the sample size increases.
\( \mathrm{E}(\bar{X}) = 60 \) and \( \mathrm{Var}(\bar{X}) = \dfrac{100}{25} = 4 \), so the standard deviation is 2 — one fifth of the population value. As \(n\) increases the mean stays at \( \mu \) while the spread shrinks like \( \dfrac{\sigma}{\sqrt{n}} \), so sample means cluster ever more tightly around the true mean. Note the \( \sqrt{n} \): quartering the spread needs sixteen times the sample.

🔗Go deeper — other people’s work

These are external resources, not mine. If one stops working, tell me and everything above it on this page still stands.

  • Khan Academy — combining random variables, means and variances
  • Seeing Theory (Brown University) — sampling distributions and the shrinking spread of \( \bar{X} \)
  • Cambridge examiner reports — the \( nX \) versus \( \sum X_i \) confusion is flagged repeatedly