Random Variables
Senior 6 · Mathematics
Random Variables
Lesson 2 of 5
35 min
An insurance company does not know which of its clients will claim this year, but it can predict quite closely how much it will pay out on average per client, and it sets its premiums above that figure. A national lottery works the same way in the other direction. The average value of a random variable over many repetitions is its expected value, and the typical distance of its values from that average is measured by the variance and the standard deviation. You met the mean and standard deviation of a data set in earlier years; here they are computed from probabilities instead of frequencies.
Definition
For a discrete random variable with values and pmf :
More generally, for a function , . Example: for a fair coin with for heads and 0 for tails, .
Important
Computing formula for the variance
Proof. , since and .
Linear change of variable. For constants and :
Reason. . Adding shifts every value and the mean by the same amount, so the deviations do not change; multiplying by multiplies every deviation by and every squared deviation by .
Worked example 1: three coins again
Find the mean, variance and standard deviation of the number of heads in three tosses of a fair coin (lesson 1).
Solution.
So and . The mean 1.5 is not a possible value of : it is a long-run average, not a prediction for one toss of three coins.
Worked example 2: a linear change
for (lesson 1, worked example 2). Find and , then the mean and standard deviation of .
Solution. and , so . Then , and . The figure shows the pmf of balancing at 3.
Worked example 3: is the game fair?
At a school fair (an illustrative game), you pay 500 Frw to roll a fair die. A 6 wins 2000 Frw, a 4 or a 5 wins 500 Frw, and anything else wins nothing. Let be your net gain. Find and the standard deviation of .
Solution.
| Score | 6 | 4 or 5 | 1, 2 or 3 |
|---|---|---|---|
| (Frw) | |||
: the game is fair (neither side gains in the long run). , so and Frw: a fair game can still swing widely from one play to the next.
Warning
is not . In worked example 1, but ; their difference is the variance, which can never be negative.
Constants do not add to a variance. , not and not .
Tip
Set the work out as a table with rows , , and . The sums of the last two rows are and , and one subtraction gives the variance.
jbstatistics: Expected Value and Variance of Discrete Random Variables (about 8 min). Watch the table method for E(X) and E(X²), and the shortcut Var(X) = E(X²) − μ², used exactly as in this lesson.
Practice
Questions 1 to 3 are routine; 4 to 6 need more care; 7 asks for a proof.
Sources and credits