In applications of probability theory one usually has to deal simultaneously with several random phenomena. In section 7 of Chapter 4, we indicated one way of treating several random phenomena by means of the notion of a numerical \(n\) -tuple valued random phenomenon. However, this is not a very satisfactory method, for it requires one to fix in advance the number \(n\) of random phenomena to be considered in a given context. Further, it provides no convenient way of generating, by means of various algebraic and analytic operations, new random phenomena from known random phenomena. These difficulties are avoided by using random variables. Random variables are usually denoted by capital letters, especially the letters \(X, Y, Z, U, V\) , and \(W\) . To these letters numerical subscripts may be added, so that \(X_{1}, X_{2}, \ldots\) are random variables. For the purpose of defining the terminology we consider a random variable which we denote by \(X\) .

The notion of a random variable is intimately related to the notion of a function, as the following definitions indicate.

The Definition of a Function . An object \(X\) , or \(X(\cdot)\) , is said to be a function defined on a space \(S\) if for every member \(s\) of \(S\) there is a real number, denoted by \(X(s)\) , which is called the value of the function \(X\) at \(s\)

The Definition of a Random Variable . An object \(X\) is said to be a random variable if (i) it is a real valued function defined on a sample description space on a family of whose subsets a probability function \(P[\cdot]\) has been defined, and (ii) for every Borel set \(B\) of real numbers the set \(\{s: \ X(s)\) is in \(B\}\) belongs to the domain of \(P[\cdot]\)

A random variable then is a function defined on the outcome of a random phenomenon; consequently, the value of a random variable is a random phenomenon and indeed is a numerical valued random phenomenon. Conversely, every numerical valued random phenomenon can be interpreted as the value of a random variable \(X\) ; namely, the random variable \(X\) defined on the real line for every real number \(x\) by \(X(x)=x\) .

One of the major difficulties students have with the notion of a random variable is that objects that are random variables are not always defined in a manner to make this fact explicit. However, we have previously encountered a similar situation with regard to the notion of a random event. We have defined a random event as a set on a sample description space on which a probability function is defined. In every day discourse random events are defined verbally, so that in order to discuss a random event one must first formulate the event in a mathematical manner as a set. Similarly, with regard to random variables, one must learn how to recognize, and formulate mathematically as functions , verbally described objects that are random variables.

Example 1A. The number of white balls in a sample is a random variable. Let us consider the object \(X\) defined as follows: \(X\) is the number of white balls in a sample of size 2 drawn without replacement from an urn containing 6 balls, of which 4 are white. The sample description space \(S\) of the experiment of drawing the sample may be taken as the set of 30 ordered 2-tuples given in (3.1) of Chapter 1, in which the white balls have been numbered 1 to 4 and the remaining 2 balls, 5 and 6. To render \(S\) a probability space, we need to define a probability function upon its subsets; let us do so by assuming all descriptions equally likely. The number \(X\) of white balls in the sample drawn can be regarded as a function on this probability space, for if the sample description \(s\) is known then the value of \(X\) is known.

\[X(s)=\left\{ \begin{aligned} &0 &&\text { if } s= (5,6),(6,5) \\ &1 &&\text { if } s= (1,5),(1,6),(2,5),(2,6),(3,5),(3,6),(4,5),(4,6), \\ & &&\quad \qquad (5,1),(6,1),(5,2),(6,2),(5,3),(6,3),(5,4),(6,4) \\ &2 &&\text { if } s= (1,2),(1,3),(1,4),(2,1),(2,3),(2,4),(3,1),(3,2), \\ & &&\quad \qquad (3,4),(4,1),(4,2),(4,3). \end{aligned} \right.\tag{1.1}\] 

Exercise

1.1 . Show that the following quantities are random variables by explaining how they may be defined as functions on a probability space:

(i) The sum of 2 dice that are tossed independently.

(ii) The number of times a coin is tossed until a head appears for the first time.

(iii) The second digit in the decimal expansion of a number chosen on the unit interval in accordance with a uniform probability law.

(iv) The absolute value of a number chosen on the real line in accordance with a normal probability law.

(v) The number of urns that contain balls bearing the same number, when 52 balls, numbered 1 to 52, are distributed, one to an urn, among 52 urns, numbered 1 to 52.

(vi) The distance from the origin of a 2-tuple \(\left(x_{1}, x_{2}\right)\) in the plane chosen in accordance with a known probability law, specified by the probability density function \(f\left(x_{1}, x_{2}\right)\) .