Skip to content

Mathematics · Ch 10 — Random Variables and Probability Distributions

What is a Random Variable?

10.1

What is a Random Variable?

A great many real questions boil down to attaching a number to the outcome of an experiment whose result we cannot predict with certainty. "How many heads show up when a coin is tossed 20 times?", "how many defective bulbs are there in a box of 50?", "how many customers walk into a shop in an hour?" — in every case, chance decides the outcome, but what we actually care about is a number derived from that outcome.

This idea is captured by the notion of a random variable. Formally, if SS is the sample space of a random experiment, a random variable is simply a function X:S→RX : S \to \mathbb{R} that assigns a real number to every outcome in SS. It does not have to be the outcome itself — it can be any numerical feature we choose to track, such as a count, a sum, or a score.

Worked Example. Suppose two ordinary six-sided dice are rolled together. The sample space SS consists of all 3636 ordered pairs (i,j)(i,j) with i,j∈{1,2,3,4,5,6}i,j \in \{1,2,3,4,5,6\}. Define XX to be the sum of the two numbers shown, so X(i,j)=i+jX(i,j) = i+j. This XX is a random variable — a function from SS into the real numbers. Its possible values (its range) are 2,3,4,…,122,3,4,\dots,12. For instance, X(3,4)=7X(3,4) = 7, and there are six outcomes in SS that give X=7X = 7, namely (1,6),(2,5),(3,4),(4,3),(5,2),(6,1)(1,6),(2,5),(3,4),(4,3),(5,2),(6,1). …