# Definition of Random Variable

The concept of Random Variable is a natural extension of the concept of a
*
random experiment
*
. Let's recall for that a random experiment is simply a procedure that leads to a non-deterministic outcome (meaning, we cannot predict it beforehand).

For example, a random experiment corresponds to toss a coin. You cannot predict the outcome (can you?), and no matter how much you practice you won't be able to obtain head or tail at will. Another example, say that you cast a die. If the die is reasonably fair, you won't be able to predict the number you get every time you cast the die (go and tell those guys in Vegas...)

Now, a
*
random variable
*
\(X\) corresponds to a a function that assigns a number to the outcomes of a random experiment.

≫ Huh?? (That's what you ask....)

Ok, bare with me for a second. Come back to the random experiments. Say you cast two dice, to make it more exciting. What are the possible outcomes of you experiments? Well, it is going to be all the possible pairs \((i,j)\), with \(i,j\in \{1,2,3,4,5,6\}\). (Or you can write them the long way (1, 1), (1, 2), (1, 3),....(6, 6)). So, a random variable would be, for instance, the sum of the numbers shown on the dice.

For example, if the outcome is (1, 2), then the random variable \(X\) corresponds to the sum of the numbers, which is \(X = 1 + 2 = 3\). You see, \(X\) is in fact a random variable, because it
*
assigns
*
a number to the outcomes of a random experiment. Why we call it random variable? Because it is random too! You cannot predict the value of a random variable before hand. Once you have the outcome of the random experiment, just then you know the value of the random variable.

Now we give the technical definition of a random variable, even though the concepts described above are enough to proceed, and keep learning more about random variables.

**
Definition:
**
Let \(\Omega\) be the sample space of the random experiment \(\varepsilon\). We say that \(X\) is a random variable when \(X\) is a function from \(\Omega\) to \(\mathbb R\):

This definition is saying exactly the same we said before. Some other examples of random variables

**
Example:
**
Assume that you toss a fair coin 3 times. We define the random variable \(X\) as the total number of heads. Another random variable \(Y\) is defined as the total number of tails.

(...to be continued)