We now treat the example considered in the foregoing section in terms of random variables. We shall see that the notion of a random variable does not replace the idea of a numerical valued random phenomenon but rather extends it.

We let \(X_{1}\) and \(X_{2}\) denote, respectively, the departure time of the train and the arrival time of the commuter at the station. In order, with complete rigor, to regard \(X_{1}\) and \(X_{2}\) as random variables, we must state the probability space on which they are defined as functions. Let us first consider \(X_{1}\) . We may define \(X_{1}\) as the identity function (so that \(X_{1}\left(x_{1}\right)=x_{1}\) , for all \(x_{1}\) in \(R_{1}\) ) on a real line \(R_{1}\) , on which a probability distribution (that is, a distribution of probability mass) has been placed in accordance with the probability density function \(f_{1}(\cdot)\) given by (3.1) . Or we may define \(X_{1}\) as a function on a space \(S\) of 2-tuples \(\left(x_{1}, x_{2}\right)\) of real numbers, on which a probability distribution has been placed in accordance with the probability density function \(f(.,.)\) given by (3.12) ; in this case we define \(X_{1}(s)=\) \(X_{1}\left(\left(x_{1}, x_{2}\right)\right)=x_{1}\) . Similarly, we may regard \(X_{2}\) as either the identity function on a real line \(R_{2}\) , on which a probability distribution has been placed in accordance with the probability density function \(f_{2}(\cdot)\) given by (3.2) , or as the function with values \(X_{2}\left(\left(x_{1}, x_{2}\right)\right)=x_{2}\) , defined on the probability space \(S\) . In order to consider \(X_{1}\) and \(X_{2}\) in the same context, they must be defined on the same probability space. Consequently, we regard \(X_{1}\) and \(X_{2}\) as being defined on \(S\) .

It should be noted that no matter how \(X_{1}\) and \(X_{2}\) are defined as functions the individual probability laws of \(X_{1}\) and \(X_{2}\) are specified by the probability density functions \(f_{X_{1}}(\cdot)\) and \(f_{X_{2}}(\cdot)\) , with values at any real number \(x\) ,

\begin{align} f_{X_{1}}(x) = f_{X_{2}}(x) = \begin{cases} \frac{2}{25}(5 - x), & \text{for } 0 \leq x \leq 5 \\ 0, & \text{otherwise.} \end{cases} \end{align} 

Consequently, the random variables \(X_{1}\) and \(X_{2}\) are identically distributed.

We now turn our attention to the problem of computing the probability that the man will catch the train. In the previous section we reduced this problem to one involving the computation of the probability of a certain event (set) on a probability space. In this section we reduce the problem to one involving the computation of the distribution function of a random variable; by so doing, we not only solve the problem given but also a number of related problems.

Let \(Y=X_{1}-X_{2}\) denote the difference between the train’s departure time \(X_{1}\) and the man’s arrival time \(X_{2}\) . It is clear that the man catches the train if and only if \(Y>0\) . Therefore, the probability that the man will catch the train is equal to \(P[Y>0]\) . In order for \(P[Y>0]\) to be a meaningful expression, it is necessary that \(Y\) be a random variable, which is to say that \(Y\) is a function on some probability space. This will be the case if and only if the random variables \(X_{1}\) and \(X_{2}\) are defined as functions on the same probability space. Consequently, we must regard \(X_{1}\) and \(X_{2}\) as functions on the probability space \(S\) , defined in the second paragraph of this section. Then \(Y\) is a function on the probability space \(S\) , and \(P[Y>0]\) is meaningful. Indeed, we may compute the distribution function \(F_{Y}(\cdot)\) of \(Y\) , defined for any real number \(y\) by

\[F_{Y}(y)=P[Y \leq y]=P[\{s: \ Y(s) \leq y\}] . \tag{4.2}\] 

Then \(P[Y>0]=1-F_{\mathrm{Y}}(0)\) .

To compute the distribution function \(F_{Y}(\cdot)\) of \(Y\) , there are two methods available. In one method we use the fact that we know the probability space \(S\) on which \(Y\) is defined as a function and use (4.2) . A second method is to use only the fact that \(Y\) is defined as a function of the random variables \(X_{1}\) and \(X_{2}\) . The second method requires the introduction of the notion of the joint probability law of the random variables \(X_{1}\) and \(X_{2}\) and is discussed in the next section. We conclude this section by obtaining \(F_{Y}(\cdot)\) by means of the first method.

As a function on the probability space \(S, Y\) is given, at each 2-tuple \(\left(x_{1}, x_{2}\right)\) , by \(Y\left(\left(x_{1}, x_{2}\right)\right)=x_{1}-x_{2}\) . Consequently, by (4.2) , for any real number \(y\) ,

\begin{align} F_{Y}(y) & =P\left[\left\{\left(x_{1}, x_{2}\right): \quad x_{1}-x_{2} \leq y\right\}\right] \tag{4.3} \\ & =\iint\limits_{\left\{\left(x_{1}, x_{2}\right): x_{1}-x_{2} \leq y\right\}} f\left(x_{1}, x_{2}\right) d x_{1} d x_{2} \\ & =\int_{-\infty}^{\infty} d x_{1} \int_{x_{1}-y}^{\infty} d x_{2} f\left(x_{1}, x_{2}\right). \end{align} 

From (4.3) we obtain an expression for the probability density function \(f_{Y}(\cdot)\) of the random variable \(Y\) . In the second integration in (4.3), make the change of variable \(x_{2}^{\prime}=-x_{2}+x_{1}\) . Then

\[F_{Y}(y)=\int_{-\infty}^{\infty} d x_{1} \int_{-\infty}^{y} d x_{2}^{\prime} f\left(x_{1}, x_{1}-x_{2}^{\prime}\right)\] 

By interchanging the order of integration, we have

\[F_{Y}(y)=\int_{-\infty}^{y} d x_{2}^{\prime} \int_{-\infty}^{\infty} d x_{1} f\left(x_{1}, x_{1}-x_{2}^{\prime}\right). \tag{4.4}\] 

By differentiating the expression in (4.4) with respect to \(y\) , we obtain the integrand of the integration with respect to \(x_{2}^{\prime}\) , with \(x_{2}^{\prime}\) replaced by \(y\) ; thus

\[f_{Y}(y)=\frac{d}{d y} F_{Y}(y)=\int_{-\infty}^{\infty} d x_{1} f\left(x_{1}, x_{1}-y\right). \tag{4.5}\] 

Equation (4.5) constitutes a general expression for the probability density function of the random variable \(Y\) defined on a space \(S\) of 2-tuples \(\left(x_{1}, x_{2}\right)\) by \(Y\left(\left(x_{1}, x_{2}\right)\right)=x_{1}-x_{2}\) , where a probability function has been specified on \(S\) by the probability density function \(f(.,.)\) .

To illustrate the use of (4.5), let us consider again the probability density functions introduced in connection with the problem of the commuter catching the train. The probability density function \(f(.,.)\) is given by (3.12) in terms of the functions \(f_{1}(\cdot)\) and \(f_{2}(\cdot)\) , given by (3.1) and (3.2), respectively.

In the case of independent phenomena, (4.5) becomes \[f_{Y}(y)=\int_{-\infty}^{\infty} dx\, f_{1}(x) f_{2}(x-y)=\int_{-\infty}^{\infty} dx\, f_{1}(x+y) f_{2}(x). \tag{4.6}\] 

If further, as is the case here, the two random phenomena [with respective probability density functions \(f_{1}(\cdot)\) and \(f_{2}(\cdot)\) ] are identically distributed, so that, for all real numbers \(x, f_{1}(x)=f_{2}(x)=f(x)\) , for some function \(f(\cdot)\) , then the probability density function \(f_{Y}(\cdot)\) is an even function; that is, \(f_{Y}(-y)=f_{Y}(y)\) for all \(y\) . It then suffices to evaluate \(f_{Y}(y)\) for \(y \geq 0\) . One obtains, by using (3.1), (3.2), and (4.6), \begin{align} f_{Y}(y) & =\int_{0}^{5} d x \frac{2}{25}(5-x) f(x+y) \tag{4.7}\\ & =\int_{0}^{5-y} d x\left(\frac{2}{25}\right)^{2}(5-x)(5-(x+y)) \quad \text { if } 0 \leq y \leq 5 \\ & =0 \quad \text { if } y \geq 5. \end{align} Therefore, \begin{align} f_{Y}(y) & = \begin{cases} \dfrac{4|y|^{3} - 300|y| + 1000}{6(5)^{4}}, & \text{if } |y| \leq 5 \tag{4.8} \\[2mm] 0, & \text{otherwise}. \end{cases} \end{align} Consequently \[P[Y>0]=\int_{0}^{\infty} f_{Y}(y) d y=\frac{1}{2}.\] 

Exercises

4.1 . Consider the random variable \(Y\) defined in the text. Find the probability density function of \(Y\) under the assumptions made in exercise 3.1 .

4.2 . Consider the random variable \(Y\) defined in the text. Find its probability density function under the assumptions made in exercise 3.2 .