A random variable is a numerical outcome of a random process or experiment. It assigns a number to each possible outcome, allowing us to analyze and understand uncertainty. For example, if we roll a die, the random variable could represent the number that appears on the top face, which can be any value from 1 to 6.
There are two main types of random variables: discrete and continuous. A discrete random variable can take on a countable number of values, like the number of heads in a series of coin flips. In contrast, a continuous random variable can take on any value within a range, such as the height of individuals in a population.