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 The sample space of the experiment is  S = {HH, HT, TH, TT}