Transforming a Random Variable Means Transforming Its Law
A transformation \(Y=g(X)\) changes the values taken by a random variable, but it does not create a new source of randomness. The probabilities for \(Y\) come from the probabilities already assigned to \(X\). The precise link is made by asking which values of \(X\) would produce an outcome of \(Y\) in a specified event.
This viewpoint works whether \(X\) is discrete, continuous, or has a more complicated distribution. In particular, it does not require a probability density. The central operation is to take the inverse image of an event under \(g\).
Measurability matters: it ensures that \(g^{-1}(B)\) is an event whenever \(B\) is Borel, so the probability in the definition exists. The law of \(Y\) is entirely specified by the probabilities of these inverse images. If the original law is known, probabilities for transformed events can therefore be calculated by tracing the event back to \(X\).
What One-to-One Transformations Add
Every measurable transformation gives the inverse-image probability identity above. A one-to-one transformation adds the possibility of recovering which input values produced an output. That recovery must be handled with care: an injective map has an inverse function on its image, but event translation also requires the relevant image sets to be measurable.
To prove the event identity on \(\{X\in S\}\), first suppose \(X\in A\). Since \(Y=g(X)\), it follows that \(Y\in g(A)\). Conversely, if \(Y\in g(A)\), then \(Y=g(a)\) for some \(a\in A\). Also \(Y=g(X)\), with \(X\in S\). Injectivity of \(g\) on \(S\) gives \(X=a\), so \(X\in A\). Thus the two events agree whenever \(X\in S\). The excluded event has probability zero by assumption, so their probabilities agree. The image \(g(A)\) is Borel because it is the inverse image of \(A\) under the measurable inverse \(g^{-1}:T\to S\). This proves the result. \(\square\)
The bijection and measurable-inverse conditions are a useful sufficient set of assumptions. In particular, they hold for continuous strictly monotone functions on an interval, with their ranges as the sets \(T\). If one only needs the probability of an output event \(B\), no inverse function is needed: use \(P(Y\in B)=P(X\in g^{-1}(B))\) directly.
Worked Example: A Discrete Transformation
Let \(X\) take values \(0,1,2,3\) with probabilities \(0.1,0.2,0.3,0.4\), respectively, and define \(Y=2X+1\). Find \(P(3<Y\leq 8)\) by translating the event.
The event for \(X\) is obtained by solving the inequalities: $$ 3<2X+1\leq 8 \quad\Longleftrightarrow\quad 1<X\leq 3.5. $$
Among the possible values \(0,1,2,3\), only \(2\) and \(3\) satisfy this condition. Therefore $$ P(3<Y\leq 8)=P(1<X\leq 3.5)=P(X=2)+P(X=3)=0.3+0.4=0.7. $$
Equivalently, \(Y\) takes values \(1,3,5,7\), and the event \(3<Y\leq 8\) includes \(5\) and \(7\), whose probabilities are \(0.3\) and \(0.4\). Both calculations use the same underlying law.
Worked Example: Translating an Interval Under a Nonlinear Map
Suppose \(X\) is uniform on \((-1,1)\) and \(Y=X^3\). Find \(P(-1/8\leq Y\leq 1/27)\). The map \(g(x)=x^3\) is one-to-one and increasing, so the output interval corresponds to the input interval with endpoints \((-1/8)^{1/3}=-1/2\) and \((1/27)^{1/3}=1/3\).
Consequently, $$ \{-1/8\leq Y\leq 1/27\} = \{-1/2\leq X\leq 1/3\}. $$
A uniform distribution on an interval assigns probability equal to the fraction of the interval's length covered. The original interval has length \(2\), and the selected subinterval has length $$ \frac{1}{3}-\left(-\frac{1}{2}\right)=\frac{5}{6}. $$
Hence $$ P(-1/8\leq Y\leq 1/27) = \frac{5/6}{2} = \frac{5}{12}. $$
This calculation uses only an event correspondence and the known law of \(X\); no density for \(Y\) is required.
The Pushforward Law Is a Probability Law
The inverse-image definition does more than give a convenient calculation rule. It guarantees that the transformed probabilities satisfy the axioms of a probability distribution.
For the empty set, \(g^{-1}(\varnothing)=\varnothing\), so \(\mu_Y(\varnothing)=0\). Also \(g^{-1}(\mathbb R)=\mathbb R\), giving \(\mu_Y(\mathbb R)=\mu_X(\mathbb R)=1\). Now let \(B_1,B_2,\ldots\) be pairwise disjoint Borel sets. Their inverse images are pairwise disjoint: an \(x\) belonging to both \(g^{-1}(B_i)\) and \(g^{-1}(B_j)\) would have \(g(x)\in B_i\cap B_j\), which is empty when \(i\ne j\). Moreover, $$ g^{-1}\left(\bigcup_{i=1}^{\infty}B_i\right) = \bigcup_{i=1}^{\infty}g^{-1}(B_i). $$
Countable additivity of \(\mu_X\) therefore gives $$ \mu_Y\left(\bigcup_{i=1}^{\infty}B_i\right) = \mu_X\left(\bigcup_{i=1}^{\infty}g^{-1}(B_i)\right) = \sum_{i=1}^{\infty}\mu_X\bigl(g^{-1}(B_i)\bigr) = \sum_{i=1}^{\infty}\mu_Y(B_i). $$ Thus \(\mu_Y\) is nonnegative, has total mass one, and is countably additive, as required. \(\square\)
Expectations Can Also Be Transferred
The same idea extends from event probabilities to expectations. Once the law of \(Y\) is defined as a pushforward, integrating a function of \(Y\) is equivalent to integrating the composed function of \(X\). This identity can be useful even when the transformed law has no convenient density.
For an indicator function \(h(y)=\mathbf{1}_B(y)\), the identity is exactly the pushforward definition: $$ E[\mathbf{1}_B(Y)] = P(Y\in B) = P(X\in g^{-1}(B)) = E[\mathbf{1}_{g^{-1}(B)}(X)] = E[\mathbf{1}_B(g(X))]. $$
By finite linearity, the identity follows for every nonnegative simple function \(h=\sum_{j=1}^m a_j\mathbf{1}_{B_j}\), where \(a_j\geq 0\). For general nonnegative measurable \(h\), there is an increasing sequence of nonnegative simple functions \(h_k\) converging pointwise to \(h\). The identity holds for each \(h_k\). Applying the monotone convergence theorem to both sides gives $$ E[h(Y)] = \lim_{k\to\infty}E[h_k(Y)] = \lim_{k\to\infty}E[h_k(g(X))] = E[h(g(X))]. $$ For a signed integrable \(h\), apply the nonnegative result separately to \(h^+=\max(h,0)\) and \(h^-=\max(-h,0)\), then subtract their finite expectations. This proves the identity under the stated conditions. \(\square\)
Worked Example: A Probability on a Positive Scale
Let \(X\) be uniform on \((0,1)\), and set \(Y=X/(1-X)\). This is a one-to-one map from \((0,1)\) onto \((0,\infty)\). Find \(P(Y>3)\).
Because \(1-X>0\) on the support, the inequality can be rearranged without changing its direction: $$ \frac{X}{1-X}>3 \quad\Longleftrightarrow\quad X>3(1-X) \quad\Longleftrightarrow\quad 4X>3 \quad\Longleftrightarrow\quad X>\frac{3}{4}. $$
The uniform law on \((0,1)\) assigns probability \(1-3/4=1/4\) to this event. Thus \(P(Y>3)=1/4\). The result follows by translating the event, not by finding a density for \(Y\).
When One-to-One Reasoning Fails
A common mistake is to assume that every transformation can be reversed. For a general map, the safe formula remains \(P(Y\in B)=P(X\in g^{-1}(B))\). But an event about \(X\) may not be recoverable from \(Y\): distinct input values can produce the same output.
Worked Example: A Non-Injective Map Loses Information
Let \(X\) take the values \(-1\) and \(1\), each with probability \(1/2\), and define \(Y=X^2\). Then \(Y=1\) with probability one. For the output event \(B=\{1\}\), its inverse image is \(\{-1,1\}\), so $$ P(Y\in B)=P(X\in\{-1,1\})=1. $$
However, the event \(\{X=1\}\) cannot be identified by observing \(Y\): its probability is \(1/2\), while \(Y\) always equals \(1\). Both possible values of \(X\) have merged into the same output. Thus the output-event rule always works, but recovering arbitrary input events requires suitable one-to-one behavior and measurable images.
The distinction is useful in practice. Use inverse images to calculate probabilities of events involving \(Y\), even for non-injective maps. Use a measurable inverse when the aim is to translate events about \(X\) into events about \(Y\). Neither approach requires assuming that \(X\) or \(Y\) has a density.
Check Your Understanding
Try these questions by identifying the relevant inverse image before calculating.
- State the definition of the pushforward law of \(Y=g(X)\) for a Borel set \(B\).
- If \(g\) is measurable but not injective, which probability identity still applies to \(P(Y\in B)\)?
- Let \(X\) be uniform on \((0,1)\) and \(Y=2X+1\). Translate the event \(2<Y\leq 3\) into an event about \(X\), then find its probability.
- Why does injectivity alone not guarantee that every event about \(X\) can be represented by a measurable event about \(Y\)?
- For which class of functions \(h\) does the expectation identity \(E[h(Y)]=E[h(g(X))]\) hold without requiring a density?