01 / 21

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.

College Statistics

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\).

Discrete
Takes on a countable number of values: 0, 1, 2, 3, ...
Continuous
Takes on any value in an interval: heights, weights, time.

The Probability Distribution

A probability distribution lists every possible value of \(X\) alongside its probability \(P(X = x)\). Two rules must always hold:

1
Every probability is non-negative: \(0 \leq P(X = x) \leq 1\) for all \(x\).
2
Probabilities sum to 1: \(\sum P(X = x) = 1\) across all possible values.

Example: Rolling a Fair Die

Let \(X\) = the number showing on a single fair six-sided die. Each face is equally likely.

0 1/6 1 2 3 4 5 6
\(x\)
\(P(X=x)\)

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.

\(\sigma^2\) Variance
Average squared deviation from the mean: units are squared.
\(\sigma\) Std. Dev.
Square root of variance: same original units as \(X\).

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\)

1
List all values of \(X\) and their probabilities \(P(X=x)\).
2
Verify that all \(P \geq 0\) and \(\sum P = 1\).
3
Compute \(E(X) = \sum x \cdot P(X=x)\).
4
Find each \((x - \mu)^2 \cdot P(X=x)\).
5
Sum to get \(\sigma^2\), then \(\sigma = \sqrt{\sigma^2}\).

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.700.200.080.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.

Strategy A
\(E(X) = 50\)
\(\sigma_X = 30\)
High return, high risk
Strategy B
\(E(Y) = 40\)
\(\sigma_Y = 10\)
Moderate return, low risk

Properties of Expected Value

1
Constant multiple: \(E(aX) = a \cdot E(X)\)
2
Shift: \(E(X + b) = E(X) + b\)
3
Linearity: \(E(aX + b) = a \cdot E(X) + b\)
4
Sum rule: \(E(X + Y) = E(X) + E(Y)\) (always, even if dependent).

Common Mistakes

✕ Forgetting weights
Using a simple average \(\frac{\sum x}{n}\) instead of the weighted sum \(\sum x \cdot P(x)\). Outcomes are not equally likely.
✕ Probabilities don't sum to 1
Missing a category or rounding too aggressively. Always verify \(\sum P = 1\) before computing.
✕ Confusing \(\sigma^2\) and \(\sigma\)
Reporting variance when the question asks for standard deviation, or vice versa. Check units: \(\sigma\) has the same units as \(X\).

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?