Expectation and variance of a discrete random variable — 9709 S1
Normalise probabilities and calculate expectation, variance and transformations. Transform means and variances and combine summaries.
Notes and key methods
A probability mass function satisfies \(\displaystyle p(x)\ge 0\) and \(\sum p(x)=1\). Then \(E(X)=\sum xp(x)\), \(E(X^2)=\sum x^2p(x)\), and \(\operatorname{Var}(X)=E(X^2)-E(X)^2\).
For any specified function g, \(E(g(X))=\sum g(x)p(x)\). In general this differs from g(E(X)). Always check that a proposed variance is nonnegative.
If \(Y=aX+b\), then \(E(Y)=aE(X)+b\) and \(\operatorname{Var}(Y)=a^2\operatorname{Var}(X)\). Hence standard deviation scales by |a|; translation changes the mean but not the variance.
To combine groups, recover \(\sum x=n\bar x\) and \(\sum x^2=n(v+\bar x^2)\), add the two totals and divide by the combined number of observations. Averaging two means is valid only when the sample sizes are equal.
Check the conditions
List the complete support before normalising.
A probability is a number in [0,1], whereas an expectation need not be.
The two groups are disjoint when combining observations.
State whether variances use n or n−1 before recovering sums of squares.
Three worked examples
Example 1 · Discrete probability distributions
X takes the values \(0,2,4\) with respective probabilities \(2k,3k,5k\).
The \(\displaystyle n=7\) observations X have mean 4 and population variance 5. Define \(Y=4X+9\). A second disjoint group has 9 Y-values with mean 29.