From Preimages to Laws
A random variable’s distribution is determined by how much probability its inverse images carry. This gives a direct method for discrete examples, and it also handles transformations such as squaring or taking an absolute value: to find the distribution after transforming, calculate the preimage of each event of interest. Independence is likewise an event-probability question. Marginal laws are not enough; joint event probabilities must factor.
Throughout, a probability space is \((\Omega,\mathcal{F},\mathbb{P})\), where \(\mathbb{P}(\Omega)=1\). Random variables in this tutorial are measurable, real-valued functions on that space. If \(X\) is a random variable, its law is a measure on \((\mathbb{R},\mathcal{B}_{\mathbb{R}})\). Its cumulative distribution function is \(F_X(t)=\mathbb{P}(X\leq t)\), for \(t\in\mathbb{R}\). All probabilities below are exact; endpoints are included or excluded according to the event being measured.
This definition does give a probability measure: preimages preserve complements and countable unions, and the preimages of pairwise disjoint sets are pairwise disjoint. In particular, for disjoint Borel sets \(C_1,C_2,\ldots\), countable additivity of \(\mathbb{P}\) gives \(\mathbb{P}_X(\bigcup_j C_j)=\sum_j\mathbb{P}_X(C_j)\); also, \(\mathbb{P}_X(\mathbb{R})=\mathbb{P}(\Omega)=1\).
Proof. For each \(\omega\in\Omega\), \(g(X(\omega))\in C\) holds exactly when \(X(\omega)\in g^{-1}(C)\). Hence the two events \(\{\omega:g(X(\omega))\in C\}\) and \(\{\omega:X(\omega)\in g^{-1}(C)\}\) are equal. Taking their probabilities proves the identity. Borel measurability of \(g\) ensures that \(g^{-1}(C)\) is Borel, and measurability of \(X\) ensures its preimage is in \(\mathcal{F}\). \(\square\)
Identifying a Discrete Law
Worked Example: Read the Law from the Fibres
Let \(\Omega=\{1,2,3,4,5,6,7,8\}\), let \(\mathcal{F}\) be its power set, and give each outcome probability \(1/8\). Define \(X\) to be \(0\) on \(\{1,2,3\}\), \(1\) on \(\{4,5\}\), and \(2\) on \(\{6,7,8\}\). Find its law and cumulative distribution function.
The three preimages of singleton values are \(X^{-1}(\{0\})=\{1,2,3\}\), \(X^{-1}(\{1\})=\{4,5\}\), and \(X^{-1}(\{2\})=\{6,7,8\}\). Counting the outcomes in each set gives \(\mathbb{P}_X(\{0\})=3/8\), \(\mathbb{P}_X(\{1\})=2/8=1/4\), and \(\mathbb{P}_X(\{2\})=3/8\). All other singleton values have probability zero. The probabilities sum to \(3/8+1/4+3/8=3/8+2/8+3/8=1\).
For the cumulative distribution function, the event is \(X\leq t\). If \(t<0\), it is empty. For \(0\leq t<1\), it consists of the three outcomes where \(X=0\), so its probability is \(3/8\). For \(1\leq t<2\), it consists of five outcomes, giving \(5/8\). For \(t\geq2\), it is all eight outcomes, giving \(1\). Thus \(F_X(t)\) takes these four values on the stated intervals. Check: at \(t=0\), the inclusive event \(X\leq0\) has probability \(3/8\); at \(t=1\), \(X\leq1\) has probability \(5/8\); and at \(t=2\), it has probability \(8/8=1\). The jumps match the three singleton probabilities.
Transforming a Uniform Variable
Worked Example: The Law of the Square of a Uniform Variable
Let \(\Omega=[0,1]\), \(\mathcal{F}=\mathcal{L}|_{[0,1]}\), and \(\mathbb{P}(E)=m(E)\) for measurable \(E\subseteq[0,1]\). The probability space is normalized because \(m([0,1])=1\). Let \(U(\omega)=\omega\) and \(Z=U^2\). Find \(F_Z\).
For \(t<0\), no \(u\in[0,1]\) satisfies \(u^2\leq t\), so \(F_Z(t)=0\). If \(0\leq t\leq1\), then \(u\geq0\) on the sample space, and \(u^2\leq t\) is equivalent to \(u\leq\sqrt{t}\). Therefore \(Z^{-1}((-\infty,t])=[0,\sqrt{t}]\), whose Lebesgue measure is \(\sqrt{t}\). If \(t\geq1\), every \(u\in[0,1]\) satisfies \(u^2\leq t\), so \(F_Z(t)=1\). In full, \(F_Z(t)=0\) for \(t<0\), \(F_Z(t)=\sqrt{t}\) for \(0\leq t\leq1\), and \(F_Z(t)=1\) for \(t\geq1\).
Check: at \(t=1/4\), the preimage is \([0,1/2]\), so \(F_Z(1/4)=m([0,1/2])=1/2=\sqrt{1/4}\). At \(t=1\), the preimage is \([0,1]\) and the probability is \(1\), as required. Whether the right endpoint is included does not change these probabilities, since a singleton has Lebesgue measure zero.
Worked Example: The Absolute Deviation from the Midpoint
On the same uniform probability space, set \(W=|2U-1|\). Find its cumulative distribution function by solving the preimage condition.
Since \(W\geq0\), \(F_W(t)=0\) when \(t<0\). For \(0\leq t\leq1\), the inequality \(|2u-1|\leq t\) is equivalent to \(-t\leq2u-1\leq t\). Adding \(1\) and dividing by \(2\) gives \((1-t)/2\leq u\leq(1+t)/2\). Both endpoints lie in \([0,1]\), and the interval has length \((1+t)/2-(1-t)/2=t\). Therefore \(F_W(t)=t\) on \([0,1]\). For \(t\geq1\), every \(u\in[0,1]\) satisfies \(W\leq t\), so \(F_W(t)=1\).
Check: at \(t=1/2\), the preimage interval is \([1/4,3/4]\), of length \(3/4-1/4=1/2\). At \(t=0\), the preimage is the single point \(\{1/2\}\), which has probability zero, agreeing with \(F_W(0)=0\). The result happens to be the uniform distribution on \([0,1]\), but that conclusion came from the preimage calculation, not from uniformity of \(U\) alone.
Checking Independence by Joint Probabilities
Two real-valued random variables \(X,Y\) are independent when \(\mathbb{P}(X\in C,Y\in D)=\mathbb{P}(X\in C)\mathbb{P}(Y\in D)\) for every pair of Borel sets \(C,D\subseteq\mathbb{R}\). For finite-valued variables, it is enough to check this identity for every pair of singleton values. The following proposition justifies that finite calculation.
Proof. If \(X,Y\) are independent, apply the definition to the Borel singleton sets \(\{x\}\) and \(\{y\}\) to obtain the displayed equalities. Conversely, suppose the equalities hold for every \(x\in S,y\in T\). For any Borel sets \(C,D\), the events \(X\in C\) and \(Y\in D\) correspond to the subsets \(S_C=S\cap C\) and \(T_D=T\cap D\) of the finite ranges. The joint event is the disjoint union of the events \(\{X=x,Y=y\}\) over \(x\in S_C,y\in T_D\). Finite additivity and the assumed equalities give \(\mathbb{P}(X\in C,Y\in D)=\sum_{x\in S_C}\sum_{y\in T_D}\mathbb{P}(X=x)\mathbb{P}(Y=y)\). The finite double sum factors as \((\sum_{x\in S_C}\mathbb{P}(X=x))(\sum_{y\in T_D}\mathbb{P}(Y=y))=\mathbb{P}(X\in C)\mathbb{P}(Y\in D)\). Empty subsets give zero on both sides, so the identity also holds when either event is impossible. This proves independence. \(\square\)
Worked Example: Two Independent Binary Variables
Let \(\Omega=\{(0,0),(0,1),(1,0),(1,1)\}\), give each outcome probability \(1/4\), and let \(X\) and \(Y\) be the first and second coordinates. Each of the four singleton joint events has probability \(1/4\). For either variable, each value \(0\) and \(1\) occurs twice, so each marginal singleton probability is \(2/4=1/2\).
For every \(x,y\in\{0,1\}\), the joint probability is \(1/4=(1/2)(1/2)\). The finite-valued criterion proves independence. To see that it covers arbitrary Borel events, each event \(X\in C\) selects either no values, the value \(0\), the value \(1\), or both values; the same is true for \(Y\in D\). Summing the singleton identities over the selected values gives the required factorization for every such pair of events.
Check: \(\mathbb{P}(X=1,Y=0)=1/4\), while \(\mathbb{P}(X=1)\mathbb{P}(Y=0)=(2/4)(2/4)=1/4\). The same singleton calculation applies to the other three pairs.
Worked Example: Equal Marginals but Dependence
Let \(\Omega=\{1,2,3,4,5,6\}\) with uniform probability \(1/6\). Set \(A=\{1,2,3\}\), \(B=\{1,2,4\}\), \(X=\chi_A\), and \(Y=\chi_B\). Both variables take values in \(\{0,1\}\), and both have marginal probabilities \(\mathbb{P}(X=1)=3/6=1/2\) and \(\mathbb{P}(Y=1)=3/6=1/2\).
The event \(X=1,Y=1\) is \(A\cap B=\{1,2\}\), so \(\mathbb{P}(X=1,Y=1)=2/6=1/3\). Independence would require this to equal \((1/2)(1/2)=1/4\), but \(1/3\neq1/4\); hence \(X\) and \(Y\) are not independent. For completeness, the joint probabilities for \((X,Y)=(1,1),(1,0),(0,1),(0,0)\) are respectively \(2/6,1/6,1/6,2/6\), from outcomes \(\{1,2\},\{3\},\{4\},\{5,6\}\). They sum to \(6/6=1\).
Check: the marginal probabilities are both \(1/2\), but the joint probability of both being \(1\) is \(1/3\), not \(1/4\). Thus matching or knowing the marginal laws does not establish independence.
A Common Calculation Error
A frequent error is to assume that a transformation preserves a uniform law. In the square example, the incorrect calculation \(F_{U^2}(t)=t\) would give \(F_{U^2}(1/4)=1/4\). The defining event corrects it: \(U^2\leq1/4\) is equivalent, on \([0,1]\), to \(U\leq1/2\), whose probability is the interval length \(1/2\), not \(1/4\). The transformed variable’s distribution must be calculated from its preimages.
For independence, the corresponding error is to infer independence from marginal probabilities alone. The six-outcome example has the same Bernoulli marginal law for both variables, yet the event \(\{X=1,Y=1\}\) has probability \(1/3\), whereas the product of its marginal probabilities is \(1/4\). One failed event identity is enough to disprove independence; a finite-valued independence claim, by contrast, requires checking all singleton pairs or invoking the proved criterion.
Check Your Understanding
In each problem, identify the relevant preimage or joint event before calculating its probability.
- On a uniform probability space with \(U\) uniform on \([0,1]\), find the cumulative distribution function of \(1-U\).
- If \(X\) takes values \(0,1,2\) with probabilities \(1/5,2/5,2/5\), find \(F_X(t)\) on the four intervals divided by \(0,1,2\).
- For \(Z=U^2\), calculate \(\mathbb{P}(Z\leq 9/16)\) directly from the preimage.
- For finite-valued \(X,Y\), explain why checking all singleton joint probabilities suffices to establish independence.
- Give a joint event that disproves independence in the six-outcome example and compare its probability with the product of the marginals.