elementary events random variable real number identity function flipping a coin sample space event experiment
When doing calculations using the outcomes of an experiment, it is necessary that all those elementary events have a number assigned to them. This is done using a random variable. A random variable is a function that assigns to each elementary event in the sample space a real number. This function is usually denoted by a capital letter. In the case of a dice, the assignment of a number to certain elementary events can be done using the identity function. This does not always work. For example, when flipping a coin the two possible outcomes are "heads" and "tails". In this example, the random variable X could assign to the outcome "heads" the number "0" (



X
(
h
e
a
d
s
)
=
0


{\displaystyle X(heads)=0}

) and to the outcome "tails" the number "1" (



X
(
t
a
i
l
s
)
=
1


{\displaystyle X(tails)=1}

).
