If you recall the definition of a function, you will realise that the random variable X
is really speaking a function whose domain is the set of outcomes (or sample space) of
a random experiment A random variable can take any real value, therefore, its
co-domain is the set of real numbers Hence, a random variable can be defined as
follows :
Definition 4 A random variable is a real valued function whose domain is the sample
space of a random experiment For example, let us consider the experiment of tossing a coin two times in succession