Probability Spaces, Random Variables, and Distributions
The measure-theoretic scaffolding: sample spaces, sigma-algebras, probability measures, measurable maps, and the laws they induce.
Leads to: Every later probability and stochastic-calculus lesson lives on a probability space.
Learning Objectives
Click a status chip to cycle: Not started → In progress → Studied → Practiced → Needs review → Mastered.
- Define a probability space and verify the three axioms on a concrete example.
- Explain why a sigma-algebra, not the full power set, is the right domain of events.
- Define a random variable as a measurable map and compute the distribution (law) it induces.
- Derive the relationship between a CDF, a PDF, and a discrete PMF and interpret each.
Key Vocabulary
- Sample space
- The set \(\Omega\) of all elementary outcomes of an experiment.
- Sigma-algebra
- A collection \(\F\) of subsets of \(\Omega\) closed under complement and countable union, containing \(\Omega\); the admissible events.
- Probability measure
- A set function \(\Prob:\F\to[0,1]\) with \(\Prob(\Omega)=1\) that is countably additive on disjoint events.
- Random variable
- A measurable map \(X:\Omega\to\R\): preimages of Borel sets are events.
- Distribution (law)
- The pushforward measure \(\mu_X(B)=\Prob(X\in B)\) on \(\R\); all a random variable’s probabilistic content.
- CDF
- \(F_X(x)=\Prob(X\le x)\): non-decreasing, right-continuous, with limits 0 and 1.
Intuition & Motivation
Why bother with sigma-algebras? Because for uncountable \(\Omega\) (like the reals) you cannot assign a consistent probability to every subset. Restricting to a sigma-algebra keeps the theory coherent while still containing every event you would ever want to measure.
The three ingredients
From these follow \(\Prob(A^c)=1-\Prob(A)\), monotonicity, and continuity from below and above - the everyday rules of probability, now on a rigorous footing.
Random variables and their laws
The law of \(X\) is the measure \(\mu_X\) on \(\R\) defined by pushing \(\Prob\) forward:
Two random variables on different spaces can share a law; probabilistic statements about \(X\) depend only on \(\mu_X\), summarized by the CDF \(F_X(x)=\Prob(X\le x)\).
Densities and mass functions
If \(F_X\) is absolutely continuous, \(X\) has a density \(f_X=F_X'\) with \(\Prob(a\le X\le b)=\int_a^b f_X\,dx\). If \(X\) takes countably many values, its PMF is \(p_X(x)=\Prob(X=x)\). Both are special cases of a density with respect to a reference measure (Lebesgue or counting).
Interactive: distributions and their shape
Manipulate a distribution and watch its CDF and density respond. Notice how the area under the density equals the CDF.
- Treating a random variable as ‘a number that changes randomly’ - it is a fixed measurable function; only the drawn \(\omega\) is random.
- Assuming every subset of \(\Omega\) is an event. For uncountable \(\Omega\) only sets in \(\F\) are measurable.
- Confusing the density value \(f_X(x)\) with a probability; \(f_X(x)\) can exceed 1. Only integrals of \(f_X\) are probabilities.
- Forgetting right-continuity of the CDF: \(\Prob(X\le x)\) includes the atom at \(x\), while \(\Prob(X\lt x)\) does not.
- When two models ‘feel’ different but share a CDF, they are probabilistically identical - work with the law, not the space.
- Inverse-CDF sampling \(X=F^{-1}(U)\) with \(U\sim\)Uniform is the workhorse of Monte Carlo pricing.
- Always check a proposed \(F\) against the four CDF properties before trusting a derivation built on it.
Practice this in the Euler Lab
Computational problems that exercise exactly this technique. Each opens in the Euler Lab with a Python workbench, a progressive hint ladder, and answer checking. Tier A/B run at full scale in the browser.
Warm-up:
#49 Prime Permutations (3%, tier A) #53 Combinatoric Selections (3%, tier A) #59 XOR Decryption (4%, tier A) #29 Distinct Powers (5%, tier A)
Applied:
#336 Maximix Arrangements (16%, tier B) #938 Exhausting a Colour (16%, tier B) #265 Binary Circles (17%, tier B)
Challenge:
#161 Triominoes (41%, tier C) #182 RSA Encryption (41%, tier C)
280 Project Euler problems in total are mapped to this lesson. Open the Euler Lab to filter them all.
Knowledge Check
Practical Exercise
Let \(\Omega=\{1,2,3,4,5,6\}^2\) model two fair dice with \(\Prob\) uniform. Let \(S(\omega)=\) the sum. (a) Give the PMF of \(S\). (b) Compute \(F_S(4)\). (c) Explain why \(\{S=7\}\) is an event and \(\Prob(S=7)=1/6\).
(a) By counting the 36 equally likely pairs, the PMF is:
So \(p_S(2)=1/36,\ p_S(3)=2/36,\dots,p_S(7)=6/36,\dots,p_S(12)=1/36\).
(b) \(F_S(4)=\Prob(S\le 4)=p_S(2)+p_S(3)+p_S(4)=(1+2+3)/36=6/36=1/6.\)
(c) \(\Omega\) is finite, so \(\F\) is its power set and every subset - including \(\{S=7\}\) - is an event. There are 6 pairs summing to 7, hence \(\Prob(S=7)=6/36=1/6\).
Lesson Summary
Formula Sheet Additions
- Did I verify measurability before calling a map a random variable?
- Did I keep density (a rate) distinct from probability (an integral)?
- Did I respect right-continuity when handling atoms of the CDF?
Retrieval Practice
Close the lesson and answer from memory before checking. This is deliberate, effortful recall - the single highest-yield study action.
A: Non-negativity \(\Prob(A)\ge0\); normalization \(\Prob(\Omega)=1\); countable additivity on disjoint events.
A: The pushforward measure \(\mu_X(B)=\Prob(X\in B)\); it captures all probabilistic information, independent of the underlying space.
A: CDF \(F=\Prob(X\le x)\); PDF \(f=F'\) for continuous laws with \(\Prob(a\le X\le b)=\int_a^b f\); PMF \(p(x)=\Prob(X=x)\) for discrete laws (jumps of F).
Flashcards
Click to flip. These feed the site-wide spaced-repetition queue.
Completion Checklist
- I can explain the core ideas in my own words
- I worked the derivations/examples by hand
- I completed the interactive workbench(es)
- I passed the knowledge check
Source References
This lesson synthesizes and paraphrases concepts from the sources below. No copyrighted text, problem sets, or solutions are reproduced. Return to the originals for full depth.
- Probability: Theory and Examples (Rick Durrett, 5th ed.) current - Ch. 1 - Ch. 1: probability spaces, random variables, distribution functions.
- Measure, Integration & Real Analysis (Sheldon Axler, GTM 282) current - Ch. 2 - Measure-theoretic foundations: sigma-algebras and measurable functions.