- Published on
Random Variables
Most of this stuff is derived from Probability With Martingales by Williams. Maybe I'll add other sources too in the coming future.
Overview
I've never really had a good intuition for what a random variable really is. In EECS126, we define random variables as mappings from our probability space to some set of values , such that if we define a -algebra on , then the preimage of every is in the -algebra of our probability space. Then, the distribution of this random variable is the function , which defines a probability measure on .
This definition makes sense (and indeed after reading Williams' book aligns with the measure-theoretic formalism of random variables as measurable functions) but is never really used in the class. Also, I have some outstanding questions:
- Why is the distribution function a valid probability measure?
- Given a distribution, can we construct a corresponding random variable (ie. in 126, we say some random variable is sampled from an exponential distribution, but it's unclear why that RV exists?)
Measurable Functions
Williams' mostly works with real-valued random variables, so I'll be doing the same, but the definitions extend to general measurable spaces. Given a measurable space , we define
Definition: -measurable function: Given , is -measurable if .
Recall is the Borel sets on the usual topology on . Ok, this agrees with 126 definition.
Remark: It's interesting to see the parallels between topological definitions of continuous functions and the definition of measurable functions here. Instead of the preimage of open sets being open, we have the preimage of measurable sets being measurable. There are more cool parallels like this going forward!
With this definition, we can consider useful properties of measurable functions:
- If we have some class such that (that is, the class generates the Borel sets), then . That is, measurability on this class implies measurability alltogether. (Quick proof: Take as the class of . preserves set operations, so is a -algebra. By construction, , so it must be that .)
- If is topological and is continuous, then is Borel.
It turns out that is also an algebra over , so , .
Moreover, the composition of measurable functions is measurable: . Consider the following picture:
So, a measurable set passed through the backwards map is still measurable, which passed through the backwards map is still measurable.
Useful Lemma: For any measurable , is -measurable if . This directly follows from the fact that is a -system on that generates , from which we can use our above result to say that is -measurable.
Lastly, given a sequence , are all -measurable (this time not technically into but rather into ) (Proof needed??!?!!?)
The definition of a random variable directly follows from looking at measurable function. Given some (measurable) porbability space , a random variable is just some .
-algebra generated by collection of functions on : If we are given , define as the smallest -algebra on such that each map is -measurable. Clearly, , our -algebra is generated by (must contain at least) the preimage of every Borel set through every function in our collection.
With 202A fresh in my mind, this seems really similar to the initial topology given some set and a family of topological spaces with functions taking to those spaces. Instead of the coarsest topology that makes all the functions continuous, here we have the smallest -algebra that makes all the functions measurable with respect to that algebra.
A Coin Tossing Example
Lets take a countable sequence of coin tosses such that , .
Distributions
If we have a random variable , we have
So we can immediately define the probability law of this RV as , which maps from our Borel sets to -- this is consistent with the pushforward measure given in the 126 notes. However, note that generates , so is fully determined by some on the -system, which we can define as
But this is just the CDF of the random variable! So, the CDF fully determines our probability law of because of the nice property of -systems, that two probability measures agreeing on a -system agree on the -algebra generated by that -system. There is one other thing that we actually should have checked earlier too:
is a valid probability measure on : , so it assigns measure 1 to . Then, lets check countable additivity: Take disjoint Borel sets . Then,
It must be that for exactly one , else they would not be pairwise disjoint. So, . Then, given disjoint , must be disjoint. For if they werent, that would imply one satisfies both and , which is a contradiction. So, our expression becomes
So countable additivity of follows from countable additivity of .
Constructing Random Variables From Distributions
It turns out we can go the other way too. If we have a "nicely behaved" distribution function , we can construct a probability measure such that . Then, if we take our probability triple to be , then , that is, there exists a random variable whose distribution function equals our given one at all points. What does nicely behaved mean?
- is right continuous (see this is true for : by monotone convergence,)
![[Image goes here]](/static/images/thing.jpg)