Same Distribution, Different Values
A random variable is a function on an outcome space. Its distribution records the probabilities assigned to its possible numerical values, but it does not record which particular outcome produced each value. Consequently, two random variables can have the same distribution even when they assign different values to the same outcome.
This distinction is central to distribution theory. Equality in distribution compares the probability laws of random variables; equality as functions compares their values outcome by outcome. These are different comparisons, and confusing them can lead to incorrect conclusions about what a distribution tells us.
Definition Through CDFs
Let \(X\) and \(Y\) be real-valued random variables, not necessarily defined on the same probability space. Write their cumulative distribution functions as \(F_X(x)=P(X\leq x)\) and \(F_Y(x)=P(Y\leq x)\), for every real number \(x\).
The phrase “for every \(x\)” matters: a match at a few thresholds does not establish equality in distribution. Nor is it enough for two random variables to have the same mean or variance. A CDF specifies the probabilities of all events of the form \(\{X\leq x\}\), and matching the entire CDF is what identifies the law.
By contrast, if \(X\) and \(Y\) are defined on the same outcome space \(\Omega\), equality as random variables means \(X(\omega)=Y(\omega)\) for every \(\omega\in\Omega\). A weaker relation is equality almost surely: \(P(X=Y)=1\). Equality almost surely implies equality in distribution, but equality in distribution alone does not imply either kind of pointwise agreement.
Worked Examples
Worked Example: A Fair Die and Its Reversed Labels
Let \(\Omega=\{1,2,3,4,5,6\}\), with each outcome having probability \(1/6\). Define \(X(\omega)=\omega\) and \(Y(\omega)=7-\omega\). Check whether the variables are equal in distribution, and whether they agree at every outcome.
For \(X\), the values \(1,2,3,4,5,6\) each occur with probability \(1/6\). For \(Y\), the corresponding values as \(\omega\) runs from 1 to 6 are \(6,5,4,3,2,1\), so its values \(1,2,3,4,5,6\) also each occur with probability \(1/6\).
In particular, both CDFs are
Thus \(X\overset{d}{=}Y\). But their values do not match at most outcomes: at \(\omega=1\), \(X(1)=1\) and \(Y(1)=6\). They happen to agree at \(\omega=3\), since both then equal 3. The same law does not require the same value on each outcome.
Worked Example: Two Bernoulli Variables on One Space
Let \(\Omega=\{1,2,3,4\}\), with each outcome having probability \(1/4\). Define \(X\) to be 0 on outcomes 1 and 2 and 1 on outcomes 3 and 4. Define \(Y\) to be 0 on outcomes 1 and 3 and 1 on outcomes 2 and 4. Compare their distributions and their values.
For each variable, the probability of 0 is \(2/4=1/2\), and the probability of 1 is also \(2/4=1/2\). Therefore, for either variable the CDF is
The CDFs match at every real \(x\), so \(X\overset{d}{=}Y\). Nevertheless, \(X\) and \(Y\) differ at outcomes 2 and 3: at outcome 2, \(X=0\) and \(Y=1\); at outcome 3, \(X=1\) and \(Y=0\). Since these outcomes together have probability \(2/4=1/2\), the variables are not equal almost surely either.
Worked Example: Equal Laws on Different Outcome Spaces
On \(\Omega_1=\{a,b\}\), assign probability \(1/2\) to each outcome and define \(X(a)=0\), \(X(b)=1\). On a separate space \(\Omega_2=\{r,s\}\), also assign probability \(1/2\) to each outcome and define \(Y(r)=0\), \(Y(s)=1\). Show that they have the same distribution, and explain what can and cannot be compared.
On either space, the probability of a value no greater than \(x\) is 0 for \(x<0\), \(1/2\) for \(0\leq x<1\), and 1 for \(x\geq1\). Thus their CDFs agree everywhere, and \(X\overset{d}{=}Y\).
The variables do not share an outcome space: \(X\) takes an input from \(\Omega_1\), while \(Y\) takes an input from \(\Omega_2\). There is therefore no outcome \(\omega\) on which to compare \(X(\omega)\) with \(Y(\omega)\). Equality in distribution is still well-defined because it compares their laws, not their inputs.
Two Useful Implications
Although equality in distribution is not pointwise equality, several implications clarify how it behaves. The first connects it to equality almost surely.
Proof. Fix any real \(t\). The events \(\{X\leq t\}\) and \(\{Y\leq t\}\) can differ only when \(X\neq Y\). In set notation,
where \(\triangle\) denotes symmetric difference. The right-hand event has probability zero, so the two events have the same probability. Hence \(F_X(t)=F_Y(t)\). Since \(t\) was arbitrary, their CDFs agree for every real threshold, and \(X\overset{d}{=}Y\). \(\square\)
The reverse implication fails, as the fair-die and Bernoulli examples show. Those variables have matching CDFs but have positive probability of taking different values. Equality almost surely is a stronger statement than equality in distribution.
Proof. Equality in distribution means the laws of \(X\) and \(Y\) agree on every Borel set. Let \(B\) be any Borel subset of \(\mathbb{R}\). Since \(g\) is Borel-measurable, its preimage \(g^{-1}(B)\) is Borel. Therefore,
The transformed variables assign the same probability to every Borel set, so their laws agree and their CDFs are equal. Thus \(g(X)\overset{d}{=}g(Y)\). \(\square\)
The measurability condition ensures that the events being compared are measurable. This result says that a transformation of the values depends, in distribution, on the original law—not on the particular outcome-space representation of a random variable.
What Equality in Distribution Does Not Say
A distribution describes the probabilities of a variable’s values, but it does not specify how two variables on the same space line up across outcomes. The die example has \(Y=7-X\), while the two Bernoulli variables were arranged to disagree on half the outcomes. Both pairs have matching marginal distributions, yet their outcome-by-outcome relationships differ.
This distinction is important whenever a question asks about a pair of random variables. Knowing that \(X\overset{d}{=}Y\) determines each variable’s law separately. It does not, by itself, determine whether they agree, how often they agree, or their joint behavior.
Common Mistake
Wrong reasoning: “\(X\) and \(Y\) have the same distribution, so \(X(\omega)=Y(\omega)\) for every outcome \(\omega\).”
Correction: Matching CDFs says that \(X\) and \(Y\) assign the same probabilities to values below every threshold. It does not match the values attached to each outcome. The fair-die construction verifies this directly: both variables are uniform on \(\{1,2,3,4,5,6\}\), but at outcome 1 their values are 1 and 6.
Check Your Understanding
Use the definition through CDFs and keep separate the law of a variable from its values on individual outcomes.
- What must be true of \(F_X(x)\) and \(F_Y(x)\) for \(X\overset{d}{=}Y\)?
- In the fair-die example, at which outcome do \(X\) and \(Y\) agree, and at which outcome do they differ?
- Can two random variables on different outcome spaces be equal in distribution? Explain what is being compared.
- Why does \(P(X=Y)=1\) imply \(X\overset{d}{=}Y\)?
- Does equality in distribution imply equality almost surely? Give a reason for your answer.