5.04a, 5.04b - Combining random variables
Combine means and variances without confusing a sum of separate observations with a multiple of one observation. In 5.04a you will calculate the expectation and variance of linear combinations; in 5.04b you will use exact normal distributions to find probabilities for totals, differences and comparisons.
The expectation of a combination
Three independent positioning errors each have distribution , with errors measured in millimetres. Is adding the three errors just as risky as tripling one of them? Both answers have mean zero, but one is much more spread out. By the end of this lesson you will calculate the probability that each exceeds .
Start with what happens to the average. If two random costs have means and pounds, buying twice the first and three times the second, then adding a fixed charge of pounds, gives mean cost pounds. You can calculate that mean even if the two costs tend to rise together.
You already know
is the expectation, or population mean, of . The variance is , and the standard deviation is its positive square root. These definitions apply to both discrete and continuous variables.
The variable describing the total is built by multiplying variables by constants and adding them.
Linear combination
A linear combination of random variables and , with a possible fixed offset, has the form , where , and are real constants. For example, is a linear combination. Neither nor is a linear combination.
Expectation respects the additions and constant multiples in that expression. In a discrete model, multiplying every possible value by multiplies its weighted average by . Adding the weighted averages of two variables gives the weighted average of their sum, even when their values are connected. The corresponding integral argument works for continuous variables.
Expectation of a linear combination
For random variables with finite expectations and real constants , and ,
Independence is not required. This includes sums and differences, and the special case .
In the formula booklet.
Keep the signs of the coefficients: subtracting a variable subtracts its expectation.
Worked example 1: a total with a fixed charge
Question. The random variables and have expectations and . Find .
Plan. Replace each variable by its expectation, keeping the coefficients and the fixed charge.
Why this step? The fixed charge is paid every time, so its whole value belongs in the mean.
Answer. .
Check. The variable part has mean ; the fixed charge raises it to .
Worked example 2 changes only the sign of the coefficient of . The same expectation rule handles the resulting difference.
Worked example 2: subtracting a random cost
Question. The random variables and still have expectations and . Find .
Plan. Apply the expectation rule with coefficient for .
Why this step? Expectation is an average signed value. A deduction reduces that average; it is not a measure of spread.
Answer. .
Check. Changing to subtracts , so the mean falls by : .
A mean describes the centre. The next part will show why the calculation for spread treats that minus sign differently.
Watch out
Wrong: “The means can be added only if the variables are independent.” Right: whenever the expectations exist. Independence will matter for the variance rule, not for this expectation rule.
Try a different combination and state whether its mean needs an independence assumption.
The variance of a combination
The independent variance rule extends one-variable coding to combinations of two distinct random variables.
You already know
For a single variable with finite variance, : a scale factor multiplies squared deviations by , and a shift changes no deviations. Its standard deviation is multiplied by . These one-variable coding results are included in the booklet's expectation algebra.
For independent variables, the scaled variance contributions add. To see where independence enters, consider the deviation of from its mean:
Squaring produces the two individual squared deviations and a mixed product. Independence makes the expectation of that mixed product zero, because each individual deviation has expectation zero. Without independence the mixed product need not disappear, and you cannot use the following rule without further information.
Variance of an independent combination
If and are independent, with finite variances, then for real constants , and ,
In particular,
The one-variable result needs no independence assumption. A constant has variance zero.
In the formula booklet.
Square each coefficient before multiplying by its variance. Keep the mean calculation on a separate line if the question asks for both.
Worked example 3: scaling before adding variances
Question. Independent random variables and have variances and . Find .
Plan. Square the two coefficients, add the independent variance contributions, and omit the fixed offset.
Why this step? The offset shifts the whole distribution; it creates no additional variation.
Answer. .
Check. The standard deviations of and are and . Their squared values add to ; their standard deviations do not add.
Worked example 4 changes only to . This changes the mean, but leaves the variance unchanged because .
Worked example 4: the spread of a difference
Question. Independent random variables and still have variances and . Find .
Plan. Use the same independent variance rule, this time with coefficient .
Why this step? Subtracting reverses the direction of its fluctuations. It does not remove them.
Answer. .
Check. Both and have standard deviation , so they contribute the same variance.
There is a striking consequence. For two independent fair dice, each with variance , the sum and the difference both have variance , although their means are and . Moving the centre and changing the spread are different jobs.
Watch out
Wrong: for independent variables. Right: the coefficient of is , whose square is , so the variances add. Also check independence: has variance zero, so treating the two appearances of the same non-constant variable as independent would give a false answer.
In the next check, the supplied quantities are standard deviations. Convert them to variances before combining them.
Separate observations or one multiple
Writing means adding three observations; writing means taking one observation and tripling it. Equal means do not make those variables interchangeable.
Suppose , and are the scores on three independent fair dice, each with mean and variance . Their total has mean and variance
By contrast, rolling one fair die and tripling its score gives mean but variance
In the first experiment a high score can be balanced by a low score on another die. In the second, all three copies of the score rise and fall together. The possible outcomes even reveal the difference: three dice can total , whereas three times one die cannot.
Independent observations
Independent observations from the same distribution are separate random variables with that common distribution, whose outcomes are mutually independent. Reusing one observed value several times does not create independent observations.
Repeated use of the two-variable rules gives a compact way to keep the experiments apart.
Totals of independent observations
If are independent observations, each with mean and variance , then
For a single variable with those parameters,
These are consequences of expectation algebra; the general total formula is not printed separately.
Not in the formula booklet: learn it.
If a total contains several types of observation, add one variance contribution for each independent observation. For example, four independent observations with variance and two further independent observations with variance give total variance , provided all six observations are independent.
Key idea
Count independent observations once each. Square a coefficient only when it scales the same variable or the same already-defined total.
This distinction is often hidden in the words of a problem. Decide what experiment the words describe before touching the calculator.
Continue this lesson.
You’re previewing NovaLearn without an account. Create a free account to read the rest.
Create free account