Discrete Random Variables
& Expected Value
Learn how to describe outcomes with probability distributions, compute the expected value \(\mu = E(X)\), and measure spread with variance and standard deviation.
What Is a Random Variable?
A random variable is a numerical quantity whose value is determined by a random process. We typically denote it with a capital letter like \(X\).
The Probability Distribution
A probability distribution lists every possible value of \(X\) alongside its probability \(P(X = x)\). Two rules must always hold:
Example: Rolling a Fair Die
Let \(X\) = the number showing on a single fair six-sided die. Each face is equally likely.
The Expected Value \(E(X)\)
The expected value (or mean) of a discrete random variable is the long-run average you'd get if you repeated the experiment many times. It is a weighted average of the outcomes:
Key insight: Unlike a simple average, \(E(X)\) gives more weight to outcomes that are more likely. It need not be a value \(X\) can actually take.
Computing \(E(X)\) for a Fair Die
Apply the formula to our fair die where each face has probability \(\frac{1}{6}\):
Variance & Standard Deviation
The expected value tells us the center. Variance tells us how spread out the values are around that center.
Discrete vs Continuous
| Discrete | Continuous | |
|---|---|---|
| Values | Countable (finite or infinite list) | Uncountable (entire interval) |
| Probabilities | \(P(X = x) > 0\) for each value | \(P(X = x) = 0\); use areas |
| Described by | Probability table / PMF | PDF (density function) |
| \(E(X)\) | \(\sum x \cdot P(X = x)\) | \(\int x \cdot f(x)\,dx\) |
| Example | Coin flips, dice, defects | Height, weight, time |
How to Compute \(E(X)\) and \(\sigma\)
Example 1: Raffle Ticket
A raffle sells 100 tickets at \(\$2\) each. One ticket wins \(\$150\) and one wins \(\$50\). Let \(X\) = net gain for a ticket buyer.
| Outcome | \(x\) (net gain) | \(P(X=x)\) | \(x \cdot P\) |
|---|---|---|---|
| Win $150 | \(+148\) | \(0.01\) | \(1.48\) |
| Win $50 | \(+48\) | \(0.01\) | \(0.48\) |
| Lose | \(-2\) | \(0.98\) | \(-1.96\) |
Example 2: Insurance Claims
An auto insurance company models the number of claims \(X\) per policy per year:
| \(x\) | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| \(P(X=x)\) | 0.70 | 0.20 | 0.08 | 0.02 |
Example 2: Finding \(\sigma^2\) and \(\sigma\)
With \(\mu = 0.42\), compute each squared deviation times its probability:
| \(x\) | \(x - \mu\) | \((x-\mu)^2\) | \((x-\mu)^2 \cdot P\) |
|---|---|---|---|
| 0 | \(-0.42\) | \(0.1764\) | \(0.1235\) |
| 1 | \(+0.58\) | \(0.3364\) | \(0.0673\) |
| 2 | \(+1.58\) | \(2.4964\) | \(0.1997\) |
| 3 | \(+2.58\) | \(6.6564\) | \(0.1331\) |
Example 3: Weighted Decision
A company considers two marketing strategies. Let \(X\) = profit (in thousands) for Strategy A, and \(Y\) for Strategy B.
\(\sigma_X = 30\)
High return, high risk
\(\sigma_Y = 10\)
Moderate return, low risk
Properties of Expected Value
Common Mistakes
Summary Cheat Sheet
| Concept | Formula | Interpretation |
|---|---|---|
| Valid distribution | \(\sum P(x) = 1\) | All outcomes accounted for |
| Expected value | \(\mu = \sum x \cdot P(x)\) | Long-run average |
| Variance | \(\sigma^2 = \sum (x-\mu)^2 P(x)\) | Spread (squared units) |
| Std. deviation | \(\sigma = \sqrt{\sigma^2}\) | Spread (original units) |
| Linearity | \(E(aX+b) = aE(X)+b\) | Scale & shift the mean |
Question 1 of 5
A discrete random variable \(X\) has the distribution: \(P(0)=0.3\), \(P(1)=0.5\), \(P(2)=0.2\). What is \(E(X)\)?
Question 2 of 5
Which of the following is NOT a valid probability distribution?
Question 3 of 5
If \(E(X) = 10\) and \(Y = 3X + 5\), what is \(E(Y)\)?
Question 4 of 5
A game costs \(\$5\) to play. You win \(\$20\) with probability \(0.2\) and \(\$0\) otherwise. What is the expected net gain?
Question 5 of 5
If two distributions have the same \(E(X)\) but Distribution A has \(\sigma = 2\) and Distribution B has \(\sigma = 8\), which statement is true?