Random Variables

Random variables seemed to be innocent, until sigma algebras were introduced. Its time to tame the beast and prove all the results you would need in your probability course!
Published on: 25 June, 2026 | Author: Pragyan Pranay
probabilityanalysisrandom-variablesprob-3

Learning random variables as a high-schooler is quite easy, even in my first course of Probability theory, a random variable XX was just a map from Ξ©β†’R\Omega \to \RR. Everything was nice and easy until the time XX was taking countably many values, but then there was a need of Οƒβˆ’\sigma-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 Ξ©\Omega) and functions from Ξ©β†’Rβ€Ύ\Omega \to \ol\RR where Rβ€Ύ\ol\RR 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 Οƒβˆ’\sigma-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 Ξ©\Omega is uncountable and the construction by Vitali.

Prerequisites

The Updated Definitions

Anyone learning axiomatic probability-theory, first learns about the probability space only being about the sample space Ξ©\Omega and the probability function P ⁣:P(Ξ©)β†’[0,1]\P\colon \mathcal{P}(\Omega) \to [0,1]. But the moment you tackle uncountable probability spaces, then one must resort to the use of the sigma-field F\mathcal{F}, to filter out the β€œgood sets” and work with them.

Definition : (Probability Space)

A probability space refers to the tuple (Ξ©,F,P)(\Omega, \mathcal{F}, \P) where Ξ©\Omega is some set(sample space), F\mathcal{F} is some Οƒβˆ’\sigma-algebra over Ξ©\Omega and P\P is a function from Fβ†’R\mathcal{F} \to \RR satisfying

  1. P(A)β‰₯0\P(A) \ge 0 for all A∈FA \in \mathcal{F};

  2. P(Ξ©)=1\P(\Omega) = 1;

  3. If {Ak}k=1∞\{A_k\}_{k = 1}^\infty is a sequence of pairwise disjoint sets where Ak∈FA_k \in \mathcal F for kβ‰₯1k \ge 1, then

βˆ‘k=1∞P(Ak)=P(⋃k=1∞Ak).\sum_{k = 1}^\infty \P(A_k) = \P\left( \bigcup_{k = 1}^\infty A_k\right).

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)\P(X \in B) where BβŠ†RB \subseteq \RR? Recall that

[X∈B]≔{Ο‰βˆˆΞ©:X(Ο‰)∈B}.[X \in B] \coloneqq \{\omega \in \Omega : X(\omega) \in B \}.

If we really want to compute the probability of this event, then we need to make sure that this event [X∈B][X \in B](we will also denote this by Xβˆ’1(B)X^{-1}(B)) lies in F\mathcal{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][0,1]. Thus, rather than computing the probability of events [X∈B][X \in B] where BβŠ†RB \subseteq \RR, we restrict BB to lie in B(R)\mathcal{B}(\RR). We are now ready to define the notion of an ordinary random variable over the measurable space (Ξ©,F)(\Omega, \mathcal{F}).

Definition : (Random Variables)

XX is said to be a random variable defined on a measurable space (Ξ©,F)(\Omega, \mathcal{F}) if XX is a function from Ξ©β†’R\Omega \to \RR such that

Xβˆ’1(B)∈F  forΒ allΒ B∈B(R).X^{-1}(B) \in \mathcal{F}\,\, \text{for all }B \in \mathcal{B}(\RR).

where Xβˆ’1(B)={Ο‰βˆˆΞ©:X(Ο‰)∈B}X^{-1}(B) = \{\omega \in \Omega : X(\omega) \in B \} and B(R)\mathcal{B}(\RR) denotes the Borel Οƒβˆ’\sigma-algebra over R\RR.

We have only defined an ordinary random variable where XX can’t take values like ±∞\pm \infty. Often times, in cases of markov chains and other stochastic processes, we sometimes denote the return time of a particle by a random variable XX. If the particle never returns then we set X(Ο‰)=∞X(\omega) = \infty in that case, so we will now define what is an extended random variable. From here, we shall now denote Rβ€Ύ=Rβˆͺ{±∞}\overline{\RR} = \mathbb{R} \cup \{\pm \infty \}.

Definition : (Extended Random Variables)

XX is said to be an extended random variable defined on a measurable space (Ξ©,F)(\Omega, \mathcal{F}) if XX is a function from Ξ©β†’Rβ€Ύ\Omega \to \overline\RR such that

Xβˆ’1(B)∈F  forΒ allΒ B∈B(Rβ€Ύ).X^{-1}(B) \in \mathcal{F}\,\, \text{for all }B \in \mathcal{B}(\overline\RR).

Its a perfectly valid question to ask how does the borel sigma field over Rβ€Ύ\overline\RR 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\RR can be assigned a probability with the function P\P. Thus we resort to what we call the Borel Οƒβˆ’\sigma-algebra over R\RR. Consider the usual metric topology1 on R\RR where we let Ο„\tau denote the set of all open sets2 of R\RR. Then we define

B(R)≔σ(Ο„)\mathcal{B}(\RR) \coloneqq \sigma(\tau)

where Οƒ(Ο„)\sigma(\tau) means the smallest Οƒβˆ’\sigma-algebra containing all the elements of Ο„\tau. Although, dealing with all open intervals is quite cumbersome when you have to prove results. Luckily, R\RR is quite forgiving and we have a wonderful result, which is good enough that we state it as a theorem.

Theorem : (Open sets of reals)

Any open set UβŠ†RU \subseteq \RR 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. β–‘\quad\square

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.

Lemma (Alternate Definition) β€”

On R\RR, the Οƒβˆ’\sigma-field generated by

  1. Open Intervals
  2. Open Sets
  3. Closed Intervals
  4. Closed Sets
  5. Intervals of form (a,b](a,b] where a,b∈Ra,b \in \RR
  6. Intervals of form (βˆ’βˆž,a](-\infty, a] where a∈Ra \in \RR.
  7. Intervals of form (βˆ’βˆž,a)(-\infty, a) where a∈Ra \in \RR.
  8. Intervals of form [a,∞)[a,\infty) where a∈Ra \in \RR.
  9. Intervals of form (a,∞)(a,\infty) where a∈Ra \in \RR.

all generate B(R)\mathcal{B}(\RR). By generate, we mean for example, look at 4th point, the smallest sigma algebra containing all closed intervals is B(R)\mathcal{B}(\RR).

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][a,b] from open sets, then consider

β‹‚n=1∞(aβˆ’1n,b+1n)=[a,b].\bigcap_{n = 1}^\infty \left(a-\frac1 n, b + \frac1 n \right)= [a,b].

So, you can construct any closed interval from an open intervals. The other parts can be done similarly. β–‘\square

If we want to talk about B(Rβ€Ύ)\mathcal B (\ol\RR), then we need to characterize the open sets of Rβ€Ύ\ol \RR, which is more or less a question of topology. If someone is interested in characterizing the open sets of Rβ€Ύ\ol\RR, then you can refer the appendix one possible approach. For this blog post, we will work a simpler definition of B(Rβ€Ύ)\mathcal B (\ol\RR), which is the following.

Lemma (Borel Sets over Extended Reals) β€”

Define

C≔{[βˆ’βˆž,x]:x∈Rβ€Ύ}\mathcal{C} \coloneqq \{[-\infty, x]: x \in \ol\RR\}

where [βˆ’βˆž,x]≔(βˆ’βˆž,x]βˆͺ{βˆ’βˆž}[-\infty, x] \coloneqq (-\infty, x] \cup \{-\infty\}, then

B(Rβ€Ύ)=Οƒ(C).\mathcal{B}(\ol\RR) = \sigma(\mathcal C).

Even with all this, I will give an alternate definition to the borel sigma algebra over Rβ€Ύ\ol\RR 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.

Theorem :

Let {Xn}nβ‰₯1\{X_n\}_{n \ge 1} be a sequence of ordinary real-valued random variables. Show that

  1. For a∈Ra \in \RR, aX1aX_1 is a random variable;

  2. ∣X1∣|X_1| is also a random variable;

  3. By giving a suitable example, prove that if ∣X1∣|X_1| is a random variable, then X1X_1 is not necessarily a random variable;

  4. max⁑(X1,X2)\max(X_1, X_2), min⁑(X1,X2)\min(X_1, X_2), X1+X2X_1 + X_2 are all random variables;

  5. sup⁑Xn\displaystyle \sup X_n and inf⁑Xn\inf X_n are extended real value random variables;

  6. lim sup⁑nβ†’βˆžXn\displaystyle\limsup_{n \to \infty} X_n and lim inf⁑nβ†’βˆžXn\displaystyle\liminf_{n \to \infty} X_n are extended real value random variables;

  7. For A∈FA \in \mathcal{F}, X11A+X21AcX_1\bm{1}_A + X_2\bm{1}_{A^c} is a random variable.

Before starting the proof, we recall the collection B={(βˆ’βˆž,x]:x∈R}B = \{(-\infty, x]: x \in \RR \} generates the entire B(R)\mathcal{B}(\RR) thus B(R)=Οƒ(B)\mathcal{B}(\RR) = \sigma(B). Thus to show that any map f ⁣:Ξ©β†’Rf\colon \Omega \to \RR is a random variable, it’s enough to show that fβˆ’1((βˆ’βˆž,x])∈Ff^{-1}\left((-\infty, x] \right)\in \mathcal{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 aX1aX_1 is a random variable. If a=0a = 0, then

(aX1)βˆ’1(βˆ’βˆž,x]={Ο‰:0=aX1(Ο‰)≀x}(aX_1)^{-1}(-\infty, x] = \{ \omega : 0 = aX_1(\omega) \le x\}

If x<0x < 0, then then (aX1)βˆ’1(aX_1)^{-1} is precisely βˆ…βˆˆF\emptyset \in \mathcal F. If x>0x > 0, then (aX1)βˆ’1(aX_1)^{-1} is precisely Ω∈F\Omega \in \mathcal{F}. This shows that aX1βˆ’1(βˆ’βˆž,x]∈FaX_1^{-1}(-\infty, x] \in \mathcal F for all x∈Rx \in \RR. This case is done.

For the next case, assume a>0a > 0. Once again, consider (aX1)βˆ’1(βˆ’βˆž,x](aX_1)^{-1}(-\infty, x] which is precisely

(aX1)βˆ’1(βˆ’βˆž,x]={Ο‰βˆˆΞ©:aX1(Ο‰)≀x}={Ο‰βˆˆΞ©:X1(Ο‰)≀x/a}=X1βˆ’1(βˆ’βˆž,x/a](aX_1)^{-1}(-\infty, x] = \{\omega \in \Omega: aX_1(\omega) \le x\} = \{\omega \in \Omega: X_1(\omega) \le x/a\} = X_1^{-1}(-\infty, x/a]

Since X1X_1 is a random variable, X1βˆ’1(βˆ’βˆž,x]∈FX_1^{-1}(-\infty, x] \in \mathcal F completing the proof for this case as well.

The last case is slightly tricky. This time dividing by aa would change the sign of equality. So, we will work with another class of generators, that is {[x,∞):x∈R}\{[x, \infty): x \in \RR \}. Consider

(aX)βˆ’1[x,∞)={Ο‰:aX(Ο‰)β‰₯x}={Ο‰:X(Ο‰)≀x/a}∈F(aX)^{-1}[x,\infty) = \{ \omega: aX(\omega) \ge x \} = \{\omega: X(\omega) \le x/a \} \in \mathcal F

since XX is a random variable and B={(βˆ’βˆž,x]:x∈R}B = \{(-\infty, x]: x \in \RR \} is also a generator. The proof is now complete. β–‘\square


Proof to part 2: We will stick with class of generators B={(βˆ’βˆž,x]:x∈R}B = \{(-\infty, x]: x \in \RR \}. Consider

∣X1βˆ£βˆ’1(βˆ’βˆž,x]={Ο‰βˆˆΞ©:∣X1(Ο‰)βˆ£β‰€x}|X_1|^{-1}(-\infty, x] = \{\omega \in \Omega : |X_1(\omega)| \le x \}

If x<0x < 0, then ∣X1βˆ£βˆ’1=βˆ…βˆˆF|X_1|^{-1} = \emptyset \in \mathcal F. If xβ‰₯0x \ge 0, then

∣X1βˆ£βˆ’1(βˆ’βˆž,x]={Ο‰βˆˆΞ©:βˆ’x≀X1(Ο‰)≀x}={Ο‰βˆˆΞ©:X1(Ο‰)∈[βˆ’x,x]}.|X_1|^{-1}(-\infty, x] = \{\omega \in \Omega : -x \le X_1(\omega) \le x \} = \{\omega\in\Omega : X_1(\omega) \in [-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|X_1|^{-1} \in \mathcal F in this case as well. The proof is complete now. β–‘\square


Counter Example to part 3: Consider Ξ©={0,1}\Omega = \{ 0, 1\} and F={{βˆ…},Ξ©}\mathcal F = \left\{\{\emptyset \}, \Omega \right\} and consider a map Y ⁣:Ξ©β†’RY\colon \Omega \to \RR such that Y(0)=1Y(0) = 1 and Y(1)=βˆ’1Y(1) = -1. In this case, ∣Y∣|Y| is indeed a random variable, but YY is not. To see this, note that {1}∈B(R)\{ 1\} \in \mathcal B(\RR) and Yβˆ’1({1})={0}∉F.Y^{-1}(\{ 1\}) = \{0\} \not\in \mathcal F.


Proof to part 4: We will first prove min⁑(X1,X2)\min(X_1, X_2) is a random variable. Consider

(min⁑(X1,X2))βˆ’1(βˆ’βˆž,x]={Ο‰βˆˆΞ©:min⁑(X1(Ο‰),X2(Ο‰))≀x}.(\min(X_1, X_2))^{-1}(-\infty, x] = \{\omega \in \Omega: \min(X_1(\omega), X_2(\omega)) \le x \}.

But for any two reals a,ba,b, min⁑(a,b)≀xβ€…β€ŠβŸΊβ€…β€Ša≀x\min(a,b) \le x \iff a \le x or b≀xb \le x. This gives

(min⁑(X1,X2))βˆ’1(βˆ’βˆž,x]={Ο‰βˆˆΞ©:X1(Ο‰)≀x}βˆͺ{Ο‰βˆˆΞ©:X2(ω≀x)}(\min(X_1, X_2))^{-1}(-\infty, x] = \{\omega \in \Omega: X_1(\omega) \le x \} \cup \{ \omega \in \Omega: X_2(\omega \le x)\}

Since X1,X2X_1, X_2 are random variables, both the events in the union above lie in F\mathcal F, thus their intersection would lie there as well. We omit the prove for max⁑(X1,X2)\max(X_1, X_2), but the idea to prove that is very very similar.

Let Y=X1+X2Y = X_1 + X_2. We shall now prove that YY is a random variable. This one truly tricky and uses a typical analysis trick which exploits that R\RR is separable3. For this proof, we will use a different class of generators, namely {(x,∞):x∈R}\{ (x, \infty) : x \in \RR \}. Now, consider

Yβˆ’1(x,∞)={Ο‰:X1(Ο‰)+X2(Ο‰)>x}.Y^{-1}(x, \infty) = \{ \omega : X_1(\omega) + X_2(\omega) > x \}.

Since Q\QQ is countable, let {qi}i=1∞\{q_i\}_{i = 1}^\infty be an enumeration of Q\QQ. We have the following claim.

Claim β€”
Yβˆ’1(x,∞)=⋃i=1∞{Ο‰:X1(Ο‰)>qi}∩{Ο‰:X2(Ο‰)>xβˆ’qi}.\displaystyle Y^{-1}(x,\infty) = \bigcup_{i = 1}^\infty \{\omega: X_1(\omega) > q_i\} \cap \{\omega: X_2(\omega) >x - q_i \}.

The proof to the claim is extremely simple. If Ο‰βˆˆYβˆ’1(x,∞)\omega \in Y^{-1}(x, \infty), then we know

X1(Ο‰)>xβˆ’X2(Ο‰)X_1(\omega) > x - X_2(\omega)

Since these two quantities are different, by density of Q\QQ over R\RR, we know there must exist some index jj such that

X1(Ο‰)>qj>xβˆ’X2(Ο‰)X_1(\omega) > q_j > x - X_2(\omega)

which immediately gives Ο‰βˆˆβ‹ƒi=1∞{Ο‰:X1(Ο‰)>qi}∩{Ο‰:X2(Ο‰)>xβˆ’qi}.\omega \in \bigcup_{i = 1}^\infty \{\omega: X_1(\omega) > q_i\} \cap \{\omega: X_2(\omega) >x - q_i \}. The other direction is rather trivial, so we shall skip it.

We can now finish the proof, since X1X_1 and X2X_2 are random variables and {(x,∞):x∈R}\{ (x, \infty) : x \in \RR \} is a class of generators, we get that both events {Ο‰:X1(Ο‰)>qi}\{ \omega: X_1(\omega) > q_i \} and {Ο‰:X2(Ο‰)>xβˆ’qi}\{\omega: X_2(\omega) > x - q_i \} both lie in F\mathcal F for all i∈Ni \in \NN. The intersection would lie in F\mathcal F and so would a countable intersection! The proof is now complete. β–‘\square


Proof to part 5: Define Y ⁣:Ξ©β†’Rβ€ΎY\colon \Omega \to \ol\RR such that Y(Ο‰)=sup⁑nXn(Ο‰)Y(\omega) = \sup_n X_n(\omega). We shall use the generator of Rβ€Ύ\ol\RR, which is the collection {[βˆ’βˆž,x]:x∈R}\{ [-\infty, x]: x \in \RR\}. Thus, consider

Yβˆ’1[βˆ’βˆž,x]={Ο‰:sup⁑nXn(Ο‰)≀x}Y^{-1}[-\infty, x] = \left\{ \omega : \sup_n X_n(\omega) \le x \right\}

Now, recall that sup⁑nbn≀xβ€…β€ŠβŸΊβ€…β€Šbn≀x\sup_n b_n \le x \iff b_n \le x for all n∈Nn \in \NN where bnb_n is a sequence of reals. With this, we get the following

Yβˆ’1[βˆ’βˆž,x]=β‹‚n=1∞{Ο‰:Xn(Ο‰)≀x}Y^{-1}[-\infty, x] = \bigcap_{n = 1}^\infty\{\omega: X_n(\omega) \le x \}

Since XnX_n are random variables(which means they extended random variables as well), we know that {Ο‰:Xn(Ο‰)≀x}∈F\{\omega: X_n(\omega) \le x\} \in \mathcal F for n∈Nn \in \NN. So does their countable union! This shows that YY 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}\{ [x, \infty]: x \in \RR\} which generates B(R)\mathcal B (\RR). This time use the fact that inf⁑bnβ‰₯xβ€…β€ŠβŸΊβ€…β€Šbnβ‰₯x\inf b_n \ge x \iff b_n \ge x for all x∈Rx \in \RR where bnb_n is a real sequence. This concludes the proof. β–‘\square


Proof to part 6: We shall only prove it for lim sup⁑Xn\limsup X_n. Once again define Y ⁣:Ξ©β†’Rβ€ΎY\colon \Omega \to \ol\RR given by Y(Ο‰)=lim sup⁑nβ†’βˆžXn(Ο‰)\displaystyle Y(\omega) = \limsup_{n \to \infty} X_n(\omega). Define another sequence of functions Zn ⁣:Ξ©β†’Rβ€ΎZ_n\colon \Omega \to \ol\RR given Zn(Ο‰)=sup⁑kβ‰₯nXk(Ο‰)Z_n(\omega) = \sup_{k \ge n} X_k(\omega) for all n∈Nn \in \NN. By definition of lim sup⁑\limsup, we know

Y(Ο‰)=inf⁑nsup⁑kβ‰₯nXk(Ο‰)=inf⁑nZn(Ο‰)Y(\omega) = \inf_{n}\sup_{k \ge n} X_k(\omega) = \inf_n Z_n(\omega)

We shall prove that ZnZ_n is an extended random variable, then by the result proven above, we must have that Y=inf⁑ZnY = \inf Z_n is also a random variable. One needs to be careful; in the previous proof we assumed that XiX_iβ€˜s are real valued random variables, then inf⁑Xn\inf X_n is an extended random variable. In our case, we have a sequence of extended random variables ZnZ_n and then we are concluding inf⁑Zn\inf Z_n 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.

Claim β€”
ZnZ_n is an extended random variable for all n∈Nn \in \NN.

Using the generator {[βˆ’βˆž,x]:x∈R}\{ [-\infty, x] : x \in \RR \} of B(Rβ€Ύ)\mathcal B (\ol\RR), consider

Znβˆ’1[βˆ’βˆž,x]={Ο‰:sup⁑kβ‰₯nXk(Ο‰)≀x}Z_n^{-1}[-\infty, x] = \left\{ \omega: \sup_{k \ge n} X_k(\omega) \le x \right\}

A standard analysis fact says that sup⁑nβ‰₯kXk(Ο‰)≀xβ€…β€ŠβŸΊβ€…β€ŠXj(Ο‰)≀x\sup_{n \ge k} X_k(\omega) \le x \iff X_j(\omega) \le x for all jβ‰₯nj \ge n. This gives,

Znβˆ’1[βˆ’βˆž,x]=β‹‚j=n∞{Ο‰:Xj(Ο‰)≀x}.Z_n^{-1}[-\infty, x] = \bigcap_{j = n}^\infty \{\omega : X_j(\omega) \le x \}.

Since {Ο‰:Xj(Ο‰)≀x}∈F\{ \omega: X_j(\omega) \le x \} \in \mathcal F for all jβ‰₯nj \ge n since XjX_j is a random variable(thus an extended one too) for all j∈Nj \in \NN, we get that countable intersection must lie F\mathcal F. Done. β–‘\square

This completes the proof to part 6.


Proof to part 7: We’ll use our favourite class of generators, namely {(βˆ’βˆž,x]:x∈R}\{ (-\infty, x]: x \in \RR \}. Define Y ⁣:Ξ©β†’RY\colon \Omega \to \RR such that Y(Ο‰)=X11A(Ο‰)+X21Ac(Ο‰)Y(\omega) = X_1\bm{1}_A(\omega) + X_2\bm{1}_{A^c}(\omega) for all Ο‰βˆˆΞ©\omega \in \Omega. Once again, we want to show YY is a random variable.

Yβˆ’1(βˆ’βˆž,x]={Ο‰:X11A(Ο‰)+X21Ac(Ο‰)≀x}Y^{-1}(-\infty, x] = \{\omega : X_1\bm{1}_A(\omega) + X_2\bm{1}_{A^c}(\omega) \le x\}

The idea is simple, just check cases whether Ο‰βˆˆA\omega \in A or Ο‰βˆˆΜΈA\omega \not\in A. This yields

Yβˆ’1(∞,x]={Ο‰:X1(Ο‰)≀x,Ο‰βˆˆA}βˆͺ{Ο‰:X2(Ο‰)≀x,Ο‰βˆˆAc}Y^{-1}(\infty , x] = \{\omega: X_1(\omega) \le x, \omega \in A \} \cup \{ \omega: X_2(\omega) \le x, \omega \in A^c\}

The final trick here is to notice that

Yβˆ’1(βˆ’βˆž,x]=({Ο‰:X1(Ο‰)≀x}∩A)βˆͺ({Ο‰:X2(Ο‰)≀x}∩Ac)Y^{-1}(-\infty , x] = \left(\{\omega: X_1(\omega) \le x\}\cap A \right)\cup \left(\{ \omega: X_2(\omega) \le x\} \cap A^c\right)

Clearly, Yβˆ’1Y^{-1} is a union of two measurable sets. This concludes the proof. β–‘\square


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!

Theorem :

Let XnX_n be sequence of real-valued random variables, then

  1. {Ο‰βˆˆΞ©:lim⁑nβ†’βˆžXn(Ο‰)∈Rβ€Ύ}∈F;\{ \omega \in \Omega: \lim_{n \to \infty}X_n(\omega) \in \ol\RR \} \in \mathcal{F};

  2. {Ο‰βˆˆΞ©:lim⁑nβ†’βˆžXn(Ο‰)∈R}∈F;\{ \omega \in \Omega: \lim_{n \to \infty}X_n(\omega) \in \RR \} \in \mathcal{F};

  3. Define A={Ο‰βˆˆΞ©:lim⁑nβ†’βˆžXn(Ο‰)∈Rβ€Ύ}∈FA = \{ \omega \in \Omega: \lim_{n \to \infty}X_n(\omega) \in \ol\RR \} \in \mathcal{F}. Consider a map X ⁣:Ξ©β†’Rβ€ΎX\colon \Omega \to \ol\RR

X(Ο‰)={lim⁑nβ†’βˆžXn(Ο‰)forΒ Ο‰βˆˆA0forΒ Ο‰βˆˆAc.X(\omega) = \begin{cases} \lim_{n \to \infty} X_n(\omega) \qquad &\text{for }\omega \in A \\ 0 \qquad &\text{for }\omega \in A^c. \end{cases}

then XX indeed an extended random variable;

  1. Define B={Ο‰βˆˆΞ©:lim⁑nβ†’βˆžXn(Ο‰)∈R}∈FB = \{ \omega \in \Omega: \lim_{n \to \infty}X_n(\omega) \in \RR \} \in \mathcal{F}. Consider a map X ⁣:Ξ©β†’RX\colon \Omega \to \RR
X(Ο‰)={lim⁑nβ†’βˆžXn(Ο‰)forΒ Ο‰βˆˆB0forΒ Ο‰βˆˆBc.X(\omega) = \begin{cases} \lim_{n \to \infty} X_n(\omega) \qquad &\text{for }\omega \in B \\ 0 \qquad &\text{for }\omega \in B^c. \end{cases}

then XX 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\RR. We say a real sequence ana_n is cauchy iff for every k∈Nk \in \NN there exists some N∈NN \in \NN such that ∣amβˆ’an∣<1k|a_m - a_n| < \frac 1 k for m,n>Nm,n > N. We know that lim⁑an\lim a_n exists finitely iff ana_n is cauchy. With this criteria, we may write

{Ο‰βˆˆΞ©:lim⁑nβ†’βˆžXn(Ο‰)∈R}=β‹‚k=1βˆžβ‹ƒN=1βˆžβ‹‚n=Nβˆžβ‹‚m=N∞{Ο‰:∣Xm(Ο‰)βˆ’Xn(Ο‰)∣<1k}\{ \omega \in \Omega: \lim_{n \to \infty}X_n(\omega) \in \RR \} = \bigcap_{k=1}^\infty \bigcup_{N = 1}^\infty \bigcap_{n = N}^\infty \bigcap_{m = N}^\infty \left\{\omega : |X_m(\omega) - X_n(\omega)| < \frac 1 k \right\}

Well, since ∣Xmβˆ’Xn∣|X_m - X_n| is a random variable for all m,n∈Nm,n \in \NN, thus the set {Ο‰:∣Xm(Ο‰)βˆ’Xn(Ο‰)∣<1k}\left\{\omega : |X_m(\omega) - X_n(\omega)| < \frac 1 k \right\} lies in F\mathcal{F}. Under countable union and intersection, the final set remains in F\mathcal{F} completing the proof. β–‘\square


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\RR, so we need to handle the case when limit is ±∞\pm \infty. We may write

{Ο‰βˆˆΞ©:lim⁑nβ†’βˆžXn(Ο‰)∈Rβ€Ύ}={Ο‰βˆˆΞ©:lim⁑nβ†’βˆžXn(Ο‰)∈R}βˆͺ{Ο‰βˆˆΞ©:lim⁑nβ†’βˆžXn(Ο‰)=±∞}\{ \omega \in \Omega: \lim_{n \to \infty}X_n(\omega) \in \ol\RR \} = \{ \omega \in \Omega: \lim_{n \to \infty}X_n(\omega) \in \RR \} \cup \{\omega\in \Omega: \lim_{n \to \infty} X_n(\omega) = \pm \infty \}

The first set of the union lies in F\mathcal F. For the second part, we may partition the set into cases where limit is ∞\infty or βˆ’βˆž-\infty. We will only give a proof for limit being infinity here. Its easy, just observe

{Ο‰βˆˆΞ©:lim⁑nβ†’βˆžXn(Ο‰)=∞}=β‹‚M=1βˆžβ‹ƒN=1βˆžβ‹‚n>N{Ο‰βˆˆΞ©:Xn(Ο‰)>M}.\{ \omega \in \Omega: \lim_{n \to \infty}X_n(\omega) = \infty \} = \bigcap_{M = 1}^\infty \bigcup_{N = 1}^\infty \bigcap_{n > N} \{\omega \in \Omega: X_n(\omega) > M \}.

Now, {Ο‰βˆˆΞ©:Xn(Ο‰)>M}∈F\{\omega \in \Omega: X_n(\omega) > M \} \in \mathcal F since XnX_n is a random variable for all n∈Nn \in \NN. After taking countable union and intersection, we still get a set a in F\mathcal{F} completing the proof. β–‘\square


Sketch to proof of part 3: Consider Xβˆ’1X^{-1} which is

Xβˆ’1(x,∞]={Ο‰:X(Ο‰)>x}={Ο‰:X(Ο‰)>x,Ο‰βˆˆA}βˆͺ{Ο‰:X(Ο‰)>x,Ο‰βˆˆAc}X^{-1}(x,\infty] = \{\omega: X(\omega) > x \} = \{\omega: X(\omega)> x, \omega \in A \} \cup \{\omega: X(\omega) > x, \omega \in A^c \}

The above can be re-written as

Xβˆ’1={Ο‰βˆˆA:lim⁑nβ†’βˆžXn(Ο‰)>x}βˆͺ({Ο‰:0>x}∩Ac)X^{-1} = \{ \omega \in A: \lim_{n \to \infty} X_n(\omega) > x \} \cup (\{\omega: 0 > x \} \cap A^c)

It is easy to see that {Ο‰:0≀x}∩Ac∈F\{\omega: 0 \le x \} \cap A^c \in \mathcal{F}. It suffices to show that {Ο‰βˆˆA:lim⁑nβ†’βˆžXn(Ο‰)>x}∈F\{\omega \in A: \lim_{n \to \infty} X_n(\omega) > x \} \in \mathcal F. Now, lim⁑nβ†’βˆžXn(Ο‰)>xβ€…β€ŠβŸΊβ€…β€ŠXn(Ο‰)>x\lim_{n \to \infty} X_n(\omega) > x \iff X_n(\omega) > x for all n>Nn > N where N∈NN \in \NN. This means,

{Ο‰βˆˆA:lim⁑nβ†’βˆžXn(Ο‰)>x}=⋃N=1∞{Ο‰:Xn(Ο‰)>x  forΒ n>N}\{\omega \in A: \lim_{n \to \infty} X_n(\omega) > x \} = \bigcup_{N = 1}^\infty\{\omega: X_n(\omega) > x \,\,\text{for $n > N$}\}

This concludes the proof since {Ο‰:Xn(Ο‰)>x  forΒ n>N}\{\omega: X_n(\omega) > x \,\,\text{for }n> N\} for all n∈Nn \in \NN since XnX_n is a random variable. β–‘\square


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 XX is a random variable then should sin⁑(X)\sin(X) should be a random variable? What about simpler thing like X2+4XX^2 + 4X?

Theorem : (Continuity preserves Measurability)

Let XX be a random variable on the measurable space (Ξ©,F)(\Omega, \mathcal F). Let f ⁣:Rβ†’Rf\colon \RR \to \RR be a continuous function in its domain, then f(X)f(X) is a random variable as well.

Denote AA as set of all finite open intervals of R\RR which generates B(R)\mathcal B(\RR) and let (a,b)∈A(a,b) \in A. Consider

f(X)βˆ’1(a,b)={Ο‰βˆˆΞ©:f(X(Ο‰))∈(a,b)}={Ο‰βˆˆΞ©:X(Ο‰)∈fβˆ’1(a,b)}f(X)^{-1}(a,b) = \{\omega \in \Omega: f(X(\omega)) \in (a,b)\} = \{\omega \in \Omega: X(\omega) \in 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)f^{-1}(a,b) is an open set. Since open sets generate B(R)\mathcal{B}(\RR), the set above set lies in F\mathcal{F} concluding the proof. β– \quad\blacksquare

Indeed, a natural generalization follows. Instead of saying ff continuous, if you imposed the condition that ff was a measurable function from Rβ†’R\RR \to \RR, i.e., for any Borel set BB, fβˆ’1(B)∈B(R)f^{-1}(B) \in \mathcal{B}(\RR), even then the conclusion holds true.

Product of Two Random Variables

If X,YX,Y are two random variables, then X+YX+Y is also a random variable. By the above theorem, (X+Y)2=X2+2XY+Y2(X+Y)^2 = X^2 + 2XY + Y^2 is also a random variable. Also, X2X^2 and Y2Y^2 are random variables. Thus,

XY=12((X+Y)2βˆ’X2βˆ’Y2)XY = \frac 1 2 \left( (X+Y)^2 - X^2 - Y^2\right)

which concludes that XYXY 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\mathcal{C}_1 and C2\mathcal C_2 generate the same Οƒβˆ’\sigma-algebra or not. This result is exclusively used in proving this lemma where we have discussed about several generators of B(R)\mathcal B(\RR).

Lemma

For a measurable space (Ξ©,F)(\Omega, \mathcal F), let C1\mathcal C_1 and C2\mathcal C_2 be two collections of subsets of Ξ©\Omega. Then

Οƒ(C1)=Οƒ(C2)β€…β€ŠβŸΊβ€…β€ŠC2βŠ†Οƒ(C1)andC1βŠ†Οƒ(C2).\sigma(\mathcal C_1) = \sigma(\mathcal C_2) \iff \mathcal C_2 \subseteq \sigma(\mathcal C_1) \quad \text{and} \quad \mathcal{C_1} \subseteq \sigma(\mathcal C_2).

The following theorem allows us to prove that a certain map from Ξ©β†’R\Omega \to \RR 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.

Theorem :

For a measurable space (Ξ©,F)(\Omega, \mathcal F), let C1\mathcal C_1 be a collection of subsets of R\RR such that it generates B(R)\mathcal{B}(\RR), i.e. B(R)=Οƒ(C1)\mathcal{B}(\RR) = \sigma(\mathcal C_1). Then a map X ⁣:Ξ©β†’RX\colon \Omega \to \RR is a random variable if and only if

Xβˆ’1(C)={Ο‰βˆˆΞ©:X(Ο‰)∈C}∈FforΒ allΒ C∈C1.X^{-1}(C) = \{ \omega \in \Omega: X(\omega) \in C \} \in \mathcal{F}\quad \text{for all } C \in \mathcal C_1.

The only if direction is quite trivial. We will prove the other direction, assume that

Xβˆ’1(C)∈FforΒ allC∈C1.X^{-1}(C) \in \mathcal F \quad \text{for all}\quad C \in \mathcal C_1.

Define

T≔{CβˆˆΟƒ(C1):Xβˆ’1(C)∈F}.\mathcal{T} \coloneqq \{C \in \sigma(\mathcal C_1) : X^{-1}(C) \in \mathcal F \}.

Its obvious that TβŠ†Οƒ(C1)\mathcal T \subseteq \sigma(\mathcal C_1). By definition of T\mathcal T, its also immediate that C1βŠ†T\mathcal C_1 \subseteq \mathcal T. Here’s the main claim.

Claim β€”
T\mathcal T is a Οƒβˆ’\sigma-algebra over Ξ©\Omega.

We’ll only sketch the proof. What you basically need, are the properties of a pull-back map. By our assumption, Xβˆ’1({βˆ…})∈FX^{-1}(\{\emptyset\}) \in \mathcal F, thus {βˆ…}∈T\{\emptyset\} \in \mathcal T. Let A∈TA \in \mathcal T, then

AβˆˆΟƒ(C1)β€…β€ŠβŸΉβ€…β€ŠXβˆ’1(A)∈F.A \in \sigma(\mathcal C_1) \implies X^{-1}(A) \in \mathcal F.

Since F\mathcal F is a Οƒβˆ’\sigma-field, we know that (Xβˆ’1(A))c∈F(X^{-1}(A))^c \in \mathcal F. Its a well-known property of a pull-back map that (Xβˆ’1(A))c=Xβˆ’1(Ac)(X^{-1}(A))^c = X^{-1}(A^c). This gives Xβˆ’1(Ac)∈FX^{-1}(A^c) \in \mathcal F which proves Ac∈TA^c \in \mathcal T.

Verifying countable union is ommitted, one just needs to prove that

Xβˆ’1(⋃n=1∞An)=⋃n=1∞Xβˆ’1(An)X^{-1} \left( \bigcup_{n = 1}^\infty A_n\right) = \bigcup_{n = 1}^\infty X^{-1}(A_n)

for An∈TA_n \in \mathcal T for all nβ‰₯1n \ge 1. β–‘\square

Now, recall that C1\mathcal C_1 lies in T\mathcal{T} which is a sigma algebra and TβŠ†Οƒ(C1)\mathcal{T} \subseteq \sigma(\mathcal C_1). Since Οƒ(C1)\sigma(\mathcal C_1) is minimal sigma field containing C1\mathcal C_1, we must have T=Οƒ(C1)\mathcal T = \sigma(\mathcal{C_1}), completing the proof. β– \quad \blacksquare

Conventions on Extended Reals

This section is rather short. But in case of Rβ€Ύ\ol\RR, we define

0Γ—Β±βˆž=Β±βˆžΓ—0=00\times \pm\infty = \pm\infty \times 0 = 0

for our probability purposes. The reason for this, is to define expected value. If an extended random variable XX takes values ±∞\pm\infty with probability 00, then we essentially want to treat it as an orindary random variable over R\RR. For this to truly hold, you need to define the multiplication of infinity with 00 to be 00.

Borel Sigma Algebra over Extended Reals

I’ll brief the idea as to how someone can topologically describe open sets of Rβ€Ύ\ol\RR. If someone wants a shortcut, then you can simply define B(Rβ€Ύ)≔σ(D)\mathcal{B}(\ol\RR) \coloneqq \sigma(D) where D={[βˆ’βˆž,a]:a∈R}D = \{[-\infty, a]: a \in \RR \}. 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β€Ύ[-1,1] \to \ol\RR given by the map

x↦x1βˆ’βˆ£x∣x \mapsto \frac{x}{1-|x|}

Thus in principle, what one can do it take all open sets in Rβˆ’\RR-subspace topology of [βˆ’1,1][-1,1] and map it to a new open set in Rβ€Ύ\ol\RR. This would generate all your open sets in Rβ€Ύ\ol\RR. 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.

Footnotes

Footnotes

  1. Yes, the definition of the borel-sigma algebra is dependent on the fact which topology you chose. One can read the definition from wikipedia. ↩

  2. A subset XβŠ†RX \subseteq \RR is called an open set under the usual metric topology if for every a∈Xa \in X, there exists some Ο΅>0\epsilon > 0 such that (aβˆ’Ο΅,a+Ο΅)βŠ†X(a-\epsilon, a+\epsilon) \subseteq X. ↩

  3. A metric space(in our case R\RR) is said to be separable if it contains a countable dense subset. In case of R\RR, Q\QQ is countable dense subset. ↩