Home page for accesible maths 4 Univariate Transformations

Style control - access keys in brackets

Font (2 3) - + Letter spacing (4 5) - + Word spacing (6 7) - + Line spacing (8 9) - +

4.4 One-to-one Transformations

Returning to more general transformation of random variables we now restrict attention to general one-to-one transformations Y=g(X), so X=g-1(Y) exists.

Theorem 4.4.1.

If X has pdf fX(x) and Y=g(X) defines a one-to-one transformation, then Y has pdf

fY(y)=fX(x)|dxdy|

evaluated at x=g-1(y).

Proof.

If g is increasing then

FY(y)=𝖯(g(X)y)=𝖯(Xg-1(y))=FX(g-1(y))

so by differentiating wrt. y

fY(y)=fX{g-1(y)}dg-1(y)dy=fX{g-1(y)}dxdy.

If g is decreasing then

FY(y)=𝖯(g(X)y)=𝖯(Xg-1(y))=1-𝖯(Xg-1(y))=1-FX(g-1(y))

so

fY(y)=-fX{g-1(y)}dg-1(y)dy=fX{g-1(y)}(-dxdy).

Combining these results gives the stated result. ∎

Notation and hints:

  • We call |dx/dy| the Jacobian of the transformation.

  • Sometimes it is most easy to evaluate |dx/dy| by |dy/dx|-1.

  • It is often hard to remember which way up the Jacobian term should be. It is helpful to think in terms of probabilities of small sets, i.e. for suitable x and y

    1. 𝖯(y<Yy+δy)=𝖯(x<Xx+δx),

    2. fY(y)δyfX(x)δx,

    3. fY(y)=fX(x)|dx/dy|.

In practice the procedure for finding the pdf of Y from this type of transformation is:

  1. 1.

    Check you have a one-to-one transformation g over the range of X.

  2. 2.

    Invert it – find x as a function of y. (This gives a way of checking it is a one-to-one transformation: can it be inverted?)

  3. 3.

    Find dx/dy (as a function of y).

  4. 4.

    Use the theorem, replacing x in fX(x) with g-1(y).

  5. 5.

    Summarise, remembering to state the range of Y.

Example 4.4.1.

The Rayleigh distribution is used in modelling wave heights. Its pdf is

fX(x)={2λxexp(-λx2)x>00otherwise

Find the pdf of the variable Y=X2 which relates to wave power required to assess the force of the waves.

Solution.  The range of X is (0,) and so the range of Y=X2 is the same.

The transform y=x2 is one-to-one on x>0 so

  1. x=y1/2=g-1(y),

  2. dxdy=12y-1/2,

fY(y) =2λy1/2exp(-λy)12y-1/2
=λexp(-λy)

for y>0.

Example 4.4.2.

If X has pdf fX(x) then the linear transformation Y=a+bX, b0, has pdf

fY(y)=1|b|fX{(y-a)/b}.

This follows from the theorem with g(x)=a+bx since g-1(y)=(y-a)/b and |dx/dy|=1/|b|.

Use: if ZN(0,1) and therefore has pdf

fZ(z)=12πe-z2/2,z(-,)

then Y=μ+σZ has pdf

fy(y)=1σ2πe-(y-μ)2/(2σ2),y(-,).

i.e. YN(μ,σ2) (proving Theorem 3.7.1)

Example 4.4.3.

Show that if UU(-π2,π2) then Y=tan(U) has a Cauchy distribution.

Solution.  First note that the range of Y is (-,) as required for a Cauchy random variable.

It is easier to differentiate g(u)=tan(u) than its inverse

dydu =dgdu
=1+tan2(u)
=1+y2,

so

fY(y) =fU(g-1(y))|dudy|
=fU(g-1(y))|dydu|-1
=1π(1+y2),

which is the density of a Cauchy random variable.

Example 4.4.4.

Show that if X Cauchy then also Y=1/X Cauchy.

Solution.  The range of X is (-,) and so the range of Y=1/X is the same. Here y=g(x)=1/x so that x=1/y=g-1(y) and

dydx=-1x2=-y2,

so

fY(y) =fX(g-1(y))|dxdy|
=1π(1+1/y2)y-2
=1π(1+y2)

for -<y<.

Example 4.4.5.

Example 4.2.4 revisited. XN(0,1). Show that Y=X2 has a 𝖦𝖺𝗆(1/2,1/2) distribution. Note: this is also a χ12 distribution – see Section 11.1.

Solution.  Note that g(X)=X2 is not a one-to-one map. However we can create a new random variable X*=|X| which, by symmetry, has density

fX*(x*)={22πe-x*2/2x*00x*<0

Now Y=g(X*)=X*2 and g is a one-to-one map on the region where X* can be, [0,). Since x*=y1/2,

|dx*dy|=12y-1/2

and we can use the transformation method to see that for y0,

fY(y) =22πe-((x*(y))2/212y-1/2
=12πy-1/2e-12y,

which is the density of a 𝖦𝖺𝗆(1/2,1/2) random variable.

Which method?

If the transformation from X to Y is not 1-1 and there is no simple trick to make an equivalent random variable using a 1-1 transformation, such as in Example 4.4.5 then the cdf (distribution function) method is the only option.

If either option is available then both will give the same answer, but one may require much less work. If you have FX(x) and it is in a simple form then the cdf (distribution function) method may be preferable. Alternatively, if you have fX(x) and the Jacobian has a simple form then the pdf (density function) method may be preferable.