Chapter 5 Transforms

A patient who was given a medication in an earlier ward round. Before the doctor provides any further treatment, they would like to understand the amount of medication still in the patient’s system. The amount of medication that was administered is distributed by a known random variable M0, and the time since the ward round until the doctor next sees the patient is distributed by a known random variable T. The amount of medication still in the patients system is given by Mnow=M0eT4. What is the distribution of M0?

How do we solve this type of problem mathematically?

5.1 One-dimensional Transformations

Consider a continuous random variable X whose PDF is fX(x) and CDF is FX(x). Let g:RR be a continuous function. Define a new continuous random variable by Y=g(X). The aim is to find the probability density function fY(y) of Y.

In general there are two steps to do this:

  1. Compute the CDF of Y, that is FY(y)=P(Yy) by substituting Y for g(X), rearranging to write the event Yy in terms of X and y, and finally using the known expressions for FX(x) and fX(x).

  2. Derive the PDF of Y, fY(y), from the CDF FY(y) using the fact that fY(y)=dFYdy(y).

Dunder Mifflin Paper Company is investigating employee efficiency in their Scranton branch. In particular they are concerned with employee time being taken up by conference room meetings. The length of time a meeting takes is distributed by TmeetExp(λ). There are 13 employees in the branch. Calculate the CDF, PDF and distribution of the total amount of employee time Ttotal taken up by a meeting.

Since Tmeet0, it follows that Ttotal=13Tmeet0. Therefore FTtotal(t)=0 for t<0. Instead assuming t0, we have Ttotalt13TmeettTmeett13. Using the known CDF of the exponential distribution, that is FTmeet(x)=1eλx, we can calculate the CDF of Ttotal: FTtotal(t)=P(Ttotalt)=P(Tmeett13)=FTmeet(t13)=1eλt13. So the PDF of Y is: fTtotal(t)=ddtFTtotal(t)=λ13eλt13. Therefore fTtotal(t)={λ13eλt13,if t00,otherwise, that is, TtotalExp(λ13).
Consider XN(0,1). Let g(x)=x2, and define Y=g(X)=X2. Find the PDF of Y.



Clearly Y0, so it is enough to assume y is non-negative when finding FY(y) and fY(y). Calculate

FY(y)=P(Yy)=P(X2y)=P(yXy)=P(Xy)P(Xy)=FX(y)FX(y).

Using that FX(x)=x12πex22dx, it follows that

FY(y)=FX(y)FX(y)=yy12πex22dx.

Now if y>0,

fY(y)=dFYdy(y)=ddy(yy12πex22)=ddy(FX(y)FX(y))=ddy(y)FX(y)ddy(y)FX(y)=12y12πe(y)22(12y)12πe(y)22=122πyey2+122πyey2=12πyey2.

5.2 Two-dimensional Transformations

The discussion of Section 5.1 only considers function of one variable. The medication example outlined at the beginning of the chapter outlines two random variables, M0 and T, that both act as function inputs. In this section we develop the theory to address this situation.

Let T:AB where A,BR2 be a one-to-one transformation, that is, every pair (y1,y2)B is obtained uniquely by applying T to some (x1,x2)A, and similarly each (x1,x2)A is mapped to exactly one point in B by T. Recall the definition of the Jacobian of such a transformation.

The Jacobian of a one-to-one transformation T:AB that maps (x1,x2) to (y1,y2)=(y1(x1,x2),y2(x1,x2)), denoted (y1,y2)(x1,x2), is (y1,y2)(x1,x2)=det(y1x1y1x2y2x1y2x2).

A key characteristic of a one-to-one transformation is that they are invertible. Specifically there exists a one-to-one transformation T1:BA such that TT1=T1T is the identity mapping. Typically if T(x1,x2)=(y1(x1,x2),y2(x1,x2)), then the inverse is notated T1(y1,y2)=(x1(y1,y2),x2(y1,y2)). The Jacobian of T1 is the reciprocal of the Jacobian of T: (x1,x2)(y1,y2)=1(y1,y2)(x1,x2).

Suppose X1,X2 are continuous random variables with joint PDF fX1,X2(x1,x2). Define two new random variables by (Y1,Y2)=T(X1,X2). The aim is to find the joint PDF fY1,Y2(y1,y2) of Y1,Y2.

Define (Y1,Y2)=T(X1,X2)=(Y1(X1,X2),Y2(X1,X2)) where T is some one-to-one transformation. Set A={(x1,x2):fX1,X2(x1,x2)>0}. If T is a one-to-one function and the Jacobian of T1, denoted (x1,x2)(y1,y2), is non-zero in T(A), then the joint PDF of Y1,Y2 is fY1,Y2(y1,y2)={fX1,X2(x1(y1,y2),x2(y1,y2))|(x1,x2)(y1,y2)|,if (y1,y2)T(A),0,otherwise.

Let X1,X2 be IID as U(0,1). Define Y1=X1+X2,andY2=X1X2. Find the joint PDF of Y1 and Y2.



The joint PDF of X1 and X2 is

fX1,X2(x1,x2)=fX1(x1)fX2(x2)={1,if 0x1,x21,0,otherwise.

Now T:(x1,x2)(y1,y2) is defined by

y1(x1,x2)=x1+x2,andy2(x1,x2)=x1x2.

The inverse T1:(y1,y2)(x1,x2) is given by

x1(y1,y2)=y1+y22,andx2(y1,y2)=y1y22.

The Jacobian of T1 is

(x1,x2)(y1,y2)=det(x1y1x1y2x2y1x2y2)=det(12121212)=12.

The set of points at which fX,Y is positive is

A={(x1,x2):fX,Y(x,y)>0}={(x1,x2):0x1,x21}.

Rewriting the bounding lines of A in terms of y1,y2 obtain

x1=0y1+y22=0y1+y2=0,x1=1y1+y22=1y1+y2=2,x2=0y1y22=0y1y2=0,x2=1y1y22=1y1y2=2.

It follows that

T(A)={(y1,y2):0y1+y2,y1y22}.
Therefore by Theorem 5.2.2
fY1,Y2(y1,y2)={fX1,X2(y1+y22,y1y22)|12|,if (y1,y2)T(A),0,otherwise.={12,if 0y1+y2,y1y22,0,otherwise.
Let X1,X2 be IID as the exponential distribution Exp(λ). Define Y1=X1X2andY2=X1+X2. Find the joint PDF of Y1 and Y2, and the PDF of Y1.



The joint PDF of X1 and X2 is given by

fX1,X2(x1,x2)=fX1(x1)fX2(x2)={λeλx1λeλx2,if x1,x2>0,0,otherwise,={λ2eλ(x1+x2),if x1,x2>0,0,otherwise.

Now T:(x1,x2)(y1,y2) is defined by

y1=x1x2andy2=x1+x2.

The inverse T1:(y1,y2)(x1,x2) is given by

x1=y1y2y1+1andx2=y2y1+1.

The Jacobian of T1 is

(x1,x2)(y1,y2)=det(x1y1x1y2x2y1x2y2)=det(y2(y1+1)2y1y1+1y2(y1+1)21y1+1)=y2(y1+1)3+y1y2(y1+1)3=y2(y1+1)2.

The set of points at which fX,Y is positive is

A={(x1,x2):fX1,X2(x1,x2)>0}={(x1,x2):x1,x2>0}.

Since x1,x2>0, it follows y1=x1x2>0. Furthermore, since x1=y1y2y1+1>0, then y1y2>0 implies y2>0. Therefore,

T(A)={(y1,y2):y1>0,y2>0}.

Consequently by Theorem 5.2.2

f={fX1,X2(y1y21+y1,y21+y1)|(x1,x2)(y1,y2)|,if (y1,y2)T(A),0,otherwise,={λ2eλ(y1y2(1+y1)+y2(1+y1))y2(1+y1)2,if y1,y2>0,0,otherwise,={λ2eλy2y2(1+y1)2,if y1,y2>0,0,otherwise.


The PDF of Y1 is the marginal PDF of Y1 coming from the joint PDF fY1,Y2(y1,y2). Therefore if y1>0:

fY1(y1)=0λ2eλy2y2(1+y1)2dy2=1(1+y1)20λeλy2dy2=1(1+y1)2.

So,

fY1(y1)={1(1+y1)2,if y1>0,0,otherwise.

This method to understand probability density functions under transformations extends to the case of n random variables.

5.3 Maximum and Minimums

Consider a machine that has a number of components. The lifetime of the machine is determined by how long all the individual components continue to work for, that is, if one component breaks then the machine breaks. How does one describe the lifetime of the machine in terms of the lifetime of each of the components?

In mathematical terms: suppose one can model the lifetime of each of the individual components by random variables X1,X2,,Xn. The lifetime of the machine is then given by min(X1,X2,,Xn). Given knowledge of the distributions X1,X2,,Xn, can one calculate the CDF or PDF of min(X1,X2,,Xn), or for that matter max(X1,X2,,Xn)?

Note that the funcions max and min are not of the form of the functions considered in Section 5.2, so the theory there does not apply.

Let X1,X2,,Xn be IID random variables each with CDF given by FX(x). Then

  • The random variable Y=min(X1,X2,,Xn) has CDF given by FY(y)=1(1FX(y))n for any real number y.

  • The random variable Z=max(X1,X2,,Xn) has CDF given by FZ(z)=FX(z)n for any real number z.

Can you justify either of the formulas that appear in Theorem 5.3.1?

What are the PDFs of the random variables Y and Z that appear in Theorem 5.3.1? Give your answer in terms of the CDF and the PDF of the X1,,Xn random variables.

Typically F1 cars will change to fresh tires once or twice during a race by using a pit stop. Obviously teams want to make this change as quickly as possible. From when the car pulls up, the four tires are changed simultaneously: on average it takes 3 seconds to change a tire, and the time taken is distributed exponentially. Lewis Hamilton needs his complete pit stop to take less than 2.5 seconds. What is the probability that he gets his wish?



Interpreting the question mathematically: the time it takes to change each of the four tires is given by a random variable T1,T2,T3,T4 respectively. These random variables are IID and distributed by Exp(13). The 13 has come from the fact that we know the average tire change time to be 3 seconds, and an exponential distribution Exp(λ) has average 1λ. Lewis Hamilton wants a pit stop of less than 2.5 seconds and for this to happen every tire change would need to be completed quickly enough, that is, Ttotal=max(T1,T2,T3,T4) to be less than 2.5. Therefore we calculate P(Ttotal<2.5).

Since T1,T2,T3,T4 are distributed by Exp(13), we have for i=1,2,3,4 that FTi(t)={1et3,if t>0,0,if t0. Since Ttotal=max(T1,T2,T3,T4) by Theorem 5.3.1, the CDF of Ttotal is FTtotal(t)=FT1(t)4={(1et3)4,if t>0,0,if t0. Therefore P(Ttotal<2.5)=FTtotal(2.5)=(1e2.53)4=(1e56)40.102.