Prob and StatsRandom VariablesS-MD.A.1

Discrete Random Variables

List values and their probabilities in a table.

Not started Jump to practice

So far events were described in words: "even," "a heart." Often the outcome we care about is a number: the number of heads, the sum of two dice, the number of customers in line. A random variable turns each outcome of a sample space into a number, so that we can compute with it.

Key idea

A random variable $X$ assigns a number to each outcome of a chance process. A discrete random variable has separate possible values (often counts). Its probability distribution lists each value $x$ with its probability $P(X = x)$. Every probability is between 0 and 1, and together they add to exactly 1.

Why it works

The values of $X$ split the sample space into separate pieces: every outcome gives exactly one value. So the pieces cover all of $S$ without overlapping, and their probabilities must add to $P(S) = 1$. That gives a free check on every table, and a way to fill in one missing probability.

Worked example: Building a distribution

Flip a fair coin 3 times. Let $X$ be the number of heads. Find the probability distribution of $X$.
  1. The 8 equally likely outcomes: HHH, HHT, HTH, THH, HTT, THT, TTH, TTT.
  2. $X = 3$: HHH (1 outcome). $X = 2$: HHT, HTH, THH (3). $X = 1$: 3 outcomes. $X = 0$: TTT (1).
  3. So $P(X = 0) = \frac{1}{8}$, $P(X = 1) = \frac{3}{8}$, $P(X = 2) = \frac{3}{8}$, $P(X = 3) = \frac{1}{8}$.
  4. Check: $\frac{1 + 3 + 3 + 1}{8} = 1$.

Answer: Values 0, 1, 2, 3 with probabilities $\frac18, \frac38, \frac38, \frac18$.

The number of pets in a randomly chosen household.
$x$ (pets)01234
$P(X = x)$0.300.25?0.150.05

Worked example: A missing probability

In the table, find $P(X = 2)$, then $P(X \ge 2)$.
  1. The known probabilities add to $0.30 + 0.25 + 0.15 + 0.05 = 0.75$.
  2. So $P(X = 2) = 1 - 0.75 = 0.25$.
  3. $$P(X \ge 2) = P(X = 2) + P(X = 3) + P(X = 4) = 0.25 + 0.15 + 0.05 = 0.45$$

Answer: $P(X = 2) = 0.25$; $P(X \ge 2) = 0.45$.

The sum of two dice is a random variable with values 2 to 12. Roll many times: the histogram settles onto the true distribution (outlined), and the proportion of 7s settles near 6/36.

Common mistake

Writing a probability table whose probabilities do not add to 1, often by leaving out a value (such as 0 pets) or double-counting outcomes. Check every table by adding the probabilities.

Practice

Pass with 3 right answers, the last 2 in a row. Each right answer earns 1 XP.

Loading practice…

Builds on

Leads to

Sources and further reading

  • OpenStax, Introductory Statistics 2e, section 4.1 Probability Distribution Function (PDF) for a Discrete Random Variable
  • Common Core State Standards for Mathematics, S-MD.A.1 (Define a random variable and graph its probability distribution)
@teddyrookbook GitHub