Learning path

Full curriculum

Full curriculum

Unit content

Random variables

A random experiment produces an outcome, but the outcome itself may not be the numerical quantity we care about. A random variable assigns a number to each outcome.

Formally, a random variable $X$ is a function from the sample space to numerical values:

$$X:\Omega\to\mathbb R.$$

Outcome versus value

Suppose two dice are rolled. An outcome might be the ordered pair

$$(2,5),$$

while a random variable could record the sum:

$$X(2,5)=7.$$

Many different outcomes can therefore produce the same value of $X$.

Events involving a random variable

A statement such as

$$X\le7$$

represents the event containing every outcome whose assigned value is at most $7$. Probabilities of numerical statements are therefore probabilities of subsets of the original sample space.

Discrete and continuous random variables

A discrete random variable takes values in a finite or countable set, such as the number of heads in ten coin flips.

A continuous random variable is modeled over a continuous range, such as a waiting time or measured length.

The distinction determines how probabilities are represented: discrete variables assign probability masses to individual values, while continuous variables use probability density over intervals.