By the end of this lesson, you should be able to
- Calculate the expectation of a discrete random variable.
- Compute variance and standard deviation from a distribution.
- Distinguish variability from the expected value.
You are offered a game. With probability one-half you win 10 dollars; otherwise you lose 8 dollars. Would you play?
The average outcome over many plays is positive. But that does not mean you’ll win one dollar on your next attempt.
Expected value is probability-weighted
For discrete outcomes with probabilities ,
For this game,
The expected gain is one dollar per play. In a single play the gain is either 10 dollars or a loss of 8 dollars; the expected value is not even a possible outcome.
Variance describes the spread
Expectation alone tells us little about risk. A game that always pays one dollar and a game that pays 1,001 dollars or loses 999 dollars with equal probabilities both have expectation one dollar. Their variability is rather different.
The population variance of a discrete random variable is
For the first game with mean , deviations are and . Variance is and standard deviation is .
A useful computational shortcut is .
Units and linear transformations
For constants and ,
Adding ten dollars changes the mean by ten but leaves the spread unchanged. Multiplying dollar amounts by two doubles the standard deviation and quadruples the variance.
If and are independent, the variance of their sum is the sum of their variances. Without independence, a covariance term is required. Don’t silently assume independence because it makes a formula convenient.
A binomial connection
For , expectation is and variance is , derived from a sum of independent Bernoulli indicators.
Check yourself
- If equals 0 with probability .75 and 8 with probability .25, find .
- Find the variance and standard deviation of that variable.
- If all values are multiplied by three, what happens to the variance?
Worked responses
-
.
-
Variance is , so the standard deviation is .
-
It is multiplied by .
Derive the variance identities
Expanding the centered square gives , assuming the second moment is finite. This identity is algebraically convenient, but direct subtraction of two nearly equal large values can lose floating-point accuracy. Computing centered deviations is often numerically safer.
Linearity of expectation does not require independence: whenever the expectations are defined appropriately. Variance does require attention to dependence:
For a difference the covariance term has a minus sign. If , the sum is and its variance is , not twice the variance. Independence is sufficient for zero covariance when moments exist, but zero covariance need not imply independence. For example, a symmetric variable and can have zero covariance despite a deterministic relationship.
A Bernoulli indicator equals one for success and zero otherwise. Since , and . A binomial count is the sum of independent indicators with the same success probability, giving mean and variance . For the sample proportion , the variance is . This derivation explains the square-root sample-size denominator in proportion standard errors.
Further problems and solutions
- If and , find the mean and variance of .
- If each have variance 4 and covariance 3, find the variance of their difference.
- Why can expected profit alone be insufficient for comparing two investments or games?
Worked further solutions
- Mean ; variance ; standard deviation .
- .
- Equal means can accompany different tail risks, loss probabilities, and variances. The full distribution and the decision maker’s constraints matter; expectation is one summary.
Keep your place
Mark this lesson complete after you've read it, attempted its exercises, and explained its central idea in your own words.
Progress is not saved unless you choose to mark the lesson complete.
Saved only in this browser's local storage. No required account, server transmission, or analytics. You can reset your saved progress on the course page. Clearing browser data also clears the record.