0% found this document useful (0 votes)
16 views7 pages

Random Variables

Chapter 5 introduces random variables within the context of probability spaces, defining them as real-valued functions that map outcomes to numerical values. It emphasizes that a function is a random variable if the pre-image of any Borel set is an event in the probability space's σ-algebra. The chapter also provides examples and theorems to illustrate the properties and conditions necessary for a function to be considered a random variable.

Uploaded by

Talha Farooq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views7 pages

Random Variables

Chapter 5 introduces random variables within the context of probability spaces, defining them as real-valued functions that map outcomes to numerical values. It emphasizes that a function is a random variable if the pre-image of any Borel set is an event in the probability space's σ-algebra. The chapter also provides examples and theorems to illustrate the properties and conditions necessary for a function to be considered a random variable.

Uploaded by

Talha Farooq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Chapter 5

Random Variables

Consider a chance experiment. We have defined a probability space (⌦, F, P) consisting of a


sample space ⌦ of outcomes, a -algebra F of events, and an assignment P of probabilities
to events as a model for the experiment. It is often the case that one is not interested in a
particular outcome per se, but rather in a function of the outcome. This is readily apparent
if we consider a bet on a game of chance at a casino.

5.1 Introduction to random variables


Example 5.1.1. Suppose that a gambler pays $3 to roll a fair die and then wins $j where
j is the side that appears, j 2 {1, . . . , 6}. Hence, the gambler’s net income is either $2,
$1, $0, $1, $2, or $3 depending on whether a 1, 2, 3, 4, 5, or 6 appears.
Formally we can construct a probability model for this chance experiment as follows. Let
⌦ = {1, 2, 3, 4, 5, 6} denote the sample space, let F = 2⌦ denote the corresponding -algebra,
and set P ({!}) = 1/6 for ! 2 ⌦.
If we now let X denote the gambler’s net income, then it is clear that X is the real-valued
function on ⌦ given by

X(1) = 2, X(2) = 1, X(3) = 0, X(4) = 1, X(5) = 2, X(6) = 3.

More succinctly, we might write X : ⌦ ! R defined by X(!) = ! 3 for ! 2 ⌦. The


function X is an example of a random variable.

This leads to the general notion of a random variable as a real-valued function on ⌦. As


we will see in a later lecture, the sort of trouble that we had with constructing the uniform
probability on the uncountable sample space (0, 1] is the same sort of trouble that will
prevent any real-valued function on ⌦ from being a random variable. It will turn out that
only a special type of function, known as a measurable function, will be a random variable.
Fortunately, every reasonable function (including those that one is likely to encounter when
applying probability theory to everyday chance experiments such as casino games) will be
measurable. For a function not to be measurable, it will need to be really weird.

63
Example 5.1.2. In calculus, we consider real-valued functions on R such as the following.
Let f : R ! R be given by f (x) = x2 . In probability, we study real-valued functions on a
sample space ⌦. For example, let X : ⌦ ! R be given by X(!) = ! 2 .
When studying calculus, we seek to understand deterministic functions such as f (x) = x2
through their analytic properties. Is the function continuous? Is the function di↵erentiable?
Is the function integrable? What is the graph of the function?
When studying probability, in the presence of randomness, we seek to understand random
variables X through probabilistic statements about how likely particular values of the random
variable are. In particular, as in our elementary probability classes, we will learn to analyze
random variables via their distribution functions and expectations.

Suppose that (⌦, F, P) is a probability space. We begin by recalling the definition of the
pre-image (or inverse image) of a set. If B ✓ ⌦, then
1
X (B) = {! 2 ⌦ : X(!) 2 B}.

Example 5.1.3. Suppose that f : R ! R is given by f (x) = x2 . If B = [1/9, 1/4], then

f 1
(B) = f 1
([1/9, 1/4]) = {x 2 R : x2 2 [1/9, 1/4]} = {x 2 R : 1/9  x2  1/4}
= [ 1/2, 1/3] [ [1/3, 1/2].

Suppose that ⌦ = (0, 1], F = B0 , and P is uniform probability on (0, 1]. Let X : ⌦ ! R be
given by X(!) = ! 2 . If B = [1/9, 1/4], then
1 1
X (B) = X ([1/9, 1/4]) = {! 2 ⌦ : ! 2 2 [1/9, 1/4]} = {! 2 ⌦ : 1/9  ! 2  1/4} = [1/3, 1/2].

Example 5.1.1 (continued). Recall that in our die rolling example, we defined X : ⌦ ! R
by X(!) = ! 3. If B = [2, 9], then
1 1
X (B) = X ([2, 9]) = {! 2 ⌦ : X(!) 2 [2, 9]} = {! 2 ⌦ : 2  X(!)  9}.

The possible values of X(!) are { 2, 1, 0, 1, 2, 3}. Therefore, in order for 2  X(!)  9
we must necessarily have X(!) = 2 or X(!) = 3. The corresponding values of ! are ! = 5
or ! = 6. Thus, we conclude
X 1 ([2, 9]) = {5, 6}.
Similarly, if B = [0, 1), then
1 1
X (B) = X ([0, 1)) = {! 2 ⌦ : X(!) 2 [0, 1)} = {! 2 ⌦ : X(!) 0} = {3, 4, 5, 6}.

If B = [4, 9] ,then
1 1
X (B) = X ([4, 9]) = {! 2 ⌦ : X(!) 2 [4, 9]} = {! 2 ⌦ : 4  X(!)  9} = ;

since no values of X(!) are between 4 and 9. Finally, if B = R ,then

X 1
(B) = X 1
(R) = {! 2 ⌦ : X(!) 2 R} = {1, 2, 3, 4, 5, 6} = ⌦.

64
Now suppose that we wish to compute probabilities associated with various outcomes of the
random variables. For example, what is P (2  X  9)? We find
2
P (2  X  9) = P ({! 2 ⌦ : X(!) 2 [2, 9]}) = P ({5, 6}) = .
3
In order to compute P (2  X  9) we first needed to find the associated values of ! 2 ⌦
for which X(!) 2 [4, 9]. That is, we found X 1 [4, 9] = {5, 6}. The next thing we did was
compute the probability of the event {5, 6}. And here is the key. In order to compute
this probability it was imperative that {5, 6} was, in fact, an event. That is, we required
X 1 [4, 9] = {5, 6} 2 F. This leads to the definition of random variable.

5.2 Definition of a random variable


Definition 5.2.1. Suppose that (⌦, F, P) is a probability space. A real-valued function
X : ⌦ ! R is said to be a random variable if X 1 (B) = {! 2 ⌦ : X(!) 2 B} 2 F for every
Borel set B 2 B.

Note that when we say let X be a random variable, we really mean let X be a function from
the probability space (⌦, F, P) to the real numbers endowed with the Borel -algebra (R, B)
such that X 1 (B) 2 F for every B 2 B. Hence, when we define a random variable, we
should really also state the underlying probability space as the domain space of X. Since
every random variable we will consider is real-valued, our codomain (or target) space will
always be R endowed with the Borel -algebra B. If we want to stress the domain space and
codomain space, we will be explicit and write X : (⌦, F, P) ! (R, B).
1
In other words, the function X : (⌦, F, P) ! (R, B) is a random variable if X (B) 2 F for
every B 2 B.
Example 5.2.2. Perhaps the simplest example of a random variable is the indicator function
of an event. Let (⌦, F, P) be a probability space and suppose that A 2 F is an event. Let
X : ⌦ ! R be given by (
1, if ! 2 A,
X(!) = 1A (!) =
0, if ! 2
/ A.
For B 2 B, we find 8
>
> ;, if 0 62 B, 1 62 B,
>
<A, if 0 62 B, 1 2 B,
(1A ) 1 (B) =
>
> Ac , if 0 2 B, 1 62 B,
>
:
⌦, if 0 2 B, 1 2 B.
Thus, since ;, A, Ac , and ⌦ belong to F, we see that for any B 2 B we necessarily have
X 1 (B) = (1A ) 1 (B) 2 F proving that X is a random variable.
Example 5.2.3. In fact, the last example suggests how we might construct a function that
is not a random variable. Suppose that (⌦, F, P) is a probability space and let H 62 F so

65
that H is not an event. We saw an example of such a set H when we tried to consider the
uniform probability on ((0, 1], 2(0,1] ). Define the function X : ⌦ ! R by setting
(
1, if ! 2 H,
X(!) = 1H (!) =
0, if ! 62 H.

To prove that the function X is not a random variable, we must show that there exists a
Borel set B 2 B for which X 1 (B) 62 F. Let B = {1} which is clearly a closed set and
therefore Borel. We find
1
X ({1}) = {! : X(!) = 1} = {! : ! 2 H} = H.
1
However, by assumption, H 62 F so that X ({1}) 62 F. Thus, X is not a random variable.

In fact, the previous two examples combined yield the following simple theorem.

Theorem 5.2.4. Suppose that (⌦, F, P) is a probability space and A ✓ ⌦. The function
1A : ⌦ ! R given by (
1, if ! 2 A,
1A (!) =
0, if ! 62 A,
is a random variable if and only if A 2 F.

Example 5.1.1 (continued). Recall that in our die rolling example, we defined X : ⌦ ! R
by X(!) = ! 3. For every B 2 B, observe that X 1 (B) ✓ ⌦. In other words, for every
B 2 B, we have X 1 (B) 2 2⌦ = F proving that X is, in fact, a random variable.
More generally, we have the following.

Example 5.2.5. Suppose that the sample space ⌦ is either finite or countable, and consider
the probability space (⌦, 2⌦ , P). Since any function X : ⌦ ! R satisfies X 1 (B) ✓ ⌦ for
any B 2 B, we have X 1 (B) 2 2⌦ for every B 2 B. Thus, every real-valued function on a
finite or countable space is a random variable.

Before giving some further examples of random variables, we need the results of the following
exercises.

Exercise 5.2.6. Suppose that X : ⌦ ! R is any function (not necessarily a random


variable). Show that

(a) if B ✓ R, then [X 1
(B)]c = X 1
(B c ),

(b) if B1 , B2 , . . . ✓ R, then !
1
[ 1
[
1 1
X Bj = X (Bj ),
j=1 j=1

and

66
(c) if B1 , B2 , . . . ✓ R, then !
1
\ 1
\
1 1
X Bj = X (Bj ).
j=1 j=1

In particular, it follows from (iii) that if B1 , B2 , . . . ✓ R are disjoint, then X 1


(B1 ), X 1
(B2 ), . . .
are disjoint.

Exercise 5.2.7. Suppose that (⌦, F, P) is a probability space, and let X : ⌦ ! R be any
function (not necessarily a random variable). Show that if C is the collection of all subsets
B ✓ R such that X 1 (B) 2 F, then C is a -algebra of subsets of R.

We know from Corollary 3.4 that the Borel -algebra B is generated by intervals of the form
( 1, x] with x 2 R. Thus, the following theorem should come as no surprise.

Theorem 5.2.8. Let (⌦, F, P) be a probability space. The function X : (⌦, F, P) ! (R, B)
is a random variable if and only if {! 2 ⌦ : X(!)  x} 2 F for every x 2 R.

Proof. Notice that {! 2 ⌦ : X(!)  x} = X 1 (( 1, x]). Since ( 1, x] is a Borel set for


every x 2 R, we conclude that if X is a random variable, then X 1 (( 1, x]) 2 F. This
proves the only if part. In order to prove the if part, suppose that {! 2 ⌦ : X(!)  x} 2 F
for every x 2 R. Consider the collection C of all subsets B ✓ R for which X 1 (B) 2 F. By
assumption, C contains all intervals of the form ( 1, x] with x 2 R. Since Corollary 3.4
implies that these intervals generate B, we conclude B ✓ (C). It follows from Exercise 5.2.7
that C is itself a -algebra so that (C) = C. This implies that B ✓ C. Therefore, suppose
that B 2 B. Since B ✓ C, we know that B 2 C and so, by definition of C, we must have that
X 1 (B) 2 F. This proves the if part and completes the proof.

In fact, since the Borel sets are also generated by the collection of all open subsets of R, we
have the following theorem whose proof is virtually identical to the previous one.

Theorem 5.2.9. Let (⌦, F, P) be a probability space, and let O denote the collection of all
open subsets of R. The function X : (⌦, F, P) ! (R, B) is a random variable if and only if
X 1 (E) 2 F for every open set E 2 O.

Exercise 5.2.10. Prove Theorem 5.2.9.

The next theorem gives a number of examples of random variables.

Theorem 5.2.11. Let (⌦, F, P) be a probability space, and suppose that X : ⌦ ! R and
Xn : ⌦ ! R, n = 1, 2, . . ., are functions.

(i) If Xn , n = 1, 2, . . ., are each random variables, then

sup Xn , inf Xn , lim sup Xn , lim inf Xn


n n n!1 n!1

are also random variables.

67
(ii) If Xn , n = 1, 2, . . ., are each random variables and Xn ! X pointwise, then X is a
random variable.

Proof. (i) Since Xn is a random variable, we know from Theorem 5.2.9 that {Xn  a} =
{Xn (!) 2 ( 1, a]} 2 F for each n and each a 2 Q. By definition,
⇢ \ n o [
sup Xn  a = {Xn  a} and inf Xn < a = {Xn < a}.
n n
n n

The first of these sets belongs to F by Theorem 5.2.8 while the second of these sets belongs
to F by Theorem 5.2.9; hence, both are random variables. Since

lim sup Xn = inf sup Xm ,


n!1 n m n

if we define
Yn = sup Xm ,
m n

then Yn is a random variable so that


inf Yn
n

is also a random variable. The proof that

lim inf Xn = sup inf Xm


n!1 n m n

is a random variable is similar.

(ii) If Xn ! X pointwise, then

X = lim Xn = lim inf Xn = lim sup Xn


n!1 n!1 n!1

is a random variable by (i).


Exercise 5.2.12. Suppose that the function f : R ! R has the property that f 1 (B) 2 B
for every Borel set B 2 B. Such a function is called a (Borel) measurable function. Show that
if X : (⌦, F, P) ! (R, B) is a random variable, then the function Y = f X : (⌦, F, P) !
(R, B) defined by Y (!) = f (X(!)) is a random variable.

Suppose that X : (⌦, F, P) ! (R, B) is a random variable. We are about to define the law
or distribution of X which is of fundamental importance since the distribution of X is a
probability on (R, B).
Definition 5.2.13. Let X : (⌦, F, P) ! (R, B) be a random variable. The law of X (also
called the distribution of X) is the set function PX : B ! [0, 1] given by

PX (B) = P (! : X(!) 2 B) = P (X 2 B) = P X 1
(B)

for every B 2 B. Note that we sometimes use the notation PX = P X 1


.

68
Before we prove that the law PX of a random variable is actually a probability on (R, B),
we pause to mention that the definition of the law of a random variable is what motivates
the definition of random variable itself. If we want to be able to compute
1
P (! : X(!) 2 B) = P (X 2 B) = P X (B)
1
for every Borel set B, then it must be the case that X (B) is an event (which is to say that
X 1 (B) 2 F for every B 2 B).

Theorem 5.2.14. The law of a random variable X : (⌦, F, P) ! (R, B) is a probability


on (R, B). That is, if X : (⌦, F, P) ! (R, B) is a random variable, then (R, B, PX ) is a
probability space.

Proof. In order to prove this result, we must verify the conditions of probability are met.
We begin by noting that B is, by definition, a -algebra on R. Since R 2 B, we have

PX (R) = P (! : X(!) 2 R) = P (⌦) = 1

using the fact that ⌦ 2 F and P is a probability on (⌦, F). Suppose that B1 , B2 , . . . 2 B is
a sequence of pairwise, disjoint sets. Therefore,
1
! 1
! 1
! 1
!
[ [ [ [
PX Bi = P ! : X(!) 2 Bi = P ! : ! 2 X 1 (Bi ) = P ! : ! 2 Ai
i=1 i=1 i=1 i=1

where Ai = X 1 (Bi ). Note that the second equality follows from Exercise 5.2.6. Since X
is a random variable, we know that Ai 2 F for each i 2 N. Moreover, Exercise 5.2.6 also
implies that A1 , A2 , . . . are pairwise disjoint. Thus, using the fact that A1 , A2 , . . . 2 F are
pairwise disjoint and P is a probability on (⌦, F) gives
1
! 1
! 1 1 1
[ [ X X X
X 1
P Bi = P Ai = P (Ai ) = P X (Bi ) = PX (Bi )
i=1 i=1 i=1 i=1 i=1

as required.

69

You might also like