Function

*f*of the set of possible outcomes of a random experiment in a subset of the set of real numbers.A random variable is a set of ordered pairs (

*X*,*Y*) in which*X*belongs to the set of possible outcomes of a random experiment and*Y*belongs to the set of probabilities of obtaining any one of these outcomes.### Example

When rolling an honest die with six faces numbered 1 to 6, the possible outcomes belong to the set {1,2,3,4,5,6} and the set of probabilities of the events is a subset of the interval [0, 1]. The value 0 corresponds to an impossible event and the value 1 corresponds to a certain event.

The probability of rolling an even number is 0.5 or \(\frac {1} {2}\).

The random variable *f* can therefore be described in extension like this:

\(f=\{ \left( 1,\frac {1} {6}\right) ,\left( 2,\frac {1} {6}\right),\left( 3,\frac {1} {6}\right),\left( 4,\frac {1} {6}\right),\left( 5,\frac {1} {6}\right),\left( 6,\frac {1} {6}\right)\}\).