Skip to main content

01. Probability Spaces and Random Variables — Where Understanding Distributions Begins

Background 1/5. Every distribution in this series is ultimately "a measure induced by a random variable defined on a probability space." The goal of this page is to make that sentence completely interpretable.

Why begin with axioms?

Starting from intuition, such as "each face has probability 1/6 when a die is rolled," causes no problem in finite cases. But to handle objects such as the alpha-stable distributions that are the final goal of this series—where even the mean may not exist—we need a rigorous foundation for "what probability is." That foundation is Kolmogorov's axiomatic system, on top of which Gaussian, Beta, and alpha-stable distributions are all described in the same language.

Probability space

A probability space is a triple (Ω,F,P)(\Omega, \mathcal{F}, P).

1. Sample space Ω\Omega

The set of every possible outcome.

  • One coin toss: Ω={H,T}\Omega = \lbrace H, T \rbrace
  • One die roll: Ω={1,2,3,4,5,6}\Omega = \lbrace 1,2,3,4,5,6 \rbrace
  • Lifetime of a component: Ω=[0,)\Omega = [0, \infty) — an uncountably infinite set is also possible.

2. Event space F\mathcal{F} (sigma-algebra)

This is the collection of "questions whose probability can be asked." A collection of subsets of Ω\Omega satisfying the following three conditions is called a sigma-algebra (σ-algebra).

  1. ΩF\Omega \in \mathcal{F} — it must always be possible to ask whether "something happens."
  2. If AFA \in \mathcal{F}, then AcFA^c \in \mathcal{F} — if an event can be asked about, so can its complement.
  3. If A1,A2,FA_1, A_2, \dots \in \mathcal{F}, then i=1AiF\bigcup_{i=1}^{\infty} A_i \in \mathcal{F} — a countable union can also be asked about.
Why not use every subset?

When Ω\Omega is uncountable, like an interval of real numbers, it is known to be impossible to assign a consistent probability (a notion of length) to every subset (Vitali sets and the Banach–Tarski paradox). A σ-algebra therefore contains only "sets for which probability can safely be asked." On the real line, the Borel σ-algebra B(R)\mathcal{B}(\mathbb{R}) generated by open intervals is the standard choice.

3. Probability measure PP — Kolmogorov's axioms

P:F[0,1]P: \mathcal{F} \to [0,1] is a function satisfying three axioms.

  1. Non-negativity: P(A)0P(A) \ge 0 for every AFA \in \mathcal{F}
  2. Normalization: P(Ω)=1P(\Omega) = 1
  3. Countable additivity: for pairwise disjoint A1,A2,A_1, A_2, \dots,
P(i=1Ai)=i=1P(Ai)P\Big(\bigcup_{i=1}^{\infty} A_i\Big) = \sum_{i=1}^{\infty} P(A_i)

These three lines are all there is. Conditional probability, independence, Bayes' theorem, the law of large numbers, and the central limit theorem—everything that follows—is a logical consequence of these axioms.

Random variables

A random variable is often introduced as a "random value," but its exact definition is a function.

X:ΩRX : \Omega \to \mathbb{R}

Not every function qualifies: it must be measurable. For every Borel set BB(R)B \in \mathcal{B}(\mathbb{R}), the preimage X1(B)={ω:X(ω)B}X^{-1}(B) = \lbrace \omega : X(\omega) \in B \rbrace must belong to F\mathcal{F}. This condition is what makes the question "what is the probability that XX falls inside BB?" meaningful in the first place.

Distribution: the measure induced by a random variable

A random variable XX creates a new probability measure on the real line.

μX(B)=P(X1(B))=P(XB)\mu_X(B) = P(X^{-1}(B)) = P(X \in B)

This μX\mu_X is called the distribution (push-forward measure) of XX. It is precisely what "Gaussian distribution" or "Beta distribution" refers to. We can forget what the original probability space Ω\Omega was and perform every calculation using only the measure μX\mu_X on the real line.

Three ways to describe a distribution

Cumulative distribution function (CDF)

FX(x)=P(Xx)F_X(x) = P(X \le x)
  • Monotonically nondecreasing and right-continuous
  • limxFX(x)=0\lim_{x \to -\infty} F_X(x) = 0, limxFX(x)=1\lim_{x \to \infty} F_X(x) = 1
  • Every real-valued random variable has a CDF. A CDF always exists even when there is no density or no moments. A distribution such as an alpha-stable distribution, whose density has no closed form, is still completely defined by its CDF.

Probability mass function (PMF, discrete)

When XX takes only countably many values, pX(x)=P(X=x)p_X(x) = P(X = x) is sufficient. Bernoulli, binomial, and Poisson distributions belong here.

Probability density function (PDF, continuous)

If the CDF is absolutely continuous, there is a density fXf_X satisfying

FX(x)=xfX(t)dt,fX(x)=dFXdx(x)F_X(x) = \int_{-\infty}^{x} f_X(t)\, dt, \qquad f_X(x) = \frac{dF_X}{dx}(x)

Points to note:

  • fX(x)f_X(x) is not a probability. It is possible for fX(x)>1f_X(x) > 1 (for example, near the center of Beta(5,5)). Probability is always obtained through an integral.
  • In the continuous case, P(X=x)=0P(X = x) = 0 for every individual point.

Quantile function

This is the generalized inverse of the CDF, FX1(u)=inf{x:FX(x)u}F_X^{-1}(u) = \inf \lbrace x : F_X(x) \ge u \rbrace. When UUniform(0,1)U \sim \mathrm{Uniform}(0,1), the fact that FX1(U)F_X^{-1}(U) has the same distribution as XXinverse transform sampling—is a fundamental principle of random-number generation.

Joint distributions, independence, and conditioning

When handling several random variables X,YX, Y together:

  • Joint CDF: FX,Y(x,y)=P(Xx,Yy)F_{X,Y}(x,y) = P(X \le x, Y \le y)
  • Independence: FX,Y(x,y)=FX(x)FY(y)F_{X,Y}(x,y) = F_X(x) F_Y(y) for every x,yx, y. If densities exist, this is equivalent to fX,Y=fXfYf_{X,Y} = f_X f_Y.
  • Conditional density: fXY(xy)=fX,Y(x,y)/fY(y)f_{X \mid Y}(x \mid y) = f_{X,Y}(x,y) / f_Y(y)

Independence is a central assumption throughout this series. The "independent and identically distributed (i.i.d.)" condition in the central limit theorem uses this exact definition, and likelihood factorization in Bayesian inference comes from conditional independence.

Example: same distribution, different probability spaces

Let Ω=[0,1]\Omega = [0,1], let PP be the length measure (Lebesgue measure), and define X(ω)=ωX(\omega) = \omega. Then XUniform(0,1)X \sim \mathrm{Uniform}(0,1). On the other hand, define X(ω)=iωi2iX'(\omega) = \sum_i \omega_i 2^{-i} on Ω={H,T}\Omega' = \lbrace H,T \rbrace^{\infty} (infinitely many coin tosses), and the same Uniform(0,1)\mathrm{Uniform}(0,1) distribution appears. The probability spaces differ, but the distributions are the same. This is why distribution theory is powerful: it abstracts away details of the underlying space and leaves only a measure on the real line.

What to remember from this page

  1. Probability is an axiomatic system on (Ω,F,P)(\Omega, \mathcal{F}, P), and a distribution is the measure μX\mu_X pushed onto the real line by a random variable.
  2. A CDF always exists. A PDF may exist or may have no closed form (foreshadowing alpha-stable distributions).
  3. A density value is not a probability. Probability is an integral.
  4. Any distribution can be sampled using its quantile function and a uniform distribution.

Next step