Linear combinations of random variables
Master linear combinations of random variables in Year 12 VCE Specialist Mathematics. A linear combination such as \(aX+b\) or \(aX+bY\) is built from random variables and constants, with mean \(E(aX+bY)=aE(X)+bE(Y)\) and, for independent \(X,Y\), variance \(\mathrm{Var}(aX+bY)=a^2\mathrm{Var}(X)+b^2\mathrm{Var}(Y)\). It sits in the Data analysis, probability and statistics area of study of the VCE Mathematics Study Design (VCAA), within the Statistical inference topic of Unit 4.
You will learn to find the mean by linearity and the variance by squaring each coefficient — noting that variances add for a difference and that \(\mathrm{Var}(2X)=4\,\mathrm{Var}(X)\) differs from \(\mathrm{Var}(X_1+X_2)=2\,\mathrm{Var}(X)\) — and use that a combination of independent normals is again normal to find probabilities.
Theory
A linear combination of random variables is an expression such as \(aX+b\) or \(aX+bY\) built from random variables and constants. In Year 12 Specialist Mathematics you find its mean with \(E(aX+bY)=aE(X)+bE(Y)\) and its variance with \(\operatorname{Var}(aX+bY)=a^2\operatorname{Var}(X)+b^2\operatorname{Var}(Y)\) for independent \(X,Y\) — where the variances add for both a sum and a difference — and use that a combination of independent normals is itself normal.
A random variable \(X\) has a mean (expected value) \(E(X)=\mu\) and a variance \(\operatorname{Var}(X)=\sigma^2\); its standard deviation is \(\operatorname{SD}(X)=\sqrt{\operatorname{Var}(X)}\). A linear combination scales and shifts one or more random variables, e.g. \(aX+b\) or \(aX+bY\).
Transforming one variable. Multiplying by a constant \(a\) and adding a constant \(b\) gives \(E(aX+b)=aE(X)+b\). The variance ignores the shift and squares the scale: \(\operatorname{Var}(aX+b)=a^2\operatorname{Var}(X)\). So adding a constant slides the distribution but never changes its spread.
Combining independent variables. For independent \(X\) and \(Y\), expectation is linear: \(E(aX+bY)=aE(X)+bE(Y)\). Each coefficient is squared in the variance and the results are added: \(\operatorname{Var}(aX+bY)=a^2\operatorname{Var}(X)+b^2\operatorname{Var}(Y)\). Because \((-1)^2=1\), the variances add for a difference too: \(\operatorname{Var}(X-Y)=\operatorname{Var}(X)+\operatorname{Var}(Y)\).
The \(2X\) versus \(X_1+X_2\) distinction. Scaling and summing are not the same. \(\operatorname{Var}(2X)=2^2\operatorname{Var}(X)=4\operatorname{Var}(X)\), but for two independent copies \(\operatorname{Var}(X_1+X_2)=2\operatorname{Var}(X)\). Doubling by scaling spreads the distribution more than adding two independent copies.
iid sums and normality. For \(n\) independent, identically distributed variables each with mean \(\mu\) and variance \(\sigma^2\): \(E(X_1+\cdots+X_n)=n\mu\) and \(\operatorname{Var}(X_1+\cdots+X_n)=n\sigma^2\). If the variables are normal, any linear combination is also normal, so you can add means, add variances, then standardise to find probabilities.
Transforming one variable by a scale \(a\) and a shift \(b\) (the shift changes the mean but not the variance):
For independent \(X\) and \(Y\), expectation is linear and the squared coefficients multiply the variances, which then add:
Because \((-1)^2=1\), the variances add for a difference too, and for \(n\) independent identically distributed variables the sum has:
| Quantity | Scale one variable | Sum of independent |
|---|---|---|
| Mean | \(aE(X)+b\) | \(E(X)+E(Y)\) |
| Variance | \(a^2\operatorname{Var}(X)\) | \(\operatorname{Var}(X)+\operatorname{Var}(Y)\) |
How to work with a linear combination
- Read off each variable's mean and variance. Note whether a distribution is given as \(N(\mu,\sigma^2)\) (mean, variance) and confirm the variables are independent.
- Find the mean by linearity: \(E(aX+bY)=aE(X)+bE(Y)\) (and \(+b\) for any added constant).
- Find the variance by squaring the coefficients and adding: \(\operatorname{Var}(aX+bY)=a^2\operatorname{Var}(X)+b^2\operatorname{Var}(Y)\) — variances add for a difference as well; a constant term contributes nothing.
- Take the standard deviation as \(\sqrt{\operatorname{Var}}\) when needed, and keep \(\operatorname{Var}(2X)=4\operatorname{Var}(X)\) separate from \(\operatorname{Var}(X_1+X_2)=2\operatorname{Var}(X)\).
- For a probability with normals, the combination is normal: use its mean and variance, standardise \(z=\dfrac{x-\mu}{\sigma}\), and read the required area.
Mean of the sum, \(E(X+Y)=E(X)+E(Y)\):
| \(E(X+Y)\) | \(=\) | \(10+6\) |
| \(=\) | \(16\) |
Variance of the sum (independent, so variances add):
| \(\operatorname{Var}(X+Y)\) | \(=\) | \(4+9\) |
| \(=\) | \(13\) |
Variance of \(2X+Y\) — square each coefficient:
| \(\operatorname{Var}(2X+Y)\) | \(=\) | \(2^2\operatorname{Var}(X)+\operatorname{Var}(Y)\) |
| \(=\) | \(4\times 4+9\) | |
| \(=\) | \(25\) |
\(E(X+Y)=16\), \(\operatorname{Var}(X+Y)=13\) and \(\operatorname{Var}(2X+Y)=25\).
Mean by linearity, \(E(2X+3Y)=2E(X)+3E(Y)\):
| \(E(2X+3Y)\) | \(=\) | \(2\times 4+3\times 5\) |
| \(=\) | \(8+15\) | |
| \(=\) | \(23\) |
Variance — square each coefficient, then add (variances add for the difference):
| \(\operatorname{Var}(2X-3Y)\) | \(=\) | \(2^2\operatorname{Var}(X)+(-3)^2\operatorname{Var}(Y)\) |
| \(=\) | \(4\times 5+9\times 2\) | |
| \(=\) | \(20+18\) | |
| \(=\) | \(38\) |
\(E(2X+3Y)=23\) and \(\operatorname{Var}(2X-3Y)=38\).
A sum of independent normals is normal — add means and variances:
| \(E(X+Y)\) | \(=\) | \(100+80=180\) |
| \(\operatorname{Var}(X+Y)\) | \(=\) | \(25+144=169\) |
| \(\operatorname{SD}(X+Y)\) | \(=\) | \(\sqrt{169}=13\) |
Standardise and read the upper tail:
| \(z\) | \(=\) | \(\dfrac{193-180}{13}=1\) |
| \(P(X+Y>193)\) | \(=\) | \(1-\Phi(1)\) |
| \(=\) | \(0.1587\) |
\(P(X+Y>193)=0.1587\).
Scaling squares the coefficient:
| \(\operatorname{Var}(2X)\) | \(=\) | \(2^2\operatorname{Var}(X)\) |
| \(=\) | \(4\times 16\) | |
| \(=\) | \(64\) |
Summing two independent copies only doubles the variance:
| \(\operatorname{Var}(X_1+X_2)\) | \(=\) | \(16+16\) |
| \(=\) | \(32\) |
Why they differ: scaling by \(2\) multiplies the variance by \(2^2=4\), while adding two independent copies adds two equal variances, doubling it. So \(2X\) is the more variable.
\(\operatorname{Var}(2X)=64\) but \(\operatorname{Var}(X_1+X_2)=32\).
Common pitfalls
Frequently asked questions
What is a linear combination of random variables?
It is an expression such as \(aX+b\) or \(aX+bY\) built from random variables and constants. You find its mean with \(E(aX+bY)=aE(X)+bE(Y)\) and, for independent variables, its variance with \(\operatorname{Var}(aX+bY)=a^2\operatorname{Var}(X)+b^2\operatorname{Var}(Y)\).
How do the mean and variance change under aX+b?
The mean transforms fully, \(E(aX+b)=aE(X)+b\), but the variance ignores the shift and squares the scale: \(\operatorname{Var}(aX+b)=a^2\operatorname{Var}(X)\). Adding a constant slides the distribution without changing its spread.
Do variances add or subtract for X - Y?
For independent variables the variances add: \(\operatorname{Var}(X-Y)=\operatorname{Var}(X)+\operatorname{Var}(Y)\), because the coefficient \(-1\) is squared. Variances never subtract.
Why is Var(2X) not the same as Var(X1+X2)?
Scaling squares the coefficient, so \(\operatorname{Var}(2X)=2^2\operatorname{Var}(X)=4\operatorname{Var}(X)\). Adding two independent copies only adds two equal variances, so \(\operatorname{Var}(X_1+X_2)=2\operatorname{Var}(X)\). Scaling spreads a distribution more than summing.
What are the mean and variance of a sum of n iid variables?
If \(X_1,\dots,X_n\) are independent and identically distributed with mean \(\mu\) and variance \(\sigma^2\), then \(E(X_1+\cdots+X_n)=n\mu\) and \(\operatorname{Var}(X_1+\cdots+X_n)=n\sigma^2\).
How do I find a probability for a combination of normals?
A linear combination of independent normal variables is normal. Add the means and add the variances to get the new \(N(\mu,\sigma^2)\), then standardise with \(z=\dfrac{x-\mu}{\sigma}\) and read the required area.