Transformations of Random Variables for Exam P
Learn how to find distributions of transformed random variables for Exam P.
The CDF Method
The CDF method is the most general technique for finding the distribution of a transformed random variable Y = g(X). The procedure has three steps: (1) express F_Y(y) = P(Y <= y) = P(g(X) <= y) in terms of X, (2) solve the inequality g(X) <= y for X, and (3) differentiate F_Y(y) to obtain the PDF f_Y(y).
Example: If X ~ Uniform(0, 1) and Y = -ln(X), then F_Y(y) = P(-ln(X) <= y) = P(ln(X) >= -y) = P(X >= e^(-y)) = 1 - e^(-y) for y > 0. Differentiating gives f_Y(y) = e^(-y), so Y ~ Exponential(1). This result is the basis of inverse transform simulation and connects the uniform distribution to every other continuous distribution.
The CDF method works for any measurable transformation, whether or not it is one-to-one. When g is not one-to-one, the set {X : g(X) <= y} may consist of multiple intervals, and you sum the probabilities over each. For example, if Y = X^2 and X has a symmetric distribution around zero, then P(Y <= y) = P(-sqrt(y) <= X <= sqrt(y)) = F_X(sqrt(y)) - F_X(-sqrt(y)).
Change of Variable Formula
For a one-to-one differentiable transformation Y = g(X) with inverse X = g^(-1)(Y) = h(Y), the PDF of Y can be computed directly without going through the CDF: f_Y(y) = f_X(h(y)) * |h'(y)|. The absolute value of the derivative of the inverse function (the Jacobian in one dimension) ensures the density is non-negative regardless of whether the transformation is increasing or decreasing.
Example: If X ~ Exponential(lambda) and Y = X^2, then X = sqrt(Y) = h(Y) and h'(y) = 1/(2*sqrt(y)). So f_Y(y) = lambda * e^(-lambda*sqrt(y)) * 1/(2*sqrt(y)) for y > 0. This is a Weibull-like distribution and demonstrates how a simple transformation can produce a non-standard density.
When the transformation is not one-to-one, you can partition the domain of X into regions where g is one-to-one and sum the contributions. If Y = X^2 and X has PDF f_X on all of R, then f_Y(y) = [f_X(sqrt(y)) + f_X(-sqrt(y))] / (2*sqrt(y)) for y > 0. Each branch of the inverse contributes a term, and the Jacobian applies to each branch separately.
Bivariate Transformations
For two-dimensional transformations (U, V) = g(X, Y) where the inverse transformation is (X, Y) = h(U, V) = (h_1(U, V), h_2(U, V)), the joint density of (U, V) is f_{U,V}(u, v) = f_{X,Y}(h_1(u, v), h_2(u, v)) * |J|, where J is the Jacobian determinant:
J = det of the matrix with rows [partial h_1/partial u, partial h_1/partial v] and [partial h_2/partial u, partial h_2/partial v].
Example: If X and Y are independent Exponential(1) variables and you define U = X + Y and V = X/(X + Y), then the inverse transformation is X = UV and Y = U(1 - V). The Jacobian is |det[[V, U], [-V+1, -U]]| = |U(-V) - U(-V+1)| = U... Actually, computing it carefully: partial X/partial U = V, partial X/partial V = U, partial Y/partial U = 1-V, partial Y/partial V = -U. The determinant is V(-U) - U(1-V) = -UV - U + UV = -U, so |J| = U. The joint density of (U, V) shows that U ~ Gamma(2, 1) and V ~ Uniform(0, 1), independently. This is a classic result tested on Exam P.
Common Transformations to Memorize
Several transformation results appear so frequently on Exam P that memorizing them saves significant time:
- If X ~ Exponential(lambda), then cX ~ Exponential(lambda/c) for c > 0
- If X ~ Normal(mu, sigma^2), then aX + b ~ Normal(a*mu + b, a^2 * sigma^2)
- If X ~ Gamma(alpha, lambda), then cX ~ Gamma(alpha, lambda/c) for c > 0
- If U ~ Uniform(0, 1), then F^(-1)(U) has CDF F (the probability integral transform)
- If X has CDF F (continuous and strictly increasing), then F(X) ~ Uniform(0, 1)
- If X ~ Exponential(lambda), then P(X > x) = e^(-lambda*x), so X^2 has PDF involving e^(-lambda*sqrt(y))
- If X ~ Normal(0, 1), then X^2 ~ Chi-squared(1) = Gamma(1/2, 1/2)
The probability integral transform and its inverse are especially important. They say that any continuous distribution can be transformed to and from the uniform distribution. This is the foundation for generating random variables in simulation.
Transformations of Discrete Variables
For discrete random variables, transformations are simpler because you work directly with the PMF. If Y = g(X), then P(Y = y) = sum of P(X = x) over all x such that g(x) = y. No Jacobian or differentiation is needed.
Example: If X ~ Binomial(n, p) and Y = n - X, then P(Y = k) = P(X = n - k) = C(n, n-k) * p^(n-k) * (1-p)^k = C(n, k) * (1-p)^k * p^(n-k). So Y ~ Binomial(n, 1-p). The number of failures in n trials is Binomial with the complementary success probability.
Another common discrete transformation: if X ~ Geometric(p) counting the number of trials until the first success (starting from 1), then Y = X - 1 counts the number of failures before the first success, with P(Y = k) = (1-p)^k * p for k = 0, 1, 2, .... Both forms of the geometric distribution appear on Exam P.
Common Pitfalls
The most common mistake with the change of variable formula is forgetting the absolute value of the Jacobian. Without it, you may get a negative density for decreasing transformations. Another frequent error is failing to determine the new support of Y. If X has support (0, 1) and Y = X^2, then Y has support (0, 1) as well. But if X has support (-1, 1) and Y = X^2, then Y has support (0, 1) and the transformation is two-to-one.
Students also sometimes try to use the change of variable formula for transformations that are not one-to-one on the entire support. In such cases, you must either use the CDF method or split the domain into regions where the transformation is one-to-one and sum the contributions from each region.
With bivariate transformations, a common error is computing the Jacobian of the forward transformation instead of the inverse. The formula requires the Jacobian of the inverse: the partial derivatives of (X, Y) with respect to (U, V), not the other way around. Alternatively, compute the Jacobian of the forward transformation and take its reciprocal.
Study Tips
For Exam P, make the CDF method your default approach and use the change of variable formula when the transformation is clearly one-to-one and differentiable. Practice both methods on the same problem to build confidence. Memorize the standard transformation results listed above, as they allow you to skip derivations entirely. For bivariate problems, practice computing Jacobians and always verify your result by checking that the new density integrates to 1 over the new support. Transformation problems typically take three to four minutes on exam day, so practice until the CDF method feels automatic.