Tutorials › VEE Mathematical Statistics › The CDF Method for Transformations

VEE Mathematical Statistics · Functions of a Random Variable · Tutorial 245 of 880

The CDF Method for Transformations

Translate events involving a transformed variable into regions for the original variable, then use those regions to calculate the CDF.

Intermediate 10 min read

What You'll Learn

  • Define the CDF of a transformed random variable using a probability event.
  • Identify and evaluate the set of original values that produce a transformed value at or below a threshold.
  • Calculate transformed CDFs for exponential and trigonometric transformations.
  • Handle a nonmonotone transformation by ordering the roots of an inequality.
  • Use support and boundary checks to assess a derived CDF.

Why Start with the CDF?

A transformation \(Y=g(X)\) can make a familiar distribution difficult to recognize. If \(g\) is not one-to-one, there may be several different values of \(X\) that produce the same value of \(Y\). Even when \(g\) has an inverse, finding and using that inverse may be inconvenient. The cumulative distribution function (CDF) gives a direct method: translate the event \(Y\le y\) into an event about \(X\), then calculate its probability under the distribution of \(X\).

The key task is to describe all values of \(X\) that satisfy the transformed inequality. That set might be one interval, several intervals, or a more complicated region. The method does not require a density for \(Y\), and it remains useful when the transformation cannot be easily inverted. It is aligned with the SOA VEE Mathematical Statistics syllabus.

Definition: The CDF of a random variable \(Y\) is \(F_Y(y)=P(Y\le y)\). If \(Y=g(X)\), then for every real number \(y\), $$ F_Y(y)=P(g(X)\le y)=P(X\in A_y), \qquad A_y=\{x:g(x)\le y\}. $$ If \(X\) is continuous with density \(f_X\), this probability can be calculated as $$ F_Y(y)=\int_{A_y} f_X(x)\,dx, $$ where the integral is over the part of \(A_y\) in the support of \(X\).

The Event-Translation Method

The set \(A_y\) is called the preimage of the range \((-\infty,y]\) under \(g\): it collects the original values that map to a value no greater than \(y\). To find \(F_Y(y)\), first solve or describe \(g(x)\le y\), then use the distribution of \(X\) to find the probability of the resulting set. If the set consists of multiple intervals, add their probabilities. If \(X\) has a density, integrate over each interval.

This approach is especially valuable when a transformation is nonmonotone. A nonmonotone function may cross a chosen threshold several times, so the event \(g(X)\le y\) cannot be represented by a single inequality involving an inverse. Instead, locate the relevant crossings and determine which intervals satisfy the inequality. For a threshold exactly at a turning point, check the inequality on either side of that point as well.

1
Set up the CDF event.
Write \(F_Y(y)=P(g(X)\le y)\). Keep the inequality direction unchanged unless you have a reason to reverse it.
2
Find the allowed original values.
Solve \(g(x)\le y\), or identify its solution intervals using the roots of \(g(x)=y\) and the sign of \(g(x)-y\).
3
Use the distribution of \(X\).
Calculate the probability of the solution set, restricting it to the support of \(X\).
4
Check the result.
Check support boundaries, whether the CDF stays between 0 and 1, and whether it is nondecreasing in \(y\).

Worked Examples

Worked Example: An Exponential Variable Transformed by an Exponential Function

Let \(X\) have an exponential distribution with rate \(\lambda=2\), so its density is \(f_X(x)=2e^{-2x}\) for \(x\ge0\), and \(f_X(x)=0\) otherwise. Define \(Y=e^{-X}\). Find \(F_Y(y)\), then calculate \(F_Y(0.5)\).

Method. Translate \(Y\le y\) into an event involving \(X\). Since \(X\ge0\), the transformation gives \(0<Y\le1\). For \(0<y<1\), $$ e^{-X}\le y \quad\Longleftrightarrow\quad -X\le \ln y \quad\Longleftrightarrow\quad X\ge-\ln y. $$ The direction reverses when multiplying the middle inequality by \(-1\).

The exponential survival probability is \(P(X\ge t)=e^{-2t}\) for \(t\ge0\). Therefore, $$ F_Y(y)=P(X\ge-\ln y) =e^{-2(-\ln y)} =e^{2\ln y} =y^2, \qquad 0<y<1. $$ For \(y\le0\), \(F_Y(y)=0\), because \(Y\) is always positive. For \(y\ge1\), \(F_Y(y)=1\), because \(Y\le1\). Thus the complete CDF is $$ F_Y(y)= \begin{cases} 0, & y\le0,\\ y^2, & 0<y<1,\\ 1, & y\ge1. \end{cases} $$ At \(y=0.5\), \(F_Y(0.5)=(0.5)^2=0.25\). The answer is \(0.2500\) to four decimal places.

Check. The result is 0 at the lower boundary and reaches 1 at the upper boundary; \(y^2\) is nondecreasing on \((0,1)\). A common mistake is to write \(P(X\le-\ln y)\), forgetting that \(e^{-X}\) decreases as \(X\) increases. That would give \(1-y^2\), which increases in the wrong direction as \(y\) approaches 1 and cannot be the CDF here.

Worked Example: A Sine Transformation with Two Crossing Points

Let \(X\) be uniform on \([0,2\pi]\), and define \(Y=\sin X\). Find \(F_Y(y)\) for \(-1\le y\le1\), then calculate \(F_Y(-0.5)\).

Method. For a threshold \(y\) between \(-1\) and \(1\), set \(\alpha=\arcsin(y)\), where \(-\pi/2\le\alpha\le\pi/2\). The event is \(\sin X\le y\). For \(0\le y\le1\), the sine curve is above \(y\) between \(X=\alpha\) and \(X=\pi-\alpha\); therefore the event occupies the rest of \([0,2\pi]\). Its length is \(2\pi-(\pi-2\alpha)=\pi+2\alpha\).

For \(-1\le y\le0\), the set where \(\sin X\le y\) runs from \(X=\pi-\alpha\) to \(X=2\pi+\alpha\). Its length is again \((2\pi+\alpha)-(\pi-\alpha)=\pi+2\alpha\). Because a uniform variable on \([0,2\pi]\) assigns probability equal to interval length divided by \(2\pi\), $$ F_Y(y)=\frac{\pi+2\alpha}{2\pi} =\frac12+\frac{\arcsin(y)}{\pi}, \qquad -1\le y\le1. $$ Outside this range, \(F_Y(y)=0\) for \(y<-1\) and \(F_Y(y)=1\) for \(y\ge1\).

For \(y=-0.5\), \(\arcsin(-0.5)=-\pi/6\). Hence $$ F_Y(-0.5)=\frac12-\frac16=\frac13=0.3333. $$ The probability can also be checked directly: \(\sin X\le-0.5\) for \(X\) from \(7\pi/6\) to \(11\pi/6\), an interval of length \(2\pi/3\). Dividing by the full length \(2\pi\) gives \(1/3\).

Check. The formula gives 0 at \(y=-1\), \(1/2\) at \(y=0\), and 1 at \(y=1\). A common mistake is to use only one solution of \(\sin X=y\) and count just one interval. The event includes every part of the support where the inequality holds.

When the Inequality Has Several Roots

For a nonmonotone transformation, solving \(g(x)=y\) can be the most demanding step. Once the roots are ordered, the sign of \(g(x)-y\) is constant between consecutive roots, so a test value in each interval identifies where \(g(x)\le y\). The roots need not have a simple inverse formula. If they can be found numerically, they must still be ordered, checked against the support of \(X\), and used to determine the correct intervals. The probability calculation is then based on the distribution of \(X\), not on the numerical method used to locate the roots.

Worked Example: A Cubic Transformation with Three Threshold Crossings

Let \(X\) be uniform on \([-2,2]\), and set \(Y=X^3-3X\). Find \(F_Y(1)\). This transformation is not monotone over the support, so the event may contain separated intervals.

Method. Solve the threshold equation and inspect the sign of \(x^3-3x-1\): $$ F_Y(1)=P(X^3-3X\le1), \qquad x^3-3x-1=0. $$ Using the identity \(x=2\cos\theta\) gives \(x^3-3x=2\cos(3\theta)\). Thus the equation becomes \(2\cos(3\theta)=1\), or \(\cos(3\theta)=1/2\). The three roots in \([-2,2]\), ordered from smallest to largest, are $$ r_1=2\cos(7\pi/9)\approx-1.532089,\qquad r_2=2\cos(5\pi/9)\approx-0.347296,\qquad r_3=2\cos(\pi/9)\approx1.879385. $$

The cubic \(x^3-3x-1\) has positive leading coefficient, so its sign alternates across these three distinct roots. It is negative to the left of \(r_1\), positive between \(r_1\) and \(r_2\), negative between \(r_2\) and \(r_3\), and positive to the right of \(r_3\). Intersecting the solution set with the support \([-2,2]\), the event consists of \([-2,r_1]\) and \([r_2,r_3]\). Their total length is $$ (r_1-(-2))+(r_3-r_2) =(-1.532089+2)+(1.879385-(-0.347296)) =0.467911+2.226681 =2.694592. $$

A uniform distribution on an interval of length \(4\) assigns probability \(2.694592/4=0.673648\). Therefore, \(F_Y(1)=0.6736\) to four decimal places. The result is between 0 and 1, and the event occupies more than half of the support, consistent with the computed probability.

Check. A common mistake is to assume the cubic is increasing, solve for just one root, and count only one interval. Here the three roots divide the support into four parts, and two separate intervals satisfy the inequality. Omitting either interval gives an incorrect CDF value.

Justification and Exam Checks

The CDF method follows directly from the definition of a probability event. For any real \(y\), substituting \(Y=g(X)\) into \(F_Y(y)=P(Y\le y)\) gives \(F_Y(y)=P(g(X)\le y)\). The event on the right occurs exactly when the realized value \(X=x\) belongs to \(A_y=\{x:g(x)\le y\}\). If \(X\) has density \(f_X\), the probability of that set is its density integral. This justifies the method without requiring \(g\) to be one-to-one or differentiable.

The resulting expression must be a CDF: it is nondecreasing, lies between 0 and 1, approaches 0 as \(y\) decreases without bound, and approaches 1 as \(y\) increases without bound. The range of \(g(X)\) can sharpen these checks: below the smallest attainable transformed value, the CDF is zero; at or above the largest attainable value, it is one. A continuous \(X\) does not by itself guarantee that \(Y=g(X)\) has a continuous distribution. In particular, if a set of \(X\)-values with positive probability maps to the same value of \(Y\), the transformed variable can have a point mass. The event definition remains valid in that case.

For a calculation, keep the original support visible throughout. Roots outside that support do not create extra probability intervals. Also distinguish a boundary point from an interval: for a continuous \(X\), a single point has probability zero, but an interval generally does not. When solving an inequality, test signs between roots rather than relying on a sketch alone.

Key takeaway: To find the CDF of \(Y=g(X)\), work with \(P(g(X)\le y)\). Describe every part of the support of \(X\) where the inequality holds, and calculate the probability of that complete set.

Check Your Understanding

For each problem, set up the event involving the original variable before calculating its probability.

  1. Let \(X\) be uniform on \([0,1]\) and \(Y=1-2X\). Find the support of \(Y\) and calculate \(F_Y(0.2)\). (Answer: support \([-1,1]\); \(F_Y(0.2)=0.6000\).)
  2. Let \(X\) be uniform on \([0,\pi]\) and \(Y=\cos X\). Find \(F_Y(-0.5)\) by determining the portion of the support where \(\cos X\le-0.5\). (Answer: \(1/3=0.3333\).)
  3. Let \(X\) be uniform on \([-2,2]\) and \(Y=X^3-3X\). Find the ordered roots of \(x^3-3x=1\), identify the intervals where \(Y\le1\), and calculate \(F_Y(1)\). (Answer: \(0.6736\).)
  4. Let \(X\) have an exponential distribution with rate \(3\), and let \(Y=e^{-X}\). Calculate \(P(Y>0.25)\), taking care to translate the strict inequality correctly. (Answer: \(63/64=0.9844\).)
  5. Let \(X\) be uniform on \([0,1]\), and let \(Y=\sin(2\pi X)\). Determine the fraction of the support on which \(Y\le0\), then give \(F_Y(0)\). (Answer: \(0.5000\).)
Clinical Biostats