Skip to text
Measure of Chance

Chapter VI · 24 min

Random Variables

Numbers attached to outcomes

“A random variable is a function, and as such it is neither random nor a variable.”

— Joseph L. Doob, Stochastic Processes (1953)

Outcomes can be messy — a whole deck, a whole image, a whole game of Monopoly. What you can compute with is often a number you attach to that mess: the number of aces, the pixel intensity, the total score. A random variable is that attachment. It is a function, and as such it is neither random nor a variable. The randomness lives on ; the function just reports a number.

A function on Ω

A (real) random variable is a map . For a subset of the line, the event that lands there is the preimage

We write as shorthand for . The left side looks like a statement about a number; the right side is an ordinary event. Keeping both pictures in mind prevents a surprising amount of confusion.

Ω — 36 equally likely pairsX = sum — 11 values, not equally often23456789101112X(ω₁,ω₂)=ω₁+ω₂terracotta: the six pairs with sum 7
Left: the 36 points of Ω, equally likely. Right: X bunches them into eleven numbers. Six terracotta cells become the single bar at 7. A random variable is that bunching — a function, not a new experiment.

Write the pmf, one line at a time

For the sum , the value occurs in ordered pairs (a useful pattern: 1,2,3,4,5,6,5,…,1). So

Check the two ends: , . Sum of all eleven masses: . That last line is not optional. If your masses do not add to 1, you have not written a pmf; you have written a list of numbers.

Distributions, pmfs, cdfs

The distribution of is the push-forward of onto the line: the rule that tells you for sets of numbers. When takes finitely or countably many values, the distribution is recorded by a probability mass function

The cumulative distribution function (cdf)

is defined for every random variable, discrete or not. It is non-decreasing, right-continuous, and runs from 0 to 1. For a discrete variable it is a staircase; the height of the jump at is .

  • Two different experiments can induce the same distribution. Fair-coin and “I drew an even die face” are different stories with the same .
  • Functions of random variables are random variables: has .
  • The pair is a random vector — a function to . Chapter 10.

Foundations studio: make the idea yours

This extended studio deliberately slows the pace. It is for a first-time learner who wants to recognize the idea in a new story, not merely reproduce a formula. Work with pencil and paper. Predict before calculating; redraw the pictures; and finish every numerical answer with a sentence in ordinary language.

A mental map before more algebra

A random variable is a deterministic function applied to a random outcome. Its distribution records how probability mass is transported from the sample space onto numbers.

outcome omegafunction Xvalue xdistributionquestions about XWhen a formula feels unmotivated, move one box to the left.
A working map for Random Variables. Cover the labels and reconstruct the chain from memory.

Do not treat the arrows as a theorem. They are a study aid. A strong probability habit is to move back one box whenever a formula feels unmotivated: ask what the experiment is, what information is available, and what quantity the question actually requests.

Three formulas worth being able to narrate

Read this line from left to right and explain what every symbol refers to in the experiment. If a symbol has no story, the model is not finished.

Now read the statement backwards: what would have to be known to use it? Backwards reading is often the difference between recognizing a formula and knowing when it applies.

Test the expression at an edge case or simple symmetric case. Probability formulas should survive sanity checks before you trust the arithmetic built on them.

Worked example ladder

A small experiment you can actually do

PredictRepresentComputeCheckExplainThe arithmetic is the middle of the loop, not the whole of it.
A five-step habit for every example in this chapter.

What usually goes wrong

When you notice this mistake, do not merely correct the final number. Return to the first line where the model became ambiguous. Probability errors are often representation errors wearing arithmetic clothing.

Questions beginners are right to ask

Why call it a variable if it is a function?

Historical terminology survived. Mathematically, treating X as a function prevents ambiguity about what event X<=x means.

Can two different random variables have the same distribution?

Yes. Distribution forgets the underlying outcome-by-outcome relationship and keeps only the probabilities of numerical values.

Why is the cdf so universal?

It exists for every real-valued random variable and completely determines its distribution.

Where the abstraction earns its keep

For each application, ask what counts as an outcome, what the model treats as random, and which assumptions are approximations. This is how probability becomes a modelling language instead of a catalogue of formulas.

Connections: do not store chapters in separate boxes

Problem-solving clinic: from recognition to fluency

There is a stage where every worked example looks clear but a fresh problem still feels foreign. The cure is not another formula; it is practice choosing the representation. Before equations, do a sixty-second scan: identify the experiment, what is known, what remains uncertain, the quantity being asked for, the assumption doing the heavy lifting, and one impossible answer that gives you a sanity bound.

PredictRepresentComputeCheckExplainThe arithmetic is the middle of the loop, not the whole of it.
The expert loop returns every calculation to the original story.

Case clinic A: Sum of two dice

Thirty-six equally likely ordered pairs are mapped to eleven possible sums. The values are not equally likely because different numbers of outcomes collapse onto each sum.

Case clinic B: Indicator variable

The indicator 1_A equals one when event A occurs and zero otherwise. This tiny random variable turns event logic into algebra and later makes expectation proofs remarkably short.

Solve or reason about it twice: once exactly and once with a rough estimate, simulation, or symmetry argument. If the two approaches disagree dramatically, investigate before trusting the more sophisticated calculation.

Debug a confident wrong answer

Two questions to answer without notes

Why call it a variable if it is a function? Historical terminology survived. Mathematically, treating X as a function prevents ambiguity about what event X<=x means.

Can two different random variables have the same distribution? Yes. Distribution forgets the underlying outcome-by-outcome relationship and keeps only the probabilities of numerical values.

A notebook protocol for proficiency

Give this chapter one notebook page divided into four quadrants: picture, formula, example, mistake. Redraw the main visual from memory, narrate one formula in English, invent a fresh story using the same mathematics, and record the most tempting wrong move. Revisit the page after two days and again after a week.

A mastery check before you move on

Try these without looking back. If one item feels slippery, return to the corresponding example and rebuild it rather than memorizing the answer.

  1. Give a one-minute explanation of the chapter title to a curious teenager without a formula.
  2. Invent a tiny example with at most six elementary outcomes and solve it completely by enumeration.
  3. State one assumption that would make your example invalid and identify exactly which line would break.
  4. Draw the mental map from memory and connect at least two boxes to an earlier or later chapter.
  5. Write one question whose answer you still do not know. Good questions show that the concept has become active rather than passive.