Learning random variables as a high-schooler is quite easy,
even in my first course of Probability theory, a
random variable X was just a map from Ξ©βR.
Everything was nice and easy until the time X was taking
countably many values, but then there was a need of
Οβalgebras. There was no looking back; we had reached
a point where everything required a proof. So today, Iβll
save everyone from the seemingly unexpected terror of
random variables.
Just to be more precise going forward, we are going
to prove measurability of events(subsets of Ξ©) and
functions from Ξ©βR where R is the
set of extended reals.
Why the Jargon?
This deserves a blog post on its own, but my professor at
ISI Kolkata(Dr. Arnab Chakraborty) who taught us
Probability I did a wonderful job giving us the idea as to
why you need to consider the Οβalgebras. I donβt think
I have much to add to that explanation, so I would
recommend everyone to read our class webpage where he has discussed
the case when Ξ© is uncountable and the construction
by Vitali.
Prerequisites
- Definition of a Measure and Measurable Space
- Sigma Algebras
- Construction of Vitaliβs set(mostly to get a feel for the need of sigma algebras)
The Updated Definitions
Anyone learning axiomatic probability-theory, first learns
about the probability space only being about the
sample space Ξ© and the probability function
P:P(Ξ©)β[0,1]. But the moment you
tackle uncountable probability spaces, then one must resort
to the use of the sigma-field F, to filter out
the βgood setsβ and work with them.
A probability space refers to the tuple
(Ξ©,F,P) where Ξ© is some
set(sample space), F is some Οβalgebra
over Ξ© and P is a function from
FβR satisfying
-
P(A)β₯0 for all AβF;
-
P(Ξ©)=1;
-
If {Akβ}k=1ββ is a sequence of pairwise disjoint sets where AkββF for kβ₯1, then
k=1βββP(Akβ)=P(k=1βββAkβ).
With the above new definition of the probability space, what
could possibly go wrong with random variables? Well, what
if you want to compute P(XβB) where
BβR? Recall that
[XβB]:={ΟβΞ©:X(Ο)βB}.
If we really want to compute the probability of
this event, then we need to make sure that this event
[XβB](we will also denote this by Xβ1(B)) lies
in F. If you saw the construction by Vitalli
from the web-page which I shared above, then you basically
saw that you cannot really assign a uniform
probability over [0,1]. Thus, rather than computing the
probability of events [XβB] where BβR,
we restrict B to lie in B(R). We are now
ready to define the notion of an ordinary random variable
over the measurable space (Ξ©,F).
X is said to be a random variable defined on a measurable
space (Ξ©,F) if X is a function
from Ξ©βR such that
Xβ1(B)βFforΒ allΒ BβB(R).where Xβ1(B)={ΟβΞ©:X(Ο)βB}
and B(R) denotes the Borel Οβalgebra
over R.
We have only defined an ordinary random variable where
X canβt take values like Β±β. Often times, in
cases of markov chains and other stochastic processes,
we sometimes denote the return time of a particle by a
random variable X. If the particle never returns then we
set X(Ο)=β in that case, so we will now
define what is an extended random variable. From here,
we shall now denote
R=Rβͺ{Β±β}.
X is said to be an extended random variable defined on a
measurable space (Ξ©,F) if X is a
function from Ξ©βR such that
Xβ1(B)βFforΒ allΒ BβB(R).
Its a perfectly valid question to ask how does the
borel sigma field over R looks like⦠For
some beginners, they might be unfamiliar with the notion
of borel-sigma algebra. Letβs talk about it briefly
before moving onto the actual results to be proven for
random variables.
Borel Sigma Algebras
Due to the construction by Vitalli, we know that not all
subsets of R can be assigned a probability with the
function P. Thus we resort to what we call the
Borel Οβalgebra over R. Consider the usual metric
topology1 on R where we let Ο denote the set of all
open sets2 of R. Then we define
B(R):=Ο(Ο)
where Ο(Ο) means the smallest Οβalgebra
containing all the elements of Ο. Although, dealing
with all open intervals is quite cumbersome when you have
to prove results. Luckily, R is quite forgiving and we
have a wonderful result, which is good enough that
we state it as a theorem.
Any open set UβR can be written as a disjoint
countable union of open intervals.
See on stackexchange. If the notation feels too weird, ask ChatGPT to simplify
the proof for you. β‘
With this, we have the luxury to define the borel-sigma
algebra way more freely. We will now state a really
really important lemma. If you really want to prove this
by yourself, then you can find an important lemma
here in the appendix.
On R, the Οβfield generated by
- Open Intervals
- Open Sets
- Closed Intervals
- Closed Sets
- Intervals of form (a,b] where a,bβR
- Intervals of form (ββ,a] where aβR.
- Intervals of form (ββ,a) where aβR.
- Intervals of form [a,β) where aβR.
- Intervals of form (a,β) where aβR.
all generate B(R). By generate, we mean
for example, look at 4th point, the smallest sigma algebra
containing all closed intervals is B(R).
Outline of Proof: This one requires some practice with
sigma-algebras, which is not what we are doing in this
blog. Note that 2nd point is true is by definition. By
the theorem stated above, 1st point becomes true as well.
For the other points, you need to take some countable union
of open sets to generate an arbitrary closed interval.
For example, if you want to make the closed interval
[a,b] from open sets, then consider
n=1βββ(aβn1β,b+n1β)=[a,b].
So, you can construct any closed interval from an open
intervals. The other parts can be done similarly. β‘
If we want to talk about B(R), then we
need to characterize the open sets of R, which
is more or less a question of topology. If someone is
interested in characterizing the open sets of R,
then you can refer the appendix one possible approach.
For this blog post, we will work a simpler definition of
B(R), which is the following.
Define
C:={[ββ,x]:xβR}where [ββ,x]:=(ββ,x]βͺ{ββ},
then
B(R)=Ο(C).
Even with all this, I will give an alternate definition
to the borel sigma algebra over R in the appendix
over extended reals. Anyways, we are now ready to head to
the more important results for random variables.
Important Results
We will start by proving the following theorem.
Let {Xnβ}nβ₯1β be a sequence of ordinary real-valued
random variables. Show that
-
For aβR, aX1β is a random variable;
-
β£X1ββ£ is also a random variable;
-
By giving a suitable example, prove that if β£X1ββ£ is
a random variable, then X1β is not necessarily a random
variable;
-
max(X1β,X2β), min(X1β,X2β), X1β+X2β are all
random variables;
-
supXnβ and infXnβ are extended
real value random variables;
-
nββlimsupβXnβ and
nββliminfβXnβ are extended real
value random variables;
-
For AβF, X1β1Aβ+X2β1Acβ
is a random variable.
Before starting the proof, we recall the collection
B={(ββ,x]:xβR} generates the entire
B(R) thus B(R)=Ο(B).
Thus to show that any map f:Ξ©βR is a
random variable, itβs enough to show that
fβ1((ββ,x])βF. If you
want a rigorous proof as to why only checking it for
generators suffices, then you will find it in the
appendix.
Proof to part 1: We shall first show that aX1β is a
random variable. If a=0, then
(aX1β)β1(ββ,x]={Ο:0=aX1β(Ο)β€x}
If x<0, then then (aX1β)β1 is precisely
β
βF. If x>0, then (aX1β)β1
is precisely Ξ©βF. This shows
that aX1β1β(ββ,x]βF for all
xβR. This case is done.
For the next case, assume a>0. Once again, consider
(aX1β)β1(ββ,x] which is precisely
(aX1β)β1(ββ,x]={ΟβΞ©:aX1β(Ο)β€x}={ΟβΞ©:X1β(Ο)β€x/a}=X1β1β(ββ,x/a]
Since X1β is a random variable,
X1β1β(ββ,x]βF completing the proof
for this case as well.
The last case is slightly tricky. This time dividing by a
would change the sign of equality. So, we will work
with another class of generators, that is
{[x,β):xβR}. Consider
(aX)β1[x,β)={Ο:aX(Ο)β₯x}={Ο:X(Ο)β€x/a}βF
since X is a random variable and
B={(ββ,x]:xβR} is also a generator.
The proof is now complete. β‘
Proof to part 2: We will stick with class of generators
B={(ββ,x]:xβR}. Consider
β£X1ββ£β1(ββ,x]={ΟβΞ©:β£X1β(Ο)β£β€x}
If x<0, then β£X1ββ£β1=β
βF.
If xβ₯0, then
β£X1ββ£β1(ββ,x]={ΟβΞ©:βxβ€X1β(Ο)β€x}={ΟβΞ©:X1β(Ο)β[βx,x]}.
Even in this case, if you consider the class of generators
only consisting of closed sets, then one would realize
β£X1ββ£β1βF in this case as well. The proof
is complete now. β‘
Counter Example to part 3: Consider Ξ©={0,1}
and F={{β
},Ξ©}
and consider a map Y:Ξ©βR such that
Y(0)=1 and Y(1)=β1. In this case, β£Yβ£ is indeed
a random variable, but Y is not. To see this, note that
{1}βB(R) and Yβ1({1})={0}ξ βF.
Proof to part 4: We will first prove min(X1β,X2β)
is a random variable. Consider
(min(X1β,X2β))β1(ββ,x]={ΟβΞ©:min(X1β(Ο),X2β(Ο))β€x}.
But for any two reals a,b, min(a,b)β€xβΊaβ€x
or bβ€x. This gives
(min(X1β,X2β))β1(ββ,x]={ΟβΞ©:X1β(Ο)β€x}βͺ{ΟβΞ©:X2β(Οβ€x)}
Since X1β,X2β are random variables, both the events in
the union above lie in F, thus their
intersection would lie there as well. We omit the prove
for max(X1β,X2β), but the idea to prove that is very
very similar.
Let Y=X1β+X2β. We shall now prove that Y is a
random variable. This one truly tricky and uses a typical
analysis trick which exploits that R is separable3.
For this proof, we will use a different class of generators,
namely {(x,β):xβR}. Now, consider
Yβ1(x,β)={Ο:X1β(Ο)+X2β(Ο)>x}.
Since Q is countable, let {qiβ}i=1ββ be
an enumeration of Q. We have the following claim.
Yβ1(x,β)=i=1βββ{Ο:X1β(Ο)>qiβ}β©{Ο:X2β(Ο)>xβqiβ}.
The proof to the claim is extremely simple. If
ΟβYβ1(x,β), then we know
X1β(Ο)>xβX2β(Ο)
Since these two quantities are different, by density of
Q over R, we know there must exist some index j
such that
X1β(Ο)>qjβ>xβX2β(Ο)
which immediately gives Οββi=1ββ{Ο:X1β(Ο)>qiβ}β©{Ο:X2β(Ο)>xβqiβ}. The other direction is rather trivial, so we shall
skip it.
We can now finish the proof, since X1β and X2β are
random variables and {(x,β):xβR} is
a class of generators, we get that both events
{Ο:X1β(Ο)>qiβ} and {Ο:X2β(Ο)>xβqiβ} both lie in F for all iβN.
The intersection would lie in F and so would a
countable intersection! The proof is now complete. β‘
Proof to part 5: Define Y:Ξ©βR
such that Y(Ο)=supnβXnβ(Ο). We shall
use the generator of R, which is the collection
{[ββ,x]:xβR}. Thus, consider
Yβ1[ββ,x]={Ο:nsupβXnβ(Ο)β€x}
Now, recall that supnβbnββ€xβΊbnββ€x for all
nβN where bnβ is a sequence of reals. With this,
we get the following
Yβ1[ββ,x]=n=1βββ{Ο:Xnβ(Ο)β€x}
Since Xnβ are random variables(which means they extended
random variables as well), we know that {Ο:Xnβ(Ο)β€x}βF for nβN. So does their
countable union! This shows that Y is an extended random
variable as desired.
Weβll give a small sketch for the infimum part, this time
consider the collection {[x,β]:xβR} which
generates B(R). This time use the fact that
infbnββ₯xβΊbnββ₯x for all xβR where
bnβ is a real sequence. This concludes the proof. β‘
Proof to part 6: We shall only prove it for limsupXnβ.
Once again define Y:Ξ©βR given by
Y(Ο)=nββlimsupβXnβ(Ο). Define another sequence of functions
Znβ:Ξ©βR given Znβ(Ο)=supkβ₯nβXkβ(Ο) for all nβN. By
definition of limsup, we know
Y(Ο)=ninfβkβ₯nsupβXkβ(Ο)=ninfβZnβ(Ο)
We shall prove that Znβ is an extended random variable,
then by the result proven above, we must have that
Y=infZnβ is also a random variable. One needs to be
careful; in the previous proof we assumed that Xiββs are
real valued random variables, then infXnβ is an
extended random variable. In our case, we have a sequence
of extended random variables Znβ and then we are
concluding infZnβ is also a random variable. The proof
of this completely the same as above and can be worked out
quite easily, so weβll skip it here.
Znβ is an extended random variable for all
nβN.
Using the generator {[ββ,x]:xβR} of
B(R), consider
Znβ1β[ββ,x]={Ο:kβ₯nsupβXkβ(Ο)β€x}A standard analysis fact says that supnβ₯kβXkβ(Ο)β€xβΊXjβ(Ο)β€x for all jβ₯n.
This gives,
Znβ1β[ββ,x]=j=nβββ{Ο:Xjβ(Ο)β€x}.Since {Ο:Xjβ(Ο)β€x}βF for
all jβ₯n since Xjβ is a random variable(thus an
extended one too) for all jβN, we get that
countable intersection must lie F. Done. β‘
This completes the proof to part 6.
Proof to part 7: Weβll use our favourite class
of generators, namely {(ββ,x]:xβR}.
Define Y:Ξ©βR such that
Y(Ο)=X1β1Aβ(Ο)+X2β1Acβ(Ο)
for all ΟβΞ©. Once again, we want to show
Y is a random variable.
Yβ1(ββ,x]={Ο:X1β1Aβ(Ο)+X2β1Acβ(Ο)β€x}
The idea is simple, just check cases whether ΟβA
or Οξ βA. This yields
Yβ1(β,x]={Ο:X1β(Ο)β€x,ΟβA}βͺ{Ο:X2β(Ο)β€x,ΟβAc}
The final trick here is to notice that
Yβ1(ββ,x]=({Ο:X1β(Ο)β€x}β©A)βͺ({Ο:X2β(Ο)β€x}β©Ac)
Clearly, Yβ1 is a union of two measurable sets. This
concludes the proof. β‘
This concludes a series of very important results, which
are pretty much used everytime while you are dealing with
random variables. Here are a couple of more important results
which are must to know. As a matter of fact, this
is quite an important theorem which I previously
used in my blog post regarding the
Ky-Fan Metric. The details
and the reference of this theorem is mentioned in the blog
post now!
Let Xnβ be sequence of real-valued random variables, then
-
{ΟβΞ©:limnβββXnβ(Ο)βR}βF;
-
{ΟβΞ©:limnβββXnβ(Ο)βR}βF;
-
Define A={ΟβΞ©:limnβββXnβ(Ο)βR}βF.
Consider a map X:Ξ©βR
X(Ο)={limnβββXnβ(Ο)0βforΒ ΟβAforΒ ΟβAc.βthen X indeed an extended random variable;
- Define B={ΟβΞ©:limnβββXnβ(Ο)βR}βF.
Consider a map X:Ξ©βR
X(Ο)={limnβββXnβ(Ο)0βforΒ ΟβBforΒ ΟβBc.βthen X indeed an random variable.
We will now begin with the proofs.
Proof to 2nd part: This one is easy, just recall the
cauchy criteria for convergence over R. We say a
real sequence anβ is cauchy iff for every kβN
there exists some NβN such that
β£amββanββ£<k1β for m,n>N. We know that
limanβ exists finitely iff anβ is cauchy. With this
criteria, we may write
{ΟβΞ©:nββlimβXnβ(Ο)βR}=k=1βββN=1βββn=Nβββm=Nβββ{Ο:β£Xmβ(Ο)βXnβ(Ο)β£<k1β}
Well, since β£XmββXnββ£ is a random variable for all
m,nβN, thus the set {Ο:β£Xmβ(Ο)βXnβ(Ο)β£<k1β} lies in F.
Under countable union and intersection, the final
set remains in F completing the proof. β‘
Proof to part 1: We will take the help of part 2 this time.
We have already resolved the case when the limit lies in
R, so we need to handle the case when limit is
Β±β. We may write
{ΟβΞ©:nββlimβXnβ(Ο)βR}={ΟβΞ©:nββlimβXnβ(Ο)βR}βͺ{ΟβΞ©:nββlimβXnβ(Ο)=Β±β}
The first set of the union lies in F. For the
second part, we may partition the set into cases
where limit is β or ββ. We will only give a
proof for limit being infinity here. Its easy, just
observe
{ΟβΞ©:nββlimβXnβ(Ο)=β}=M=1βββN=1βββn>Nββ{ΟβΞ©:Xnβ(Ο)>M}.
Now, {ΟβΞ©:Xnβ(Ο)>M}βF
since Xnβ is a random variable for all nβN.
After taking countable union and intersection, we still
get a set a in F completing the proof. β‘
Sketch to proof of part 3: Consider Xβ1 which is
Xβ1(x,β]={Ο:X(Ο)>x}={Ο:X(Ο)>x,ΟβA}βͺ{Ο:X(Ο)>x,ΟβAc}
The above can be re-written as
Xβ1={ΟβA:nββlimβXnβ(Ο)>x}βͺ({Ο:0>x}β©Ac)
It is easy to see that {Ο:0β€x}β©AcβF. It suffices to show that
{ΟβA:limnβββXnβ(Ο)>x}βF.
Now, limnβββXnβ(Ο)>xβΊXnβ(Ο)>x for all n>N where NβN. This
means,
{ΟβA:nββlimβXnβ(Ο)>x}=N=1βββ{Ο:Xnβ(Ο)>xforΒ n>N}
This concludes the proof since {Ο:Xnβ(Ο)>xforΒ n>N} for all nβN since Xnβ is a
random variable. β‘
We will skip the proof to part 4, since the blog became
too repetitive with the same idea. The reader is encouraged
to workout the details if they are feeling uncomfortable.
To end the blog, Iβll present the final a very significant
result, which answers questions like, if X is a random
variable then should sin(X) should be a random variable?
What about simpler thing like X2+4X?
Let X be a random variable on the measurable space
(Ξ©,F). Let f:RβR be a
continuous function in its domain, then f(X) is a
random variable as well.
Denote A as set of all finite open intervals of R
which generates B(R) and let (a,b)βA.
Consider
f(X)β1(a,b)={ΟβΞ©:f(X(Ο))β(a,b)}={ΟβΞ©:X(Ο)βfβ1(a,b)}Recall a simple fact from analysis/topology, a pull-back
map of a continous function takes an open set back to an
open set, which means fβ1(a,b) is an open set. Since
open sets generate B(R), the set above
set lies in F concluding the proof. β
Indeed, a natural generalization follows. Instead of saying
f continuous, if you imposed the condition that
f was a measurable function from RβR, i.e.,
for any Borel set B, fβ1(B)βB(R),
even then the conclusion holds true.
Product of Two Random Variables
If X,Y are two random variables, then X+Y is also a
random variable. By the above theorem,
(X+Y)2=X2+2XY+Y2 is also a random variable.
Also, X2 and Y2 are random variables.
Thus,
XY=21β((X+Y)2βX2βY2)
which concludes that XY must be a random variable as well.
Appendix
Two Essential Lemmas for Sigma Fields
The following lemma is quite extensively used(honestly
quite easy to prove as well) to prove if two collections
C1β and C2β generate the same
Οβalgebra or not. This result is exclusively used
in proving this lemma where we have
discussed about several generators of B(R).
For a measurable space (Ξ©,F), let
C1β and C2β be two collections of
subsets of Ξ©. Then
Ο(C1β)=Ο(C2β)βΊC2ββΟ(C1β)andC1ββΟ(C2β).
The following theorem allows us to prove that a certain
map from Ξ©βR is a random variable. The special
thing is, we can choose whatever generator we want, and
it would still suffice. A version of the theorem
for general measure spaces can be found here on page 24.
For a measurable space (Ξ©,F), let
C1β be a collection of subsets of
R such that it generates B(R), i.e.
B(R)=Ο(C1β). Then a map
X:Ξ©βR is a random variable if and only
if
Xβ1(C)={ΟβΞ©:X(Ο)βC}βFforΒ allΒ CβC1β.
The only if direction is quite trivial. We will prove
the other direction, assume that
Xβ1(C)βFforΒ allCβC1β.Define
T:={CβΟ(C1β):Xβ1(C)βF}.Its obvious that TβΟ(C1β).
By definition of T, its also immediate that
C1ββT. Hereβs the main
claim.
T is a
Οβalgebra over
Ξ©.
Weβll only sketch the proof. What you basically need, are
the properties of a pull-back map. By our assumption,
Xβ1({β
})βF, thus
{β
}βT. Let AβT, then
AβΟ(C1β)βΉXβ1(A)βF.Since F is a Οβfield, we
know that (Xβ1(A))cβF. Its a well-known
property of a pull-back map that
(Xβ1(A))c=Xβ1(Ac). This gives
Xβ1(Ac)βF which proves
AcβT.
Verifying countable union is ommitted, one just needs to
prove that
Xβ1(n=1βββAnβ)=n=1βββXβ1(Anβ)for AnββT for all nβ₯1. β‘
Now, recall that C1β lies in T
which is a sigma algebra and
TβΟ(C1β). Since
Ο(C1β) is minimal sigma field containing
C1β, we must have T=Ο(C1β), completing the proof.
β
Conventions on Extended Reals
This section is rather short. But in case of R, we
define
0ΓΒ±β=Β±βΓ0=0
for our probability purposes. The reason for this, is to
define expected value. If an extended random variable
X takes values Β±β with probability 0, then we
essentially want to treat it as an orindary random variable
over R. For this to truly hold, you need to define
the multiplication of infinity with 0 to be 0.
Borel Sigma Algebra over Extended Reals
Iβll brief the idea as to how someone can topologically
describe open sets of R. If someone wants a shortcut,
then you can simply define B(R):=Ο(D) where D={[ββ,a]:aβR}. Life
will be fine with definition.
We will construct a homeomorphism in a topological
sense(this approach is Exercise 33, in Chapter 1 of A Probability Path by Sidney Resnick) from [β1,1]βR
given by the map
xβ¦1ββ£xβ£xβ
Thus in principle, what one can do it take all open sets
in Rβsubspace topology of [β1,1] and map it to a new
open set in R. This would generate all your open
sets in R. An interested reader can go and look for
the details online(hereβs a recommendation although, this one goes into measure theory), but we shall
skip it since it requires a good knowledge of metric spaces
and topologies induced by it.