Educerie · AP · Statistics
AP Statistics 2.8
Introduction to Random Variables and Probability Distributions
How do we describe chance and variation, so that a claim about a population can be backed by numbers?
What you will learn
- Understand a random variable as a number that depends on chance
- Know that a discrete distribution lists every value with its probability and the probabilities sum to 1
- Understand a cumulative distribution as P(X at most x)
- Know that a distribution can come from the rules of probability or a simulation
You must be able to
- Define a random variable in words
- Find a missing probability from the sum to 1
- Calculate probabilities such as P(X at least 2) from a table
- Construct a distribution as a table, graph or function
- Construct and read a cumulative distribution
- Estimate a distribution from simulation results
In the exam. Section I multiple choice asks you to find a missing probability, read a probability from a table or histogram of a distribution, use a cumulative distribution, or say which variable is properly defined. The distribution is the starting point of the two-to-three-part sets on a shared stimulus in Unit 2, which go on to a mean and a binomial probability. In Section II, a clear definition of the variable and a correct table are the first marks of a probability question. Skill 3.A.
1Random variables
A random variable is a number that depends on chance. Not every random outcome is a random variable: the color of a car is an outcome, but it is not a number. "The number of red cars in a sample of 10" is a random variable.
Example: toss a coin 3 times. The outcome is a sequence of heads and tails. The random variable = "the number of heads in 3 tosses" has the possible values 0, 1, 2 and 3.
Define the variable in words. The exam gives marks for a clear definition, with the thing being counted and where it is counted. " is the number of heads in 3 tosses" is a definition. " is heads" is not, and " is the mean" does not say what is being measured.
A discrete random variable takes a countable set of values, often whole numbers, such as 0, 1, 2 and so on. This topic is about discrete ones. A continuous random variable can take any value in an interval, like a time or a mass, and Topic 2.11 deals with it.
2A probability distribution
The distribution of a discrete random variable has two rules.
- Every probability is between 0 and 1.
- The probabilities of all the possible values add to 1.
The possible values are separate, non-overlapping outcomes, so their probabilities add. This is the same fact as "the sample space has probability 1" from 2.4.
Finding a missing probability. The number of items a customer returns, , has this distribution, with one value missing.
| 0 | 1 | 2 | 3 | 4 | |
|---|---|---|---|---|---|
| 0.30 | 0.35 | 0.20 | 0.10 | ? |
The probabilities add to 1, so .
Using the distribution. To find the probability of a set of values, add the probabilities of every value in the set.
These two answers are complements, and . Watch the inequality: "at least 2" includes 2, "more than 2" does not, "fewer than 2" does not, and "at most 2" does.
3Building a distribution from the rules of probability
Example: roll two fair dice, and let be the larger of the two numbers (the maximum). What is the distribution of ?
The 36 ordered pairs of dice are equally likely (2.4). Count the pairs for each value of .
- only for (1, 1): 1 pair.
- for (1, 2), (2, 1), (2, 2): 3 pairs.
- for the pairs with a and no larger number: pairs.
| 1 | 2 | 3 | 4 | 5 | 6 | |
|---|---|---|---|---|---|---|
| 1 ÷ 36 | 3 ÷ 36 | 5 ÷ 36 | 7 ÷ 36 | 9 ÷ 36 | 11 ÷ 36 |
Check: , so the probabilities add to 1. This is a distribution, and the function that gives it is for .
Figure 1 is the probability histogram of .
Each bar's height is the probability of that value of , and the six heights add to 1. The distribution is skewed left: the bars climb to the largest value and fall away to small values, so the single most likely value is 6. This is a graph of the distribution, a description of the whole variable. It is not a graph of data from one sample.
4The cumulative distribution
A cumulative distribution shows, for each value , the probability that is less than or equal to , written . It is found by adding the probabilities up to .
| 1 | 2 | 3 | 4 | 5 | 6 | |
|---|---|---|---|---|---|---|
| 1 ÷ 36 | 4 ÷ 36 | 9 ÷ 36 | 16 ÷ 36 | 25 ÷ 36 | 36 ÷ 36 |
Each entry is the one before it plus the new probability, for example . It always ends at 1.
Reading the table:
- is read straight from the table.
- is the complement of : . Direct addition gives the same: .
- is the difference of neighboring entries: .
For a discrete variable, "" includes 4, so the cumulative value at 4 is not the same as , which is the entry for 3.
5Estimating a distribution by simulation
A distribution that is hard to work out can be estimated. Simulate the random process many times, record the value of each time, and use the relative frequencies as estimates of the probabilities, as in 2.3.
A simulation of 360 rolls of two dice recorded the larger number each time.
| 1 | 2 | 3 | 4 | 5 | 6 | |
|---|---|---|---|---|---|---|
| Frequency | 12 | 32 | 52 | 85 | 73 | 106 |
| Relative frequency | 0.033 | 0.089 | 0.144 | 0.236 | 0.203 | 0.294 |
| Exact probability | 0.028 | 0.083 | 0.139 | 0.194 | 0.250 | 0.306 |
The frequencies add to 360. The simulated values follow the shape of the exact distribution, with the largest bar at 6, but they do not match exactly (here 4 beats 5, which the exact values do not). For instance, the simulation gives as , while the exact value is 0.556. More trials would bring the estimate closer.
Practice questions
30 questions on this note, from easy to hard. Each one you get right lights a star of this topic's constellation.