Unit 2 · Topic 2.8 · about 20 minutes
Introduction to Random Variables and Probability Distributions
Define a discrete random variable in context and construct its probability distribution, including its cumulative distribution, from the rules of probability or from a simulation.
Predict first
Roll two fair dice and let X be the larger of the two numbers (if they match, X is that number). Which value of X is the most likely?
Random variables
A random variable is a variable whose values are numbers produced by a random process. It is named with a capital letter, like , and its possible values are written in lowercase, like . The larger of two dice is a random variable. So are the number of free throws a player makes in a game and the number of texts you get in the next hour.
This lesson is about discrete random variables, which take a countable set of values such as 0, 1, 2 and so on. Variables that can take any value in an interval, like a time or a height, come in 2.11 The Normal Distribution.
Probability distributions
A probability distribution for a discrete random variable gives the probability of every possible value. Every probability in it is between 0 and 1, and the probabilities add to exactly 1.
A distribution can be worked out with the rules of probability, or estimated with a simulation. It can be shown as a table, as a graph, or as a function, meaning a formula that gives the probability for each value.
Worked exampleThe distribution of the larger die
Two fair dice are rolled, and X is the larger of the two numbers. Construct the probability distribution of X.
List the possible values. X can be 1, 2, 3, 4, 5 or 6.
Count the outcomes for each value. All 36 ordered pairs are equally likely. X = 1 only for (1, 1). X = 2 for (1, 2), (2, 1) and (2, 2), three pairs. Each step up adds two more pairs, so the counts are 1, 3, 5, 7, 9 and 11.
Divide each count by 36. The probabilities are and .
Check the total. , so the probabilities add to , as every distribution must.
The table below. As a function, for .
| 1 | 2 | 3 | 4 | 5 | 6 | |
|---|---|---|---|---|---|---|
| As a decimal | 0.028 | 0.083 | 0.139 | 0.194 | 0.250 | 0.306 |
The same distribution as a graph
Each bar's height is the probability of that value of X, and the six heights add to 1.
Cumulative probabilities
A cumulative probability distribution gives, for each value, the probability that X is less than or equal to that value. Build it by adding probabilities from the left: .
For the larger die the cumulative probabilities are square numbers over 36, so as a function, . The grid of rolls from 2.4 Introduction to Probability shows why: means both dice show 3 or less, which is a 3-by-3 block of 9 cells.
| 1 | 2 | 3 | 4 | 5 | 6 | |
|---|---|---|---|---|---|---|
A cumulative table answers "at most" questions directly and "at least" questions through the complement: . The larger die is 5 or 6 more than half the time.
Estimating a distribution by simulation
Some distributions are easier to simulate than to work out. In basketball's one-and-one, a player shoots one free throw. A miss ends the trip with 0 points. A make earns a second shot, so the trip ends with 1 or 2 points. Take a 70% shooter whose shots are independent, and let X be the points she scores. A simulation of 1,000 trips to the line gave the counts below.
The rules of probability give the exact distribution to compare against: , and . Each simulated relative frequency lands within 0.02 of the exact value.
| Points scored, | 0 | 1 | 2 | Total |
|---|---|---|---|---|
| Simulated count | 292 | 228 | 480 | 1,000 |
| Relative frequency | 0.292 | 0.228 | 0.480 | 1 |
| Exact probability | 0.30 | 0.21 | 0.49 | 1 |
Check your understanding
Each list gives probabilities for the values 0, 1, 2 and 3 of a random variable X, in that order. Which list is a valid probability distribution?
Let X be the number of cars owned by a randomly chosen household in a town. Its distribution is below, with one probability missing.
Find . Give a decimal.
The number of siblings X of a randomly chosen student at a school has this cumulative distribution:
What is ?
Let X be the number of goals a soccer team scores in a randomly chosen game, with , , and . What is ?
A player who makes 60% of her free throws goes to the line for a one-and-one. If she makes the first shot she takes a second; if she misses the first, the trip is over. Her shots are independent. Let X be the number of points she scores. What is ?
Course alignment, for teachers
AP Statistics topic 2.8, Unit 2: Probability, Random Variables, and Probability Distributions.
- Skill 3.A: Construct tabular and graphical representations of data and distributions.