Random Variables
Nathan Kamgang
The outcomes of a sample space (see the article on sample spaces referenced earlier) are not necessarily numerical. However, as mathematicians, we are interested in quantities such as averages, variances, and distributions, all of which require numbers.
This is where random variables come in.
A random variable is a function that maps outcomes of a sample space to real numbers. If the sample space is denoted by $\Omega$, then a random variable is a mapping
$$ X : \Omega \to \mathbb{R}. $$Examples
Card color
Let $ \Omega = {\text{Red}, \text{Black}}. $ Define the random variable
$$ X(\text{Red}) = 1, \qquad X(\text{Black}) = 0. $$Here, the random variable encodes the color of the card numerically.
Six sided die
Let
$$ \Omega = {1,2,3,4,5,6}. $$Define
$$ X(\omega) = \omega. $$In this case, the outcomes are already numerical, so the random variable simply returns the value that is already present. This shows that a random variable does not add randomness. It only assigns numbers to outcomes.