AP® Statistics review sheet from Aim for Five (aimforfive.com/stats/units/2/2-8)
Unit 2 · Topic 2.8
2.8 Introduction to Random Variables and Probability Distributions
A random variable attaches a number to each outcome of a random process. For a discrete random variable, a probability distribution lists every value with its probability, and a cumulative distribution adds them up as you go.
Key terms
- random variable
- discrete random variable
- probability distribution
- cumulative probability
Random variables
A random variable is a numerical result of a random process. It's usually written with a capital letter like X. If you flip a coin 3 times and X = the number of heads, X can be 0, 1, 2 or 3.
A discrete random variable has values you can list: counts like 0, 1, 2, … . A continuous random variable can take any value in an interval, like a waiting time; you'll meet those in 2.11. For now, everything is discrete.
Probability distributions
A probability distribution gives the probability of each possible value. It can be a table, a graph (a histogram of probabilities) or a formula. Every probability must be between 0 and 1, and they must add to exactly 1.
For three fair coin flips, the 8 equally likely outcomes give:
| Number of heads, x | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| P(X = x) | 1/8 | 3/8 | 3/8 | 1/8 |
| P(X ≤ x) | 1/8 | 4/8 | 7/8 | 8/8 |
Cumulative probability
The cumulative distribution gives P(X ≤ x) for each value: add the probabilities from the smallest value up to x. The last entry is always 1.
Use it for "at most" questions. To get "more than," subtract from 1: P(X > 1) = 1 − P(X ≤ 1) = 1 − 4/8 = 1/2.
Graphing a distribution
A probability histogram puts the values of X on the horizontal axis and draws a bar above each value with height equal to its probability. You describe its shape, center and spread just as you would for data in Unit 1. The three-coin-flip distribution is symmetric, centered at 1.5 heads.
The difference from Unit 1: a data histogram shows what happened in one sample, while a probability histogram shows the model for what happens in the long run.
Where distributions come from
You can build a distribution with the probability rules (list outcomes, use the multiplication rule) or estimate one by simulation: run many trials and use the relative frequency of each value.
Pay attention to inequality words. "At least 2" means X ≥ 2. "More than 2" means X > 2. "At most 2" means X ≤ 2. "Fewer than 2" means X < 2. For a discrete variable, X < 2 and X ≤ 2 are different.
Worked examples
Try each one yourself first, then open the solution.
- Example 1Calculator allowed
Find a missing probability and use it
Let X = the number of cars a randomly chosen household owns. P(X = 0) = 0.10, P(X = 1) = 0.35, P(X = 2) = 0.30, P(X = 3) = 0.15, and P(X = 4) is missing (no household owns more than 4). Find P(X = 4), P(X ≥ 2) and P(X < 2).
Show the solutionHide the solution
- Step 1: Probabilities must add to 1: 0.10 + 0.35 + 0.30 + 0.15 = 0.90, so P(X = 4) = 0.10.
- Step 2: P(X ≥ 2) = 0.30 + 0.15 + 0.10 = 0.55.
- Step 3: P(X < 2) = P(X = 0) + P(X = 1) = 0.45. That's the complement of X ≥ 2, so 1 − 0.55 checks out.
Answer: P(X = 4) = 0.10, P(X ≥ 2) = 0.55, P(X < 2) = 0.45.
- Example 2Calculator allowed
Trap: "at least" vs. "more than"
For three fair coin flips, a student finds P(more than 1 head) as 1 − P(X = 0) = 7/8. Find the correct answer.
Show the solutionHide the solution
- Step 1: "More than 1" means X = 2 or X = 3.
- Step 2: P(X > 1) = 3/8 + 1/8 = 4/8 = 1/2.
- Step 3: The student calculated P(X ≥ 1), which includes X = 1.
Answer: 1/2. The student found "at least one," not "more than one."
Common mistakes
- Mixing up ≥ and > (or ≤ and <) with discrete variables.
- Building a distribution whose probabilities don't add to 1.
- Listing outcomes (HTH, HHT, …) instead of values of the random variable (0, 1, 2, 3) in the distribution table.
On the exam
- Expect to complete a probability distribution table, then use it to answer "at least" and "at most" questions.
- If a question includes a histogram of a probability distribution, the bar heights are probabilities and should add to 1.
Connected topics
Videos
Check yourself
3 questions on 2.8 Introduction to Random Variables and Probability Distributions. Pick an answer to see if you got it, and why.
Which of the following is a discrete random variable?
| Number of pets, x | 0 | 1 | 2 | 3 | 4 |
|---|---|---|---|---|---|
| P(X = x) | 0.30 | 0.35 | 0.20 | ? | 0.05 |
Invented data: X is the number of pets in a randomly selected household in a town
What is the missing probability, P(X = 3)?
What is P(X ≤ 1), the cumulative probability for X = 1?
0 of 3 answered