Variance of a
Random Variable
Understand how variance measures the spread of a probability distribution and why it matters for predicting outcomes in statistics.
What Is a Random Variable?
A random variable assigns a numerical value to each outcome of a random experiment. We typically denote it with a capital letter like \( X \).
The Expected Value \( \mu \)
Before we can talk about spread, we need the center. The expected value (or mean) of a discrete random variable \( X \) is:
Variance measures how far outcomes spread away from this center \( \mu \). Without a center, we cannot measure spread.
What Is Variance?
Variance measures the average squared distance of each value from the mean. It tells us how spread out the distribution is.
The Variance Formula
For a discrete random variable \( X \) with mean \( \mu = E(X) \):
The Shortcut Formula
An equivalent formula that is often easier to compute:
Variance vs. Standard Deviation
| Variance \( \sigma^2 \) | Std. Deviation \( \sigma \) | |
|---|---|---|
| Formula | \( \sum (x_i - \mu)^2 P(x_i) \) | \( \sqrt{\sigma^2} \) |
| Units | Squared units | Same units as \( X \) |
| Interpretation | Average squared deviation | Typical distance from \( \mu \) |
| Always \( \geq 0 \)? | Yes | Yes |
| Equals 0 when | All probability on one value (no spread) | |
Key Properties of Variance
How to Compute Variance
Example 1: Coin Flip
Let \( X = \) number of heads in 1 flip. Then \( X \in \{0, 1\} \) with \( P(0) = 0.5 \) and \( P(1) = 0.5 \).
Example 2: Rolling a Die
Let \( X = \) outcome of a fair six-sided die. Each value has probability \( \frac{1}{6} \).
Example 3: Custom Distribution
A random variable \( X \) has the following distribution:
| \( x \) | 1 | 3 | 5 |
|---|---|---|---|
| \( P(X=x) \) | 0.2 | 0.5 | 0.3 |
Visualizing Variance
Linear Transform Rule
If you transform a random variable \( X \) by multiplying by \( a \) and adding \( b \):
For standard deviation: \( \text{SD}(aX + b) = |a| \cdot \text{SD}(X) \). The square root removes the squaring.
Variance of Sums
When we add two independent random variables:
Common Mistakes
Question 1 of 5
If \( X \) has \( \text{Var}(X) = 4 \), what is \( \text{Var}(3X) \)?
Question 2 of 5
A random variable \( X \) takes value 2 with probability 0.5 and value 6 with probability 0.5. What is \( \text{Var}(X) \)?
Question 3 of 5
If \( X \) and \( Y \) are independent with \( \text{Var}(X) = 5 \) and \( \text{Var}(Y) = 3 \), what is \( \text{Var}(X - Y) \)?
Question 4 of 5
What is \( \text{Var}(X + 10) \) if \( \text{Var}(X) = 7 \)?
Question 5 of 5
Which formula correctly computes the variance of a discrete random variable using the shortcut method?