Random Variables and Probability Distributions
A random variable is the hinge that turns the abstract machinery of probability into ordinary calculus. Probability theory begins austere: a sample space of elementary outcomes, a -algebra of events, and a measure obeying the axioms. Nothing in that triple mentions numbers. A random variable supplies them — it is a function that reads a real number off each outcome, subject to one technical demand: the preimage of every half-line must be an event, , so that always makes sense. That single condition, measurability, is what lets us forget entirely and work on the real line. Once is in hand, all its probabilistic content is the push-forward measure: how redistributes itself along . The cleanest packaging of that measure is the cumulative distribution function — a non-decreasing, right-continuous climb from to that every random variable possesses. From its shape the two familiar species emerge. A staircase is a discrete variable, described by a probability mass function; an absolutely continuous is a continuous variable, described by a density . Mixed and singular cases exist too, which is exactly why the CDF, not the PMF or PDF, is the fundamental object. This is where statistical physics, quantum measurement, and error analysis all plug in. The Boltzmann factor is a density over energies; is a density over positions; detector counts obey a mass function. Master the random variable, and the named families — Bernoulli, Poisson, Gaussian — and the Central Limit Theorem become variations on one theme.
- A random variable is a measurable map : it labels each outcome with a number so that the preimage of every interval is an event with a well-defined probability.
- Its distribution is captured completely by the cumulative distribution function — non-decreasing, right-continuous, rising from to .
- Discrete variables carry a probability mass function that sums to ; continuous ones carry a density that integrates to .
- A density is not a probability: has units of inverse length, can exceed , and for a continuous variable. Only and integrals mean anything.
- The CDF is universal — it exists for discrete, continuous, and mixed variables alike — and it drives change-of-variables, sampling, and every downstream summary.
- Key idea: a random variable is a measurable map ; its entire probabilistic content is the push-forward measure on , summarized universally by the CDF and specialized to a PMF (discrete) or a PDF (continuous).
Where this lives today
The random variable is the load-bearing abstraction of computational physics. Every Monte Carlo simulation — lattice QCD sampling gauge-field configurations, statistical-mechanics codes exploring a canonical ensemble, radiation-transport codes tracing neutrons — is machinery for drawing random variables from a target distribution, and inverse-transform and rejection sampling both run on the CDF exactly as in Example 2. At the LHC, event generators synthesize billions of collisions by pushing pseudo-random uniforms through the distributions of decay times and momenta, then compare the histograms against detector counts that are themselves Poisson random variables. In quantum mechanics the Born rule is the statement that a measurement outcome is a random variable whose density is , with normalization the density condition (5). The open frontier is high-dimensional sampling: drawing from distributions over millions of variables, where Hamiltonian Monte Carlo and diffusion-model samplers are actively reshaping how physics simulations are done.
The physical picture
Think of as a measuring instrument wired to the universe. Nature selects an outcome — a coin lands, a nucleus decays, a photon strikes a detector — and the instrument reports a number . The randomness lives entirely in the choice of ; the rule itself is fixed and deterministic. The distribution of answers the only question that survives this reading: how often does the needle land in each range? The map from to is a deliberate forgetting — two utterly different physical setups can push forward to the same distribution, which is precisely why a handful of named laws describe enormous swaths of physics. The cumulative distribution function is a running tally. Sweep the threshold from to and accumulates every scrap of probability seen so far, climbing monotonically from to . A vertical jump is an atom — a single value carrying positive probability, the fingerprint of a discrete variable. A smooth rise is spread-out probability, and its local slope is the density. Because both features live inside one function, the CDF is the single descriptor that works for every random variable, and reading off jumps versus slopes recovers the PMF versus the PDF.
The density itself is best pictured as mass smeared along a wire of unit total mass. Asking the density at a point is like asking the mass-per-length there; asking the probability of one exact value is like asking the mass of a single dimensionless point — which is zero. Only segments of the wire carry weight. This is the source of the field's most persistent confusion: is probability per unit length, so it can spike arbitrarily high near a sharp peak while every single point still has probability zero. The concrete distribution physicists reach for first is the exponential — the waiting-time law of radioactive decay and Poisson arrivals — and its density and CDF make the whole story quantitative.
The core equations
The definition is the entire subject in one line: a random variable is a function on outcomes, constrained so that thresholding it always yields an event. Without measurability the symbol would be meaningless; with it, every question about is a legitimate probability.
where: — sample space of elementary outcomes; — the -algebra of events (measurable subsets of ); — a single outcome; — the real value the variable assigns to . Read it as: whatever threshold you pick, the set of outcomes landing at or below it is something can measure. Measurability is what lets us leave behind. All the probability that carries is repackaged as a single function of the real threshold — the cumulative distribution function, the honest universal descriptor of the distribution.
where: — the CDF of ; — the probability measure on ; — the threshold value on the real line. The value is the total probability that has accumulated by the time the sweep reaches . Not every function can be a CDF. Four properties, forced directly by the probability axioms, characterize exactly which ones are — and Derivation A proves each from the continuity of the measure.
where: the two limits fix the endpoints at and ; monotonicity encodes that accumulated probability never decreases; — the right-hand limit, equal to , so a CDF is right-continuous. The left limit need not agree: a gap is a jump, and it equals . When is a staircase, all the probability sits on a countable set of points, and the natural descriptor is the probability mass function — the jump heights themselves.
where: — the PMF, the probability of each attainable value; — the countable support points of . The masses are non-negative and exhaust the unit probability. Bernoulli, binomial, and Poisson variables all live here. When instead rises smoothly, its derivative is the probability density, and probabilities become integrals. The infinitesimal reading — is the probability of the sliver — is the one to keep in mind, because it exposes that a density carries units of inverse length.
where: — the PDF, probability per unit length, ; — the interval endpoints. There is no constraint ; only integrals of are pinned to . Uniform, exponential, and Gaussian variables live here. Physics constantly relabels its variables — energy to momentum, position to angle — and the density must transform to keep total probability at one. The rule carries a Jacobian factor precisely because has units of inverse length; the CDF, being dimensionless accumulated probability, does not. Derivation B builds it from that conservation law.
where: — a strictly monotone, differentiable map; — its inverse; — the Jacobian that stretches or compresses the density so probability is conserved and . The absolute value covers both increasing and decreasing . Finally, to compress a distribution into a single number, one averages a function of against its law. The same formula, sum or integral, governs the mean, the variance, and every higher moment — the subject of the article this one leads into.
where: — the expectation operator; — any measurable function of . This is the law of the unconscious statistician: to average you never need the distribution of itself, only that of .
The goal is to prove that the four defining properties of a cumulative distribution function — the limits to zero and one, monotonicity, and right-continuity, together with the atom formula for jumps — are not conventions but forced consequences of the probability axioms applied to nested families of events. Each property is a statement about how the measure behaves along an increasing or decreasing chain of sets, and the tool throughout is the continuity of : the measure of a monotone limit of events is the limit of their measures. We take the four in turn and read each off the appropriate chain.
Step 1. For the endpoint limits, consider the events . As these shrink to the empty set , and as they grow to fill ; continuity of the measure then gives and respectively. Why: a probability measure assigns to the impossible event and to the certain one, and continuity lets those endpoint values transfer to the limit of the CDF.
Step 2. For monotonicity, note that if then , since any outcome at or below is automatically at or below . Monotonicity of on nested sets gives immediately. Why: enlarging the threshold can only add outcomes to the tallied event, never remove them, so accumulated probability cannot decrease.
Step 3. For right-continuity, write , a decreasing intersection of events. Continuity from above of yields , which is exactly the statement . Why: the threshold is inclusive of the endpoint, so approaching from the right must recover the value at itself, not overshoot it.
Step 4. For the atom formula, approach from the left instead: gives the left limit , so the jump is . Why: the discrepancy between the inclusive and exclusive thresholds is precisely the probability sitting exactly at — the height of the staircase step. *Verified: reproduces the standard characterization in Grimmett & Stirzaker and Feller Vol. I; the jump equals and vanishes wherever is continuous.*
Go deeper · Derivation B · 1 minThe change-of-variables Jacobian from conservation of probability
The goal is to derive the transformation law for a probability density under a smooth, strictly monotone relabeling , and to see why a Jacobian factor is unavoidable in the density while entirely absent from the CDF relation. The physical principle driving the whole calculation is that probability is conserved under any invertible relabeling of the outcomes: the chance that lands in a set must equal the chance that lands in the image of that set. We enforce this at the level of the CDF, where it is exact and factor-free, and then differentiate to descend to densities, where the stretching of the axis leaves its mark.
Step 1. Take strictly increasing first. Then as events, so equating their probabilities gives . Why: for an increasing map, thresholding at is identical to thresholding at , so the accumulated probabilities coincide with no correction whatsoever — the CDF simply composes with .
Step 2. Differentiate this identity with respect to using the chain rule: , and for increasing the derivative is positive. Why: the density is the slope of the CDF, so differentiating a composed function drags down the Jacobian , which measures how much the -axis is stretched relative to the -axis.
Step 3. For strictly decreasing , the inequality flips: , so and differentiating gives , where now . Both cases collapse into one by taking the absolute value, . Why: a density can never be negative, and the absolute value is exactly the bookkeeping that keeps while conserving total probability, regardless of whether the map preserves or reverses orientation. *Verified: matches the change-of-variables treatment in Riley-Hobson-Bence ch. 30 and Arfken & Weber; by the substitution rule.*
Go deeper · Derivation C · 1 minThe exponential distribution from normalization to median
The goal is to take a single concrete continuous law — the exponential density for and zero otherwise, with rate — and carry it through the full life cycle every distribution demands: confirm it is a legitimate density by normalizing it, integrate it into its CDF, and locate its median. The exponential is the canonical waiting-time law, governing the interval between radioactive decays or Poisson-distributed detector clicks, so pinning down these three quantities is the working physicist's first calculation with any new distribution.
Step 1. Normalize. Integrate the density over its support: . Since everywhere and integrates to one, it is a valid density. Why: normalization is the non-negotiable membership test for a PDF — it is the continuous echo of "the probabilities sum to one" — and it fixes the prefactor uniquely.
Step 2. Build the CDF by accumulating the density up to : for , and for . This rises from , is right-continuous and strictly increasing, and tends to — every CDF axiom satisfied. Why: the CDF is the running integral of the density, so this step both delivers the distribution's universal descriptor and re-verifies the four properties of Derivation A on a live example.
Step 3. Find the median by solving : . The mean, by contrast, is , strictly larger than the median. Why: the median splits the probability into two equal halves while the mean is pulled rightward by the long exponential tail — the gap is the quantitative signature of the distribution's right skew. *Verified: mean , median , CDF — all standard textbook values, reconfirmed numerically for (median , mean ).*
Limiting cases
The CDF is a single object that specializes to every familiar form according to its regularity — the reason it, and not the PMF or PDF, deserves the title of fundamental descriptor.
| Case | Result | Meaning |
|---|---|---|
| Purely discrete | Staircase CDF; takes a countable set of values with masses . Bernoulli, binomial, Poisson. | |
| Purely continuous | Absolutely continuous CDF with density where the derivative exists. Uniform, exponential, Gaussian. | |
| Mixed | Jumps and smooth growth combined — e.g. a censored measurement piling probability at a boundary plus a continuous spread inside. | |
| Degenerate (constant) | The zero-variance limit: a sure value. The CDF is a single Heaviside step — the endpoint of the laws of large numbers. |
Worked examples
1 · Waiting time for a radioactive decay (fully worked)
A radioactive source decays at rate , so the waiting time to the next decay is exponential with that rate. Find the mean and median waiting times, the probability of waiting longer than one second, and the probability of a decay within the first half-second.
Step 1. The mean waiting time is the reciprocal of the rate: . This is the "expected" interval between clicks, but because the distribution is skewed it is not the fifty-fifty point.
Step 2. The median is . Half of all waiting intervals are shorter than s even though the mean is s — the long tail of occasional long waits drags the mean above the median, the right-skew made numerical.
Step 3. The probability of waiting longer than one second is the survival function . Roughly one interval in seven exceeds a full second.
Step 4. The probability of a decay within the first half-second is . Notice this is just above one-half, consistent with s lying just past the median s. Mean 0.5 s, median 0.347 s, Pr(X>1)=0.135, Pr(X≤0.5)=0.632.
2 · Inverse-transform sampling (change of variables)
A computer supplies uniform on , with density there. Show that is exponential with rate — the trick behind Monte Carlo event generators.
Step 1. Identify the map and invert it. Here is strictly increasing on , and solving for gives the inverse — which is exactly the exponential CDF, no accident, since inverse-transform sampling is built from .
Step 2. Differentiate the inverse to get the Jacobian: , which is positive for all , as it must be for an increasing map.
Step 3. Apply the transformation law (6): for . The uniform density is , so the entire shape of the output distribution comes from the Jacobian. X is exponential(λ): f_X(x)=λe^(−λx). This is why feeding a stream of uniform random numbers through synthesizes samples from any target distribution whose CDF you can invert.
Physics of the portrait
The random variable as we use it — a measurable function whose distribution is a push-forward measure — is barely ninety years old, even though physicists computed with probabilities for three centuries before it. The clean definition, and the axioms that make it rigorous, are the work of one mathematician who set out to give probability the same footing as geometry.
Origins · 1 minAndrey Kolmogorov and how this was discovered
For two and a half centuries probability was a collection of brilliant but ad hoc calculations — Huygens on fair games, Bernoulli on the law of large numbers, Laplace on the whole classical edifice — without an agreed definition of what a probability was. Paradoxes multiplied whenever the sample space became infinite, and Hilbert listed the axiomatization of probability among his famous problems in 1900. The resolution came from Andrey Nikolaevich Kolmogorov, working in Moscow at the height of a school that had just made Lebesgue's measure theory its own. In his 1933 monograph Grundbegriffe der Wahrscheinlichkeitsrechnung — "Foundations of the Theory of Probability" — Kolmogorov identified a probability with a normalized measure on a -algebra of events, and, decisively for this article, defined a random variable as a measurable function from the sample space to the reals. At a stroke the distribution became a push-forward measure, the CDF its universal fingerprint, and the whole apparatus of Lebesgue integration became available for expectations and limit theorems. Kolmogorov's reach extended far beyond foundations — turbulence, dynamical systems, algorithmic complexity, and the in KAM theory all bear his name — but it is the 1933 axioms that let a physicist write and mean something exact. Every distribution in this chapter is a measure in his sense.
Going further
Texts. Stone & Goldbart, Mathematics for Physics, ch. on probability and statistics · Arfken & Weber, Mathematical Methods for Physicists, ch. on probability · Riley, Hobson & Bence, Mathematical Methods for Physics and Engineering, ch. 30 (Probability) · Feller, An Introduction to Probability Theory and Its Applications, Vol. I · Grimmett & Stirzaker, Probability and Random Processes · Kolmogorov, Foundations of the Theory of Probability (1933, English 1956) for the axioms themselves.
Provenance. All CDF, PMF, and PDF properties are standard (Stone & Goldbart; Arfken & Weber; Riley-Hobson-Bence ch. 30; Grimmett & Stirzaker; Feller Vol. I). A verifier should recompute: (1) the four CDF properties from continuity of the measure, with jump ; (2) the change-of-variables law from ; (3) exponential normalization , CDF , mean , median ; (4) the worked decay numbers at : mean s, median s, , ; (5) inverse-transform sampling reproducing from a uniform seed. No nonstandard constants are asserted.
Prerequisites. Axioms of Probability · Conditional Probability and Bayes' Theorem. Leads to. Cumulative Distribution Functions and Change of Variables · Expectation, Variance and Moments · Gaussian (Normal) Distribution · Central Limit Theorem.
Ask the tutor: Want to see how the CDF you just met turns a stream of uniform random numbers into a Gaussian, or how it seeds a Monte Carlo simulation? Ask me to walk through inverse-transform sampling or the change-of-variables recipe step by step.
What is the difference between a random variable and its distribution?
The random variable is the function — the rule that reads a number off each outcome. Its distribution is the pattern of how often those numbers fall in each range, formally the push-forward measure summarized by the CDF . Two different random variables, even built on different sample spaces, can share one distribution: a coin-flip counter and a dice-parity indicator are both Bernoulli. Physics almost always cares only about the distribution, which is why we can forget once measurability guarantees the CDF exists.
Why insist on the measurability condition — does anything really go wrong without it?
Without measurability the symbol can be genuinely undefined. For finite or countable sample spaces every subset is an event and the condition is automatic, so it looks like pedantry. But on continuous spaces there exist non-measurable sets — pathological subsets of the reals with no consistent probability — and a function landing you inside one would make a set to which assigns no value. Requiring the preimage of every half-line to be an event rules this out and guarantees the CDF is well-defined everywhere. It is the minimal price for doing calculus with probability rigorously.
If Pr(X = x) = 0 for every point, how can X take any value at all?
This feels paradoxical but is not. For a continuous variable, probability is spread over intervals, not concentrated on points — like mass smeared along a wire, where any single dimensionless point has zero mass yet every segment has positive mass. When is realized it does land on some exact value, but the probability was always a statement about neighborhoods: is positive for any finite sliver. The individual outcome has probability zero the same way a specific real number drawn uniformly from does — improbable in advance, certain to be something after the fact.
Why is the CDF, rather than the PDF or PMF, called the fundamental descriptor?
Because the CDF exists for every random variable without exception — discrete, continuous, mixed, or even the exotic singular-continuous case. A PMF requires the variable to live on a countable set; a PDF requires the distribution to be absolutely continuous. Neither exists in general, and a mixed variable (jumps plus a smooth part) has neither a pure PMF nor a pure PDF, yet its CDF is perfectly ordinary. The PMF is the set of jump heights of and the PDF is its derivative — both are special-case readings of the one object that always works.
Why does a Jacobian appear when I change variables in a density?
Because a density has units of inverse length, so it must rescale when you stretch the axis. Picture probability as conserved paint: relabeling to spreads the same total paint over a differently stretched line. Where expands a region, the same probability covers more length, so the density drops; where compresses, it rises. The factor is exactly the local stretch ratio that keeps the paint conserved. The CDF needs no such factor because it is dimensionless accumulated probability — it simply composes with , which is why deriving the rule from the CDF is the clean route.
How does this connect to expectation, moments, and the Gaussian?
Everything downstream is built on the distribution defined here. Summarizing a distribution by numbers — mean, variance, higher moments — is averaging powers of against its law via equation (7), the subject of the expectation-and-moments article. The named families (Bernoulli, Poisson, Gaussian) are simply distributions that recur in nature, and the Central Limit Theorem explains why sums of many independent random variables converge to the Gaussian regardless of their individual distributions. Each takes the CDF-and-density framework of this article as its starting point.