132 PROBABILITY [CHAP. 7
7.7Random Variables
LetSbe a sample of an experiment. As noted previously, the outcome of the experiment, or the points in
S, need not be numbers. For example, in tossing a coin the outcomes areH(heads) orT(tails), and in tossing
a pair of dice the outcomes are pairs of integers. However, we frequently wish to assign a specific number to
each outcome of the experiment. For example, in coin tossing, it may be convenient to assign 1 toHand 0
toT; or, in the tossing of a pair of dice, we may want to assign the sum of the two integers to the outcome.
Such an assignment of numerical values is called arandom variable. More generally, we have the following
definition.
Definition 7.4: Arandom variable Xis a rule that assigns a numerical value to each outcome in a sample spaceS.
We shall letRXdenote the set of numbers assigned by a random variableX, and we shall refer toRXas the
range space.
Remark: In more formal terminology,Xis a function fromSto the real numbersR, andRXis the range ofX.
Also, for some infinite sample spacesS, not all functions fromStoRare considered to be random variables.
However, the sample spaces here are finite, and every real-valued function defined on a finite sample space is
a random variable.
EXAMPLE 7.13 Apair of fair dice is tossed. (See Example 7.2.) The sample spaceSconsists of the 36 ordered
pairs(a, b)whereaandbcan be any of the integers from 1 to 6.
LetXassign to each point inSthe sum of the numbers; thenXis a random variable with range space
RX={ 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 }
LetYassign to each point the maximum of the two numbers; thenYis a random variable with range space
RY={ 1 , 2 , 3 , 4 , 5 , 6 }
Sums and Products of Random Variables, Notation
SupposeXandYare random variables on the same sample spaceS. ThenX+Y,kXandXYare functions
onSdefined as follows (wheres∈S):
(X+Y )(s)=X(s)+Y (s), (kX)(s)=kX(s), (XY )(s)=X(s)Y(s)
More generally, for any polynomial or exponential functionh(x,y,...,z), we defineh(X,Y,...,Z)to be the
function onSdefined by
[h(X,Y,...,Z)](s)=h[X(s),Y(s),...,Z(s)]
It can be shown that these are also random variables. (This is trivial in the case that every subset ofSis an event.)
The short notationP(X=a)andP(a≤X≤b)will be used, respectively, for the probability that “Xmaps
intoa” and “Xmaps into the interval [a, b].” That is, fors∈S:
P(X=a)≡P({s|X(s)=a}) and P(a≤X≤b)≡P({s|a≤X(s)≤b})
Analogous meanings are given toP(X≤a),P(X=a, Y=b),P(a≤X≤b, c≤Y≤d), and so on.
Probability Distribution of a Random Variable
LetXbe a random variable on a finite sample spaceSwith range spaceRx={x 1 ,x 2 ,...,xt}. ThenX
induces a functionfwhich assigns probabilitiespkto the pointsxkinRxas follows:
f(xk)=pk=P(X=xk)=sum of probabilities of points inSwhose image isxk.