A random process, where each outcome is associated with some number.

Random Variable

A random variable is a function that maps outcomes from a probability space to real numbers.
Formally, where is the sample space. For any borel set , the preimage must be measurable in the probability space.

Two main types of random variables exist: discrete and continuous. A discrete random variable takes countably many values (like the number of head in coin flips), while a continuous random variable can take any value in an interval (like the height of people). Mixed types are also possible but less common.
The classification depends on the variable’s cumulative distribution function (CDF):
A discrete random variable has a step function as its CDF, while a continuous random variable has a continuous CDF.

Random variables are a concise summary of all probabilities. We can apply functions over it:

E.g. the probability function → probability distribution.
Or the expected value, variance, standard deviation, …

Then we can ask questions like:
We can do calculus across some range of values… what’s the probability of being in a range of values?
What value do I expect, if I just sample a random item?
How much spread does the distribution have? How surprised would I be if the sampled item differs by so much?
How many emails do I expect to get in the next 10 minutes, given a certain rate of email? Would I be surprised if I got no emails in that time?