4.1 - Distributions of transformed variables

4.1 - Distributions of transformed variables

Changing a random variable changes both its range and the way probability is spread across it. You will find a transformed CDF by rewriting its probability event in terms of the original variable, differentiate to obtain the new density, and combine inverse branches when a transformation is many-to-one.

Transforming an inequality

If a variable can be negative, why does cubing preserve its order while squaring may not? Cubing is increasing throughout the real line; squaring folds negative and positive values together. Begin with transformations that preserve or reverse order throughout the support.

Let Y=h(X)Y=h(X). To find its CDF GG, start with its meaning:

G(y)=P(Y≤y)=P(h(X)≤y).G(y)=\mathrm P(Y\le y)=\mathrm P(h(X)\le y).

Rewrite this as an event involving XX, whose distribution you know. First find the possible values of YY: transform the original support, checking any turning points. The CDF is zero below the smallest possible value and one above the largest.

Monotone transformation

A transformation is strictly increasing on an interval if larger inputs always give larger outputs, and strictly decreasing if larger inputs always give smaller outputs. In either case it is one-to-one there: each output has one input.

An increasing transformation preserves an inequality's direction. A decreasing transformation reverses it. Monotonicity is needed on the support being used, rather than necessarily on the whole real line.

For example, x2x^2 is increasing on [0,2][0,2], but is not monotone on [−2,2][-2,2]. By contrast, x3x^3 is increasing even when negative inputs are allowed; use the real cube root when inverting it.

Worked example 1: increasing cubing

Question. The variable XX is uniform on [0,2][0,2]. Find the CDF of Y=X3Y=X^3.

Plan. Transform the endpoints, then rewrite X3≤yX^3\le y using the increasing cube function.

The support becomes [0,8][0,8]. For 0≤y≤80\le y\le8,

G(y)=P(X3≤y)=P(X≤y3)=y32,\begin{aligned} G(y)&=\mathrm P(X^3\le y)\\ &=\mathrm P(X\le\sqrt[3]{y})\\ &=\frac{\sqrt[3]{y}}{2}, \end{aligned}

since the original CDF is FX(x)=x/2F_X(x)=x/2 on [0,2][0,2].

Answer.

G(y)={0y<0y3/20≤y≤81y>8.G(y)= \begin{cases} 0&y<0\\ \sqrt[3]{y}/2&0\le y\le8\\ 1&y>8. \end{cases}

Check. The event Y≤1Y\le1 is X≤1X\le1, which occupies half of the uniform interval. The formula gives G(1)=1/2G(1)=1/2, as well as G(0)=0G(0)=0 and G(8)=1G(8)=1.

Now reflect the output: the transformation decreases as XX increases. The support has the same endpoints, but a lower-tail event for YY becomes an upper-tail event for XX.

Worked example 2: a decreasing transformation

Question. For the same uniform XX, find the CDF of Y=8−X3Y=8-X^3.

Plan. Rearrange the event carefully and use the complement of the original CDF.

Again 0≤Y≤80\le Y\le8. For 0≤y≤80\le y\le8,

G(y)=P(8−X3≤y)=P(X3≥8−y)=P(X≥8−y3)=1−8−y32.\begin{aligned} G(y)&=\mathrm P(8-X^3\le y)\\ &=\mathrm P(X^3\ge8-y)\\ &=\mathrm P(X\ge\sqrt[3]{8-y})\\ &=1-\frac{\sqrt[3]{8-y}}{2}. \end{aligned}

There is no extra endpoint term because XX has zero probability at any individual value.

Answer.

G(y)={0y<01−8−y3/20≤y≤81y>8.G(y)= \begin{cases} 0&y<0\\ 1-\sqrt[3]{8-y}/2&0\le y\le8\\ 1&y>8. \end{cases}

Check. Y≤7Y\le7 is equivalent to X≥1X\ge1, so its probability is 1/21/2. The formula gives G(7)=1/2G(7)=1/2. It increases from G(0)=0G(0)=0 to G(8)=1G(8)=1, as a CDF must.

For an increasing transformation with inverse rr, this process gives G(y)=FX(r(y))G(y)=F_X(r(y)) within the transformed range. For a decreasing transformation of a continuous variable, it gives G(y)=1−FX(r(y))G(y)=1-F_X(r(y)). The event is the safest way to decide which one applies.

Watch out

For 8−X3≤y8-X^3\le y, the correct event is X≥8−y3X\ge\sqrt[3]{8-y}. Using a lower tail would make the supposed CDF decrease from one to zero.

Apply the decreasing-event method with a different uniform interval.

Differentiating the transformed CDF

Once you have the transformed CDF, differentiate on its intervals to find the transformed PDF, keeping the transformed support attached to every formula.

The density is a rate of accumulation with respect to the new variable yy. Simply substituting an inverse into the old PDF misses the change in scale. Differentiating the new CDF supplies the needed chain-rule factor automatically.

CDF method for a transformed density

For the continuous piecewise differentiable distributions used here:

G(y)=P(h(X)≤y),g(y)=G′(y)G(y)=\mathrm P(h(X)\le y), \qquad g(y)=G'(y)

on each open interval of differentiability. State g(y)=0g(y)=0 outside the transformed support, and check ∫g(y) dy=1\int g(y)\,\mathrm dy=1 over that support.

The CDF transformation method is not in the formula booklet: learn it.

An infinite limiting density at an endpoint can still have finite area. A PDF may be assigned any nonnegative value at an isolated endpoint; the probabilities come from its integral, including an improper integral where necessary.

Worked example 3: a square gives a uniform density

Question. The PDF of XX is fX(x)=2x/9f_X(x)=2x/9 for 0<x<30<x<3, and zero otherwise. Find the PDF of Y=X2Y=X^2.

Plan. Use that squaring is increasing on this positive support; construct GG, then differentiate.

For 0≤y≤90\le y\le9,

G(y)=P(X≤y)=∫0y2x9 dx=y9g(y)=19for 0<y<9.\begin{aligned} G(y)&=\mathrm P(X\le\sqrt y)\\ &=\int_0^{\sqrt y}\frac{2x}{9}\,\mathrm dx =\frac{y}{9}\\ g(y)&=\frac19&&\text{for }0<y<9. \end{aligned}

The complete CDF is zero below zero and one above nine.

Answer.

g(y)={1/90<y<90otherwise.g(y)= \begin{cases} 1/9&0<y<9\\ 0&\text{otherwise}. \end{cases}

Check. This is uniform on [0,9][0,9], with total area one and mean 9/29/2. Independently, E(X2)=∫03x2(2x/9) dx=9/2\mathrm E(X^2)=\int_0^3 x^2(2x/9)\,\mathrm dx=9/2, agreeing with E(Y)\mathrm E(Y).

Keep the original density, but change the transformation from a square to a cube. The transformed support and chain-rule power both change.

Worked example 4: an integrable endpoint singularity

Question. For the same XX, find the PDF of Y=X3Y=X^3.

Plan. Integrate up to y3\sqrt[3]{y}, then differentiate the resulting power of yy.

The transformed support is [0,27][0,27]. On this range,

G(y)=∫0y32x9 dx=y2/39g(y)=227y−1/3for 0<y<27.\begin{aligned} G(y)&=\int_0^{\sqrt[3]{y}}\frac{2x}{9}\,\mathrm dx =\frac{y^{2/3}}9\\ g(y)&=\frac2{27}y^{-1/3}&&\text{for }0<y<27. \end{aligned}

Although this density grows without bound as yy approaches zero from above, its integral is finite:

∫027227y−1/3 dy=[y2/39]027=1.\int_0^{27}\frac2{27}y^{-1/3}\,\mathrm dy =\left[\frac{y^{2/3}}9\right]_0^{27}=1.

Answer. One valid PDF, choosing its value at zero as zero, is

g(y)={227y1/30<y<270otherwise.g(y)= \begin{cases} \dfrac2{27y^{1/3}}&0<y<27\\ 0&\text{otherwise}. \end{cases}

Check. From this PDF,
E(Y)=227∫027y2/3 dy=54/5\mathrm E(Y)=\tfrac2{27}\int_0^{27}y^{2/3}\,\mathrm dy=54/5.
Directly from the original variable,
E(X3)=29∫03x4 dx=54/5\mathrm E(X^3)=\tfrac29\int_0^3x^4\,\mathrm dx=54/5.
These independent expectation calculations agree.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account