AP Statistics / Unit 2: Probability, Random Variables, and Probability Distributions / Topic 2.8
NUM8ERS study notes · Topic 2.8

Introduction to Random Variables and Probability Distributions

Turn random outcomes into numbers. Build a table showing how likely each value is, check that the probabilities make sense, and read the difference between “exactly” and “at most.”

2026–27 curriculum6 worked examples10 practice questionsProbability graphs + visual guides

By the end of this lesson, you should be able to:

  • Define a discrete random variable for a random process.
  • Group outcomes to construct a probability distribution.
  • Check that every probability is valid and the total is 11.
  • Read and represent a distribution as a table, graph or function.
  • Construct cumulative probabilities and distinguish exact models from simulation estimates.

Before you start: Be comfortable with intersections, unions, complements and independence. Review Topic 2.7: Independent Events and Unions of Events if needed.

First time learning this? Follow the 2-coin-toss2\text{-coin-toss} example. Keep the ordered outcome and the number of heads separate.

Here to revise? Use the distribution checklist, then try the practice before opening the solutions.

The concept in 60 seconds

A random variable assigns a numerical value to the outcome of a random process. You choose a clear rule for recording the number; chance determines which value you observe.

Toss a fair coin 2 times2\text{ times}, with independent tosses. Let XX be the number of heads in those 22 tosses. An ordered outcome such as HT\texttt{HT} is not the same thing as the value of XX: HT\texttt{HT} gives X=1X = 1, and TH\texttt{TH} also gives X=1X = 1.

Outcome → recorded value → probability
First identify the possible outcomes. Then group the outcomes that give the same numerical value. Add their probabilities to find the probability of that value.

Visual guide 1: one numerical value for each ordered outcome
Each outcome: probability 14\frac{1}{4}HH\texttt{HH}

Number of heads:
X=2X = 2

Each outcome: probability 14\frac{1}{4}HT\texttt{HT}

Number of heads:
X=1X = 1

Each outcome: probability 14\frac{1}{4}TH\texttt{TH}

Number of heads:
X=1X = 1

Each outcome: probability 14\frac{1}{4}TT\texttt{TT}

Number of heads:
X=0X = 0

H=heads\texttt{H}=\text{heads}, T=tails\texttt{T}=\text{tails}. The order describes the toss results; the random variable records only the number of heads. 22 different outcomes can produce the same value.

The 44 ordered outcomes are equally likely, but the 33 values 0,1, and 20, 1,\text{ and }2 are not. There are 22 ways to get exactly 11 head, so X=1X = 1 has 2 times2\text{ times} the probability of X=0X = 0.

Quick check: why is P(X=1)P(X = 1) not 13\frac{1}{3}?

33 possible numerical values do not imply 33 equally likely values. X=1X = 1 groups HT\texttt{HT} and TH\texttt{TH}, each with probability 14\frac{1}{4}. Therefore P(X=1)=14+14=12P(X = 1) = \frac{1}{4} + \frac{1}{4} = \frac{1}{2}.

The 2-toss2\text{-toss} model

11 complete trial consists of 22 independent tosses of a fair coin. H\texttt{H} means heads and TT means tails. The order matters when listing the sample space:

HH\texttt{HH}, HT\texttt{HT}, TH\texttt{TH}, TT\texttt{TT}

Each ordered outcome has probability (12)×(12)=14(\frac{1}{2}) \times (\frac{1}{2}) = \frac{1}{4}. Define XX as the number of heads in the complete 2-toss2\text{-toss} trial.

  • X=0X = 0: TT\texttt{TT}.
  • X=1X = 1: HT\texttt{HT} or TH\texttt{TH}.
  • X=2X = 2: HH\texttt{HH}.

The possible values of XX are {0,1,2}\{0, 1, 2\}. XX cannot equal 33 because the trial contains only 22 tosses. It cannot equal 1.51.5 because a count of heads must be a whole number.

The definition of XX stays the same across trials. Its observed value changes with the coin results. If this trial produces TH\texttt{TH}, the observed value is x=1x = 1.

Key ideas and notation

Random variable: XX

A numerical quantity determined by a random outcome.

XX: number of heads in 22 tosses.

Observed value: xx

A particular number the variable can take.

After HT\texttt{HT}, the observed value is x=1x = 1.

Discrete variable

Its possible values form a finite or countable list.

{0,1,2}\{0, 1, 2\} is a finite list. Some discrete counts can continue as 0,1,20, 1, 2, … without a fixed upper limit.

Probability distribution

It pairs each possible value with its probability.

The heads-count probabilities are 0.25,0.50, and 0.250.25, 0.50,\text{ and }0.25.

A discrete variable does not have to be a nonnegative whole-number count. A points score could have values −2,1, and 4-2, 1,\text{ and }4; a discrete measurement could have values 0.50.5 and 1.51.5. What matters is the countable set of possible numerical values.

Point probability: p(x)=P(X=x)p(x) = P(X = x).

Cumulative probability: F(t)=P(X≤t)F(t) = P(X \le t).

P(X=1)P(X = 1) asks about exactly 1\text{exactly }1 head. P(X≤1)P(X \le 1) asks about 0 or 10\text{ or }1 head. The symbol ≤\le includes its boundary value.

Heads and tails are outcome labels. Defining a count, score or numerical indicator turns the information you want into a random variable. This lesson focuses on discrete distributions; distributions for continuous measurements are introduced later.

Build a probability distribution

  1. Define the trial and variable. 22 tosses form 11 trial; XX counts heads in that trial.
  2. List the possible values. XX can be 0,1, or 20, 1,\text{ or }2.
  3. Group the outcomes for each value. Combine HT\texttt{HT} and TH\texttt{TH} under X=1X = 1.
  4. Add each group’s outcome probabilities. Use probability rules when outcomes are not equally likely.
  5. Check the completed distribution. Each probability must be between 00 and 11, and the total must be 11.
Visual guide 2: group outcomes to build the distribution
Group 00X=0X = 0

Outcome: TT\texttt{TT}

Probability: 14=0.25\frac{1}{4} = 0.25

Group 11X=1X = 1

Outcomes: HT\texttt{HT}, TH\texttt{TH}

Probability: 24=0.50\frac{2}{4} = 0.50

Group 22X=2X = 2

Outcome: HH\texttt{HH}

Probability: 14=0.25\frac{1}{4} = 0.25

Exact distribution of the number of heads in 22 fair independent tosses.
Heads count xxOrdered outcomesExact probabilityDecimal probability
00TT\texttt{TT}14\frac{1}{4}0.250.25
11HT\texttt{HT}, TH\texttt{TH}12\frac{1}{2}0.500.50
22HH\texttt{HH}14\frac{1}{4}0.250.25

The 33 groups partition the 44 equally likely outcomes. Their probabilities are 0.25+0.50+0.25=10.25 + 0.50 + 0.25 = 1.

The events X=0X = 0, X=1X = 1 and X=2X = 2 cannot occur together in the same trial. They also cover all possible trials. That is why their probabilities add to 11.

The same distribution as a function

A probability mass function, or PMF, states the probability associated with each value:

p(x)=P(X=x)={0.25,x∈{0,2},0.50,x=1,0,otherwise.p(x)=P(X=x)=\begin{cases}0.25,&x\in\{0,2\},\\0.50,&x=1,\\0,&\text{otherwise}.\end{cases}

The 00 case matters: P(X=1.5)=0P(X = 1.5) = 0 even though 1.51.5 lies between 11 and 22. A discrete distribution assigns probability to its specified values, not to every point between them.

Check and graph a distribution

Two essential probability checks

Every probability is valid0≤P(X=x)≤10 \le P(X = x) \le 1 for each listed value.
The total is 11Add the probabilities over all possible values, including any missing entries.

A total of 11 does not fix a negative probability. For example, −0.10,0.60, and 0.50-0.10, 0.60,\text{ and }0.50 sum to 11, but the negative entry makes the proposed distribution invalid.

Negative variable values are allowed; negative probabilities are not. Also check that each value appears 1 time1\text{ time} in the distribution, with all outcomes for that value combined.

Rounding: use exact values when available. 33 probabilities of 13\frac{1}{3} sum to 11, even if displayed as 0.330.33 each and their rounded total is 0.990.99. Distinguish rounded displays from entries stated to be exact.

Visual guide 3: a graph of point probabilities
Heads-count point probabilitiesDiscrete probability graph: number of heads 0 has probability 0.25, 1 has probability 0.50, and 2 has probability 0.25. Probability axis ranges from 0 to 1. 0 1 2 Number of heads, x 0.00 0.25 0.50 0.75 1.00 P(X = x) 0.25 0.50 0.25 Heads-count point probabilitiesDiscrete probability graph: number of heads 0 has probability 0.25, 1 has probability 0.50, and 2 has probability 0.25. Probability axis ranges from 0 to 1. 0 1 2 Number of heads, x 0.00 0.25 0.50 0.75 1.00 P(X = x) 0.25 0.50 0.25

Exact fair-coin model. Each separate bar is P(X=x)P(X = x); its height shows probability. The chart has a 00 baseline and a 0–10\text{-}1 probability scale.

Read the horizontal coordinate as the value of XX and the bar height as P(X=x)P(X = x). The bar over 11 has height 0.500.50. The other 2\text{other }2 have height 0.250.25.

The bars are separate because XX takes discrete values. Do not read a new probability at 0.50.5 or 1.51.5 by drawing a sloping line between bars. For this graph, the 33 probability heights add to 11.

Find an event probability from the distribution

Add the probabilities of every value satisfying the question. For example, “at least 11 head” includes X=1X = 1 and X=2X = 2:

P(X≥1)=P(X=1)+P(X=2)=0.50+0.25=0.75P(X \ge 1) = P(X = 1) + P(X = 2) = 0.50 + 0.25 = 0.75.

The complement gives the same result: 1−P(X=0)=1−0.25=0.751 – P(X = 0) = 1 – 0.25 = 0.75.

Read cumulative probabilities

A cumulative distribution gives F(t)=P(X≤t)F(t) = P(X \le t): add all point probabilities at values less than or equal to the threshold tt.

Visual guide 4: accumulate probabilities up to the threshold
Heads-count cumulative probabilitiesStep cumulative distribution F(t)=P(X≤t): 0 below 0; 0.25 for 0≤t<1; 0.75 for 1≤t<2; 1 for t≥2. Filled points include endpoints; hollow points exclude them. 0 1 2 Threshold, t 0.00 0.25 0.50 0.75 1.00 F(t) = P(X ≤ t) Endpoint included Endpoint excluded Heads-count cumulative probabilitiesStep cumulative distribution F(t)=P(X≤t): 0 below 0; 0.25 for 0≤t<1; 0.75 for 1≤t<2; 1 for t≥2. Filled points include endpoints; hollow points exclude them. 0 1 2 Threshold, t 0.00 0.25 0.50 0.75 1.00 F(t) = P(X ≤ t) Endpoint included Endpoint excluded
Cumulative probabilities at the 33 possible heads counts.
Threshold ttValues includedCumulative probability F(t)F(t)
00000.250.25
1100 and 110.25+0.50=0.750.25 + 0.50 = 0.75
220,1, and 20, 1,\text{ and }20.25+0.50+0.25=1.000.25 + 0.50 + 0.25 = 1.00

Exact fair-coin model. Filled points include each new value [Truncated]