What is a Random Variable?
A random variable is a quantity whose value depends on the outcome of a random process, or “experiment”.
Before we see what happens with this process, there are different values the random variable might take, and we can make probability statements about them.
Suppose, for example, that we plan to roll a fair die. Let $X$ represent the number that will appear. Before we roll, $X$ is still full of possibilities: it might turn out to be 1, 2, 3, 4, 5 or 6. We can therefore sensibly write
$$\mathbb{P}(X = 3) = \frac{1}{6}.$$
Once we actually roll the die, things change. If the outcome is 3, we now have an ordinary number, which we might write as $x = 3$. The random variable $X$ and the observed number $x$ are therefore not the same sort of thing.
Importantly, this distinction is not just about what we know. Suppose a friend rolls the die behind a screen and refuses to tell us the result. We may not know the number, but the roll has nevertheless produced one particular value. An unknown number is still a number – not a random variable.
A useful way to picture the difference is to compare a random variable with a live tiger. A live tiger still has a range of things it might do. An ordinary number is more like a toy tiger: even if the toy tiger has gone missing and we do not know where it is, it is still sitting in one definite place. In the same way, not knowing a number does not make it random.
The same idea appears naturally in econometrics. Suppose we are going to select a worker at random from a certain company, and record their annual wage. Before the worker is selected, we can represent their wage by a random variable $Y$. Once we have selected the worker and recorded, say, a wage of £32,000, we have instead a particular numerical value.
Strictly speaking, a random variable need not be the complete outcome of the random process itself. It can be a numerical quantity determined by that outcome. More formally, random variables are defined as functions, from the set of outcomes to the real numbers. The extension page linked below develops this more precise idea.
Random variables appear everywhere in probability, statistics and econometrics. The basic distinction is important to keep hold of throughout: before an experiment, a random variable represents a quantity whose value is uncertain; once the experiment has taken place, the result is just a number.