Mean and Standard Deviation of a Random Variable
How to compute the expected value and the standard deviation of a discrete random variable from its probability distribution, and how to interpret both as long-run descriptions of the random process.
A probability distribution has a center and a spread, just like a data set. Its expected value (mean) is a weighted average of the possible values, weighted by their probabilities: the average outcome in the long run. Its standard deviation is the typical distance of outcomes from that mean in the long run. Both are fixed numbers for the distribution, so they are parameters.
1Parameters of a probability distribution
A parameter is a number that describes a characteristic of a population or of the probability distribution of a random variable. It is a single, fixed value. The mean and standard deviation of a random variable are parameters, so they use Greek letters: \(\mu_X\) and \(\sigma_X\).
| x | 0 | 1 | 2 | 3 | 4 |
|---|---|---|---|---|---|
| P(X = x) | 0.30 | 0.25 | 0.20 | 0.15 | 0.10 |
This is the distribution of X, the number of AP classes taken by a randomly chosen junior at one school.
2Expected value
The expected value, or mean, of a discrete random variable \(X\) is written \(E(X)\) or \(\mu_X\):
Here \(x_i\) is each possible value and \(P(x_i)\) is short for \(P(X = x_i)\), its probability. Multiply each value by its probability, then add.
AP classes
Let X be the number of AP classes taken by a randomly chosen junior: P(X = 0) = 0.30, P(X = 1) = 0.25, P(X = 2) = 0.20, P(X = 3) = 0.15, P(X = 4) = 0.10. Find and interpret \(\mu_X\).
- 1Multiply each value by its probability: \(0(0.30) = 0\), \(1(0.25) = 0.25\), \(2(0.20) = 0.40\), \(3(0.15) = 0.45\), \(4(0.10) = 0.40\).
- 2Add them: \(\mu_X = 0 + 0.25 + 0.40 + 0.45 + 0.40 = 1.50\).
The plain average of 0, 1, 2, 3, 4 is 2, but that treats every value as equally likely. Zero classes is three times as likely as four classes, so it must count more. Always weight each value by its probability.
An expected value of 1.5 classes does not mean a junior is likely to take 1.5 classes (impossible) or even 1 or 2. It describes the average over many, many randomly chosen juniors. For a single outcome, it says nothing certain.
3Standard deviation
The standard deviation of a discrete random variable, written \(SD(X)\) or \(\sigma_X\), is
Find each value’s distance from the mean, square it, weight it by its probability, add, and take the square root. The number before the square root is the variance, written \(V(X)\) or \(\sigma_X^2\).
AP classes
Using \(\mu_X = 1.5\), find and interpret the standard deviation of X.
| x | x − μ | (x − μ)² | P(X = x) | (x − μ)² · P |
|---|---|---|---|---|
| 0 | −1.5 | 2.25 | 0.30 | 0.675 |
| 1 | −0.5 | 0.25 | 0.25 | 0.0625 |
| 2 | 0.5 | 0.25 | 0.20 | 0.05 |
| 3 | 1.5 | 2.25 | 0.15 | 0.3375 |
| 4 | 2.5 | 6.25 | 0.10 | 0.625 |
- 1For each value, square its distance from the mean and multiply by its probability (last column).
- 2Add the last column to get the variance: \(\sigma_X^2 = 0.675 + 0.0625 + 0.05 + 0.3375 + 0.625 = 1.75\).
- 3Take the square root: \(\sigma_X = \sqrt{1.75} \approx 1.32\).
Late deliveries
Two stores each average 2 late deliveries per day in the long run (Figure 3). Store A: 1, 2, or 3 late deliveries with probabilities 0.25, 0.5, 0.25. Store B: 0, 2, or 4 with the same probabilities. Compare their standard deviations.
- 1Store A: \(\sigma^2 = (1)^2(0.25) + 0^2(0.5) + (1)^2(0.25) = 0.5\), so \(\sigma \approx 0.71\).
- 2Store B: \(\sigma^2 = (2)^2(0.25) + 0^2(0.5) + (2)^2(0.25) = 2\), so \(\sigma \approx 1.41\).
Put the values in L1 and the probabilities in L2. Run STAT, CALC, 1-Var Stats with List: L1 and FreqList: L2. The calculator’s \(\bar{x}\) is \(\mu_X\), and σx is \(\sigma_X\). (Ignore Sx here; it is for samples of data.)
1.75 is the variance, in squared classes. The standard deviation, the number you interpret, is its square root, about 1.32 classes.
4Interpreting the mean and standard deviation
Interpret both in the context of the specific population or random process, as long-run descriptions.
Mean: “If many juniors at this school were selected at random, the average number of AP classes they take would be about 1.5.”
Standard deviation: “The number of AP classes taken by randomly selected juniors typically varies by about 1.32 from the mean of 1.5.”
A carnival booth
A carnival game costs $2 to play. You win $10 with probability 0.1, win $3 with probability 0.2, and win nothing otherwise. Let X be your net gain per play. Find E(X) and interpret it.
- 1Net gain subtracts the $2 cost: X = 8 with probability 0.1, X = 1 with probability 0.2, X = −2 with probability 0.7.
- 2\(E(X) = 8(0.1) + 1(0.2) + (-2)(0.7) = 0.8 + 0.2 - 1.4 = -0.40\).
- 3Standard deviation: \(\sigma_X = \sqrt{(8.4)^2(0.1) + (1.4)^2(0.2) + (-1.6)^2(0.7)} = \sqrt{9.24} \approx 3.04\).
5Quick reference
| Parameter | Formula | Meaning |
|---|---|---|
| Expected value \(\mu_X\) or \(E(X)\) | \(\sum x_i P(x_i)\) | Long-run average outcome |
| Variance \(\sigma_X^2\) or \(V(X)\) | \(\sum (x_i - \mu_X)^2 P(x_i)\) | Squared units; a step on the way |
| Standard deviation \(\sigma_X\) or \(SD(X)\) | \(\sqrt{\sum (x_i - \mu_X)^2 P(x_i)}\) | Typical distance of outcomes from the mean in the long run |