AP Statistics · Class 11 · Grades 10–12
AP Statistics Class 11: Random Variables & Expected Value — 12 SOMATH Posters, Theory & 60 Practice Questions
The whole AP Statistics random-variables unit in one class. Twelve SOMATH posters walk through what a random variable is, discrete vs. continuous, probability distributions, valid-distribution rules, missing probabilities, expected value, interpreting E(X), decisions and games, variance, standard deviation, transforming a random variable, and combining random variables. Under each poster you’ll find full theory notes and 5 practice questions with click-to-reveal step-by-step solutions — 60 questions total.
Class 11 of the SOMATH AP Statistics course
Enroll in AP Statistics — grades 10–12
This class pack is part of SOMATH’s 24-class AP Statistics rolling syllabus, taught in small in-person groups on the Upper West Side. Join at any class number without losing the thread — students can start on Class 11 today.
See the full AP Statistics course →What’s in this class
- What Is a Random Variable?
- Discrete vs. Continuous Random Variables
- Probability Distribution of a Discrete RV
- Rules for a Valid Probability Distribution
- Finding Missing Probabilities
- Expected Value — The Mean of a Random Variable
- Interpreting Expected Value
- Expected Value in Games and Decisions
- Variance of a Random Variable
- Standard Deviation of a Random Variable
- Transforming Random Variables
- Combining Random Variables
1. What Is a Random Variable?
Definition
A random variable is a numerical value determined by the outcome of a random process. We usually write it with a capital letter — X, Y, Z — and its individual values with lowercase letters.
Example 1: Roll a fair six-sided die
Let X = the number rolled. The possible values are 1, 2, 3, 4, 5, 6, each equally likely with probability 1/6.
Example 2: Flip 3 coins
Let X = the number of heads. The possible values are 0, 1, 2, 3. Even though the outcome of each flip is unknown, X is a well-defined number every time we do the experiment.
Why we call it "random"
The value depends on chance. Before the experiment we cannot know what X will be — only what values it could take and how likely each value is.
Why it matters
Random variables let us apply arithmetic — sums, averages, comparisons — to random processes. Every AP Statistics topic that follows in this unit (probability distributions, expected value, variance, binomial, geometric, sampling distributions) starts with a random variable.
5 Practice Questions — What Is a Random Variable?
Why students often say "true": the first examples we meet are discrete counts (dice, coin flips, absences), and every value in those is a whole number. That’s a feature of those examples, not a requirement.
Counter-examples — random variables that are not whole numbers:
- Height of a randomly chosen student: 152.3 cm, 152.34 cm, … (continuous)
- Time to finish a test: 23.4 minutes (continuous)
- Temperature at 3 p.m.: 72.8°F (continuous)
- A student’s GPA: 3.75 (discrete, but not a whole number)
- Your net winnings on the $2 game from Section 6: −$2 or +$3 (discrete, integers here, but expected value E(X) = −$0.50 — also a random variable’s summary, not a whole number)
2. Discrete vs. Continuous Random Variables
Two kinds of random variables
Every random variable is either discrete or continuous. Which kind it is decides how we write its probability model and how we compute probabilities.
Discrete — you can count
A discrete random variable takes countable values (finite or countably infinite). The possible values can be listed: 0, 1, 2, 3, ….
- Number on a die: 1, 2, 3, 4, 5, 6
- Number of heads in 3 coin flips: 0, 1, 2, 3
- Number of students absent: 0, 1, 2, …
- Number of goals in a soccer game: 0, 1, 2, …
Continuous — you measure
A continuous random variable can take any value in an interval. The possible values form a continuum — infinitely many values, and between any two you can always find another.
- Height of a person: 150.5 cm, 150.6 cm, 150.63 cm, …
- Time to complete a test: 23.4 minutes
- Temperature: 72.3°F
- Weight of a package: 1.27 kg
Bar chart vs density curve
Discrete distributions are shown with a bar chart (or histogram): one bar per possible value, height = probability. Continuous distributions are shown with a density curve: probability is area under the curve, not the height at a single point.
5 Practice Questions — Discrete vs. Continuous Random Variables
3. Probability Distribution of a Discrete RV
What a probability distribution shows
A probability distribution of a discrete random variable X lists every possible value x together with its probability P(X = x). It answers two questions at once: what values can X take? and how likely is each?
How to build a distribution — four steps
- Identify the random variable in words. (“Let X = …”)
- List all possible values of X.
- Find the probability of each value.
- Check that all probabilities add up to 1.
Example 1: Flip 2 fair coins, X = number of heads
Sample space: HH, HT, TH, TT (4 equally likely outcomes). X can be 0, 1, or 2.
| x | 0 | 1 | 2 |
|---|---|---|---|
| P(X = x) | 1/4 | 1/2 | 1/4 |
Example 2: Roll a fair die, X = number rolled
| x | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|
| P(X = x) | 1/6 | 1/6 | 1/6 | 1/6 | 1/6 | 1/6 |
Valid probability distribution rules
- Each probability must satisfy 0 ≤ P(X = x) ≤ 1.
- The probabilities must sum to 1: Σ P(X = x) = 1.
5 Practice Questions — Probability Distribution of a Discrete RV
4. Rules for a Valid Probability Distribution
Two rules — both must hold
A discrete probability distribution is valid only when it passes both checks. Miss either one and the table is not a probability distribution.
Rule 1 — each probability is between 0 and 1
0 ≤ P(X = x) ≤ 1 for every value of x. A negative probability is impossible; a probability greater than 1 is impossible.
Rule 2 — the probabilities sum to 1
Σ P(X = x) = 1 summed over every possible value of X. If they sum to more or less than 1, some probability is wrong or a value is missing.
Valid example
| x | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| P(X = x) | 0.10 | 0.30 | 0.40 | 0.20 |
All four values are in [0, 1] and 0.10 + 0.30 + 0.40 + 0.20 = 1.00. Valid.
Invalid example
| x | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| P(X = x) | 0.20 | 0.50 | 0.40 | −0.10 |
P(X = 3) = −0.10 is not between 0 and 1, so Rule 1 is violated on the spot.
The poster then adds the four numbers as written — 0.20 + 0.50 + 0.40 + (−0.10) = 1.00 — only to make one narrow point: even if the four cells happen to add to 1, the negative entry still kills the distribution.
What really happens if you ignore the negative entry. Take the three non-negative rows only: 0.20 + 0.50 + 0.40 = 1.10 > 1. So Rule 2 is broken too — the “real” probabilities already sum to more than 1 before the negative row is even considered.
5 Practice Questions — Rules for a Valid Probability Distribution
5. Finding Missing Probabilities
Idea
The probabilities in a distribution must sum to 1. If one probability is missing, use that fact to solve for it: Σ P(X = x) = 1.
Method (three steps)
- Set up the equation Σ P(X = x) = 1 with the missing probability as an unknown.
- Add the known probabilities.
- Solve for the missing probability.
Example 1: Find P(X = 2)
| x | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| P(X = x) | 0.20 | 0.30 | ? | 0.10 |
0.20 + 0.30 + P(X = 2) + 0.10 = 1 ⇒ 0.60 + P(X = 2) = 1 ⇒ P(X = 2) = 0.40.
Example 2: Find P(Y = 4)
| y | 1 | 2 | 3 | 4 |
|---|---|---|---|---|
| P(Y = y) | 0.15 | 0.25 | 0.35 | ? |
0.15 + 0.25 + 0.35 + P(Y = 4) = 1 ⇒ 0.75 + P(Y = 4) = 1 ⇒ P(Y = 4) = 0.25.
5 Practice Questions — Finding Missing Probabilities
6. Expected Value — The Mean of a Random Variable
What expected value is
The expected value of a random variable is the long-run average outcome if we repeat the random process many times. It is also called the mean of the random variable, μX.
Formula
μX = E(X) = Σ x · P(X = x)
Multiply each possible value by its probability, then add up the products.
Example 1: Fair six-sided die
| x | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|
| P(X = x) | 1/6 | 1/6 | 1/6 | 1/6 | 1/6 | 1/6 |
E(X) = 1(1/6) + 2(1/6) + 3(1/6) + 4(1/6) + 5(1/6) + 6(1/6) = 21/6 = 3.5.
You cannot roll a 3.5, but if you roll a die a million times, the average of the results is very close to 3.5.
Example 2: A $2 game
The game costs $2 to play. You win $5 with probability 0.3 and win $0 with probability 0.7. Let X be your net winnings in dollars.
| x | −2 | 3 |
|---|---|---|
| P(X = x) | 0.7 | 0.3 |
E(X) = (−2)(0.7) + 3(0.3) = −1.4 + 0.9 = −$0.50. In the long run you expect to lose $0.50 per play.
Key takeaways
- Expected value is the long-run average outcome.
- Use E(X) = Σ x · P(X = x).
- It does not have to be a value X can actually take (e.g. 3.5 on a die).
- It can represent an average gain, loss, cost, or number of successes.
5 Practice Questions — Expected Value — The Mean of a Random Variable
7. Interpreting Expected Value
What expected value really means
Expected value is the weighted average of all possible outcomes, weighted by their probabilities. It tells us what to expect on average over many repetitions — not what to expect on a single trial.
Example: 3 fair coin flips, X = number of heads
| x | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| P(X = x) | 1/8 | 3/8 | 3/8 | 1/8 |
E(X) = 0(1/8) + 1(3/8) + 2(3/8) + 3(1/8) = 12/8 = 1.5.
What does 1.5 heads mean?
You cannot actually get 1.5 heads in one set of 3 flips (you get 0, 1, 2, or 3). But if you repeat the “flip 3 coins” experiment many times, the average number of heads per set will be very close to 1.5.
Three important points
- Expected value is the long-run average outcome — not the most likely value.
- It is a weighted average: more likely outcomes pull the answer more.
- It does not have to be a possible outcome. 1.5 heads, 3.5 on a die, and −$0.50 on a game are all valid expected values you can never actually observe on one trial.
5 Practice Questions — Interpreting Expected Value
8. Expected Value in Games and Decisions
Why expected value matters for decisions
Expected value gives us a single number to compare two random options — an insurance policy vs. going uninsured, playing a game vs. sitting out, choosing route A vs. route B. Whichever choice has the better expected value is, on average, the better long-run decision.
How to interpret the sign
- Positive expected value: favorable — a long-run gain or profit.
- Negative expected value: unfavorable — a long-run loss or extra cost.
- To choose between two options, compute E(X) for each and pick the better one.
Example 1: Carnival game
It costs $2 to play. Win $10 with probability 0.15, or $0 with probability 0.85. Net outcome X:
| x (net dollars) | 8 | −2 |
|---|---|---|
| P(X = x) | 0.15 | 0.85 |
E(X) = 8(0.15) + (−2)(0.85) = 1.20 − 1.70 = −$0.50 per play. The game is not favorable — over many plays you lose $0.50 each time.
Example 2: Buying shipping insurance
A package has a 5% chance of being lost (which would cost you $80). Insurance costs $3.
- Option A — No insurance: E(cost) = 80(0.05) + 0(0.95) = $4.00.
- Option B — Buy insurance: guaranteed cost = $3.00.
$3 < $4, so buying insurance is the better expected-value decision.
5 Practice Questions — Expected Value in Games and Decisions
9. Variance of a Random Variable
What variance measures
Variance measures how much the possible values of a random variable typically vary around its expected value. It is the expected value of the squared distance from the mean.
Formula
σX2 = Σ (x − μX)2 · P(X = x)
Method (three steps)
- Find the mean μX = E(X).
- For each value, compute (x − μX)2 · P(X = x).
- Add all the terms.
Example: Fair six-sided die
μ = 3.5.
| x | P(X = x) | x − μ | (x − μ)² | (x − μ)² P(X = x) |
|---|---|---|---|---|
| 1 | 1/6 | −2.5 | 6.25 | 1.0417 |
| 2 | 1/6 | −1.5 | 2.25 | 0.3750 |
| 3 | 1/6 | −0.5 | 0.25 | 0.0417 |
| 4 | 1/6 | 0.5 | 0.25 | 0.0417 |
| 5 | 1/6 | 1.5 | 2.25 | 0.3750 |
| 6 | 1/6 | 2.5 | 6.25 | 1.0417 |
Sum: σX2 = 1.0417 + 0.3750 + 0.0417 + 0.0417 + 0.3750 + 1.0417 = 2.9167.
Comparing two games with the same mean
Game A pays +$10 or −$10 with equal probability. Game B pays +$2 or −$2 with equal probability. Both have E(X) = 0, but Game A has variance 100 and Game B has variance 4. Same expected value, very different risk.
Key facts
- Variance is always nonnegative.
- Larger variance → more spread out, less predictable.
- Smaller variance → more concentrated near the mean.
5 Practice Questions — Variance of a Random Variable
10. Standard Deviation of a Random Variable
What standard deviation measures
The standard deviation is the square root of the variance. It measures the typical distance between the values of the random variable and its expected value — in the same units as the variable itself.
Formula
σX = √(σX2)
Why we need it in addition to variance
Variance is in squared units (dollars squared, points squared) and is hard to interpret directly. Standard deviation puts the answer back in the original units, so it’s the number we actually report.
Example 1: Fair six-sided die
From the previous section, σX2 = 2.9167. So σX = √2.9167 ≈ 1.71. On average, an individual roll differs from the mean 3.5 by about 1.71.
Example 2: Number of heads in 3 fair coin flips
μY = 1.5.
| y | P(Y = y) | (y − μ)² | (y − μ)² P(Y = y) |
|---|---|---|---|
| 0 | 1/8 | 2.25 | 0.2813 |
| 1 | 3/8 | 0.25 | 0.0938 |
| 2 | 3/8 | 0.25 | 0.0938 |
| 3 | 1/8 | 2.25 | 0.2813 |
σY2 = 0.75, so σY = √0.75 ≈ 0.87 heads.
Key takeaways
- σX = √(σX2) — same units as the variable.
- Larger σ means more variability; smaller means less.
- Always nonnegative.
5 Practice Questions — Standard Deviation of a Random Variable
11. Transforming Random Variables
What happens when you shift or scale a random variable?
If we add or multiply a random variable by constants, the mean and standard deviation change in a very predictable way. Set Y = a + bX. Then:
μY = a + b·μX and σY = |b|·σX
The variance scales by b2: σY2 = b2 · σX2.
Adding a constant (a shift)
Adding a constant slides every outcome up or down by the same amount. The mean shifts by a, and the standard deviation does not change — the spread is unchanged.
Multiplying by a constant (a scale)
Multiplying by b stretches or shrinks every outcome. The mean is multiplied by b, and the standard deviation is multiplied by |b| (we use absolute value because standard deviation is always nonnegative).
Example 1: Adding a constant
Fair die: μX = 3.5, σX ≈ 1.71. Let Y = X + 4. Then μY = 4 + 3.5 = 7.5, and σY = 1 · 1.71 = 1.71.
Example 2: Multiplying by a constant
Same die. Let Y = 2X. Then μY = 2(3.5) = 7.0, and σY = 2(1.71) = 3.42.
5 Practice Questions — Transforming Random Variables
12. Combining Random Variables
Sums and differences of random variables
We often want to know the mean and standard deviation of a combination of random variables — the total of two dice, the difference of two test scores, the total time of two independent tasks. The rules for the mean are simple; the rules for standard deviation depend on whether the variables are independent.
Mean of a linear combination (always true)
For Z = aX + bY with any constants a and b:
μZ = a·μX + b·μY
Special cases: μX+Y = μX + μY and μX−Y = μX − μY.
Variance rule (only if independent)
If X and Y are independent, the variances add, even for a difference:
σZ2 = a2σX2 + b2σY2
So σZ = √(a2σX2 + b2σY2). Note that standard deviations do NOT add — you must square first.
Example 1: Sum of two independent dice
Each die: μ = 3.5, σ ≈ 1.71. For Z = X + Y: μZ = 7 and σZ = √(1.712 + 1.712) = √5.8336 ≈ 2.42.
Example 2: Difference of two independent dice
Same dice. For Z = X − Y: μZ = 3.5 − 3.5 = 0, but variances still add: σZ = √(1.712 + 1.712) ≈ 2.42.
What if X and Y are NOT independent?
Include the covariance term: σZ2 = a2σX2 + b2σY2 + 2ab σXY. Positive covariance increases the variance of a sum; negative covariance decreases it.
5 Practice Questions — Combining Random Variables
Enroll in SOMATH AP Statistics
Small groups of up to 6 students, taught by real teachers on the Upper West Side. Covers the full College Board AP Statistics syllabus, with free-response drills graded on the AP rubric — including the investigative task.
See the full AP Statistics course → · Book a free 30-minute evaluation · call (646) 668-6151 · 226 W 79th St, New York, NY 10024.