Distribution of a Random Variable

A random variable X : \Omega \to \mathbb{R} carries the probability living on the abstract space \Omega over onto the real line. The distribution (or law) of X is the pushforward measure \mathbb{P}_X on \mathbb{R}:

\mathbb{P}_X(B) \;=\; \mathbb{P}\!\left(X \in B\right) \;=\; \mathbb{P}\!\left(\{\omega : X(\omega) \in B\}\right).

Once we have \mathbb{P}_X we can forget about \Omega entirely — every probabilistic question about X is answered on the real line. This is why the random variable is the bridge: it transports the measure to where we can compute with it.

The cumulative distribution function

It is awkward to specify a measure on every Borel set B, so we encode the whole law in one function. The cumulative distribution function (CDF) accumulates probability up to a point:

F(x) \;=\; \mathbb{P}(X \le x) \;=\; \mathbb{P}_X\big((-\infty,\,x]\big).

Three properties of F follow directly from the probability axioms. Let us derive each one, naming the event behind every step.

Interval probabilities by subtraction. Fix a < b. The outcomes with X \le b split cleanly into those already at most a and those strictly between, and the two pieces are disjoint:

\{X \le b\} = \{X \le a\} \;\sqcup\; \{a < X \le b\}.

Apply \mathbb{P}; additivity over the disjoint union turns it into a sum:

\mathbb{P}(X \le b) = \mathbb{P}(X \le a) + \mathbb{P}(a < X \le b).

Rewrite the two cumulative terms as values of F and solve for the middle piece:

F(b) = F(a) + \mathbb{P}(a < X \le b) \;\Longrightarrow\; \mathbb{P}(a < X \le b) = F(b) - F(a).

F is non-decreasing. Take any a \le b. The events nest, since being at most a certainly implies being at most b:

\{X \le a\} \subseteq \{X \le b\}.

Monotonicity of \mathbb{P} on nested events then gives the ordering of the values directly:

a \le b \;\Longrightarrow\; F(a) = \mathbb{P}(X \le a) \le \mathbb{P}(X \le b) = F(b).

(The same fact reads off the previous derivation: F(b) - F(a) = \mathbb{P}(a < X \le b) \ge 0.)

The end limits are 0 and 1. As x \to +\infty the events \{X \le x\} grow to fill the whole space, \{X \le x\} \uparrow \Omega, and continuity of probability along increasing limits gives

\lim_{x \to +\infty} F(x) = \mathbb{P}(\Omega) = 1.

As x \to -\infty the events shrink to nothing, \{X \le x\} \downarrow \emptyset, and the decreasing version gives

\lim_{x \to -\infty} F(x) = \mathbb{P}(\emptyset) = 0.

There is a fourth property — right-continuity, F(x) = \lim_{t \downarrow x} F(t) — which comes from the same continuity argument applied to (-\infty, x] = \bigcap_n (-\infty, x + \tfrac1n]; the vignette below explains why it is right-continuity, not left, that holds.

Why does the CDF use \le rather than <? The choice is what makes F right-continuous. The half-lines telescope from the right,

(-\infty, x] = \bigcap_{n=1}^{\infty} \left(-\infty,\; x + \tfrac1n\right],

so by continuity along the decreasing events \{X \le x + \tfrac1n\} \downarrow \{X \le x\},

\lim_{n \to \infty} F\!\left(x + \tfrac1n\right) = F(x).

Approaching from the left, however, \{X \le x - \tfrac1n\} \uparrow \{X < x\}, so the left limit is F(x^{-}) = \mathbb{P}(X < x), and the gap is exactly the probability piled on the point itself,

F(x) - F(x^{-}) = \mathbb{P}(X = x).

Such a point of positive mass is an atom: the CDF makes a vertical jump of height \mathbb{P}(X = x) there, and the closed top of the jump (from \le) is where the value F(x) sits. A purely discrete law is all jumps (the dice staircase below); a purely continuous law has none. A mixed law has both — for example an insurance payout that is 0 with probability \tfrac12 (an atom at 0) and otherwise spread continuously over positive amounts. Its CDF jumps at 0 and then rises smoothly: neither a staircase nor a smooth curve, but a blend of the two.

The cumulative distribution function F(x) = \mathbb{P}(X \le x) of any random variable is non-decreasing, right-continuous, and satisfies \lim_{x \to -\infty} F(x) = 0, \lim_{x \to +\infty} F(x) = 1. Conversely, any function with these properties is the CDF of some random variable. Interval probabilities are recovered by subtraction, \mathbb{P}(a < X \le b) = F(b) - F(a), and the jump at a point measures its atom, F(x) - F(x^{-}) = \mathbb{P}(X = x).

Two flavours: discrete and continuous

When X lands on a countable set of values the law is described by a probability mass function (PMF) p(x) = \mathbb{P}(X = x), and the CDF is a staircase that jumps by p(x) at each value:

F(x) = \sum_{x_k \le x} p(x_k), \qquad \sum_k p(x_k) = 1.

When F is instead smooth, the law has a probability density function (PDF) f \ge 0 with

F(x) = \int_{-\infty}^{x} f(t)\,dt, \qquad \int_{-\infty}^{\infty} f(t)\,dt = 1.

Here a single point carries no probability (\mathbb{P}(X = x) = 0), so {<} and {\le} coincide.

A worked staircase: the sum of two dice

Roll two fair dice and let X be their sum. The PMF is the familiar triangle (the sum 7 is most likely, with p(7) = \tfrac{6}{36}), so the CDF is a staircase: flat between integers, jumping by p(k) at each k, rising from 0 up to 1. Read off any interval probability by subtraction, e.g. \mathbb{P}(4 < X \le 7) = F(7) - F(4).

Let us compute a few CDF values from the masses (counts out of 36). The lowest sums are p(2) = \tfrac{1}{36} (only (1,1)), p(3) = \tfrac{2}{36} ((1,2), (2,1)), and p(4) = \tfrac{3}{36} ((1,3), (2,2), (3,1)). Accumulating these:

F(2) = p(2) = \tfrac{1}{36}, \qquad F(3) = p(2) + p(3) = \tfrac{1}{36} + \tfrac{2}{36} = \tfrac{3}{36}, F(4) = \tfrac{1}{36} + \tfrac{2}{36} + \tfrac{3}{36} = \tfrac{6}{36} = \tfrac{1}{6}.

Because F is flat between integers, a fractional argument just reads the last integer reached: F(3.5) = F(3) = \tfrac{3}{36}, while F(4) = \tfrac{6}{36} already includes the jump at 4 (right-continuity — the value sits at the top of the step). Now an interval probability falls straight out by subtraction, e.g.

\mathbb{P}(3 < X \le 4) = F(4) - F(3) = \tfrac{6}{36} - \tfrac{3}{36} = \tfrac{3}{36} = p(4),

which is exactly the single mass at 4, as it should be.

See it explained