Expected Value &
Variance
Master the foundations of discrete random variables: learn to compute the center and spread of any probability distribution.
What Is a Discrete Random Variable?
A discrete random variable \(X\) takes on a finite or countably infinite set of values. Each possible value \(x_i\) has a corresponding probability \(P(X = x_i)\).
Visualizing a Probability Distribution
Consider a random variable \(X\) representing the number of heads in 3 coin flips.
Why Do We Need \(E(X)\) and \(\text{Var}(X)\)?
Two distributions can have the same center but very different spreads. Expected value tells us where outcomes cluster; variance tells us how tightly they cluster.
The Expected Value Formula
Each outcome is weighted by its probability. Outcomes that are more likely contribute more to the average. This is a weighted mean, not a simple arithmetic mean.
The Variance Formula
Variance measures the average squared deviation from the mean. Each squared distance \((x_i - \mu)^2\) is weighted by its probability.
Standard Deviation: \(\sigma = \sqrt{\text{Var}(X)}\)
Variance is in squared units, which is hard to interpret. Taking the square root gives us the standard deviation \(\sigma\), back in the original units of \(X\).
\(E(X)\) vs \(\text{Var}(X)\): Key Differences
| \(E(X)\) | \(\text{Var}(X)\) | |
|---|---|---|
| Measures | Center / location | Spread / dispersion |
| Formula | \(\sum x_i P(x_i)\) | \(\sum (x_i - \mu)^2 P(x_i)\) |
| Units | Same as \(X\) | Squared units of \(X\) |
| Can be negative? | Yes | No (always \(\geq 0\)) |
| If all values equal | That value | \(0\) |
Key Properties of Expected Value
Key Properties of Variance
Step-by-Step Calculation
Example 1: Fair Die Roll
Let \(X\) be the result of rolling a fair six-sided die. Find \(E(X)\) and \(\text{Var}(X)\).
Example 2: Loaded Coin Game
A game pays $5 if a biased coin lands heads (\(P = 0.3\)) and loses $2 for tails (\(P = 0.7\)). Find the expected profit \(E(X)\) and \(\text{Var}(X)\).
Example 3: Using Properties
Suppose \(E(X) = 4\) and \(\text{Var}(X) = 9\). Let \(Y = 3X - 2\). Find \(E(Y)\) and \(\text{Var}(Y)\).
Common Mistakes to Avoid
Summary of Key Formulas
| Quantity | Formula | Key Property |
|---|---|---|
| \(E(X)\) | \(\sum x_i P(x_i)\) | \(E(aX+b) = aE(X)+b\) |
| \(\text{Var}(X)\) | \(\sum (x_i - \mu)^2 P(x_i)\) | \(\text{Var}(aX+b) = a^2\text{Var}(X)\) |
| Shortcut | \(E(X^2) - [E(X)]^2\) | Often faster to compute |
| \(\sigma\) | \(\sqrt{\text{Var}(X)}\) | Same units as \(X\) |
| Sum (indep.) | \(\text{Var}(X+Y)\) | \(= \text{Var}(X) + \text{Var}(Y)\) |
Question 1 of 5
A random variable \(X\) has the distribution: \(P(X=1) = 0.2\), \(P(X=3) = 0.5\), \(P(X=7) = 0.3\). What is \(E(X)\)?
Question 2 of 5
If \(E(X) = 5\) and \(\text{Var}(X) = 4\), what is \(\text{Var}(2X + 3)\)?
Question 3 of 5
A coin is flipped 3 times. Let \(X\) = number of heads. We know \(E(X) = 1.5\) and \(E(X^2) = 3\). What is \(\text{Var}(X)\)?
Question 4 of 5
Which statement is always true about variance?
Question 5 of 5
If \(X\) and \(Y\) are independent with \(E(X) = 2\), \(E(Y) = 3\), \(\text{Var}(X) = 1\), and \(\text{Var}(Y) = 4\), what are \(E(X + Y)\) and \(\text{Var}(X + Y)\)?