Skip to main content

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, x0123
P(X = x)1/83/83/81/8
P(X ≤ x)1/84/87/88/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.

  1. 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 solution
    1. Step 1: Probabilities must add to 1: 0.10 + 0.35 + 0.30 + 0.15 = 0.90, so P(X = 4) = 0.10.
    2. Step 2: P(X ≥ 2) = 0.30 + 0.15 + 0.10 = 0.55.
    3. 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.

  2. 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 solution
    1. Step 1: "More than 1" means X = 2 or X = 3.
    2. Step 2: P(X > 1) = 3/8 + 1/8 = 4/8 = 1/2.
    3. 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

  • AP Stats 2.B.1 - Discrete Random Variables

    Skew The ScriptWatch on YouTube (opens in a new tab)

  • AP Statistics Unit 2 | Random Variables & Probability Distributions | CED 2.8 | Guided Notes

    Goldie's Math EmporiumWatch on YouTube (opens in a new tab)

  • AP Statistics: Topic 4.7 Introduction to Random Variables and Probability Distributions

    Michael Porinchak - AP Statistics & AP PrecalculusWatch on YouTube (opens in a new tab)

  • Probability with discrete random variable example | Random variables | AP Statistics | Khan Academy

    Khan AcademyWatch on YouTube (opens in a new tab)

  • An Introduction to Discrete Random Variables and Discrete Probability Distributions

    jbstatisticsWatch on YouTube (opens in a new tab)

  • Valid discrete probability distribution examples | Random variables | AP Statistics | Khan Academy

    Khan AcademyWatch on YouTube (opens in a new tab)

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.

Question 1 of 3Calculator allowed

Which of the following is a discrete random variable?

Number of pets, x01234
P(X = x)0.300.350.20?0.05

Invented data: X is the number of pets in a randomly selected household in a town

Question 2 of 3Calculator allowed

What is the missing probability, P(X = 3)?

Question 3 of 3Calculator allowed

What is P(X ≤ 1), the cumulative probability for X = 1?

0 of 3 answered