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=M0e−T4. What is the distribution of M0?
One-dimensional Transformations
Consider a continuous random variable X whose PDF is fX(x) and CDF is FX(x). Let g:R→R 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:
Compute the CDF of Y, that is
FY(y)=P(Y≤y)
by substituting Y for g(X), rearranging to write the event Y≤y in terms of X and y, and finally using the known expressions for FX(x) and fX(x).
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 Tmeet∼Exp(λ). 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 Tmeet≥0, it follows that Ttotal=13Tmeet≥0. Therefore FTtotal(t)=0 for t<0. Instead assuming t≥0, we have
Ttotal≤t⟺13Tmeet≤t⟺Tmeet≤t13.
Using the known CDF of the exponential distribution, that is FTmeet(x)=1−e−λx, we can calculate the CDF of Ttotal:
FTtotal(t)=P(Ttotal≤t)=P(Tmeet≤t13)=FTmeet(t13)=1−e−λt13.
So the PDF of Y is:
fTtotal(t)=ddtFTtotal(t)=λ13e−λt13.
Therefore
fTtotal(t)={λ13e−λt13,if t≥00,otherwise,
that is, Ttotal∼Exp(λ13).
Consider X∼N(0,1). Let g(x)=x2, and define Y=g(X)=X2. Find the PDF of Y.
Clearly Y≥0, so it is enough to assume y is non-negative when finding FY(y) and fY(y). Calculate
FY(y)=P(Y≤y)=P(X2≤y)=P(−√y≤X≤√y)=P(X≤√y)−P(X≤−√y)=FX(√y)−FX(−√y).
Using that FX(x)=∫x−∞1√2πe−x22dx, it follows that
FY(y)=FX(√y)−FX(−√y)=∫√y−√y1√2πe−x22dx.
Now if y>0,
fY(y)=dFYdy(y)=ddy(∫√y−√y1√2πe−x22)=ddy(FX(√y)−FX(−√y))=ddy(√y)F′X(√y)−ddy(−√y)F′X(−√y)=12√y⋅1√2πe−(√y)22−(−12√y)⋅1√2πe−(−√y)22=12√2πye−y2+12√2πye−y2=1√2πye−y2.
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:A→B where A,B⊆R2 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:A→B that maps (x1,x2) to (y1,y2)=(y1(x1,x2),y2(x1,x2)), denoted ∂(y1,y2)∂(x1,x2), is
∂(y1,y2)∂(x1,x2)=det⎛⎜⎝∂y1∂x1∂y1∂x2∂y2∂x1∂y2∂x2⎞⎟⎠.
A key characteristic of a one-to-one transformation is that they are invertible. Specifically there exists a one-to-one transformation T−1:B→A such that T⋅T−1=T−1⋅T is the identity mapping. Typically if T(x1,x2)=(y1(x1,x2),y2(x1,x2)), then the inverse is notated
T−1(y1,y2)=(x1(y1,y2),x2(y1,y2)). The Jacobian of T−1 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 T−1, 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=X1−X2.
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 0≤x1,x2≤1,0,otherwise.
Now T:(x1,x2)↦(y1,y2) is defined by
y1(x1,x2)=x1+x2,andy2(x1,x2)=x1−x2.
The inverse T−1:(y1,y2)↦(x1,x2) is given by
x1(y1,y2)=y1+y22,andx2(y1,y2)=y1−y22.
The Jacobian of T−1 is
∂(x1,x2)∂(y1,y2)=det⎛⎜⎝∂x1∂y1∂x1∂y2∂x2∂y1∂x2∂y2⎞⎟⎠=det(121212−12)=−12.
The set of points at which fX,Y is positive is
A={(x1,x2):fX,Y(x,y)>0}={(x1,x2):0≤x1,x2≤1}.
Rewriting the bounding lines of A in terms of y1,y2 obtain
x1=0⟺y1+y22=0⟺y1+y2=0,x1=1⟺y1+y22=1⟺y1+y2=2,x2=0⟺y1−y22=0⟺y1−y2=0,x2=1⟺y1−y22=1⟺y1−y2=2.
It follows that
T(A)={(y1,y2):0≤y1+y2,y1−y2≤2}.
Therefore by Theorem 5.2.2
fY1,Y2(y1,y2)=⎧⎨⎩fX1,X2(y1+y22,y1−y22)⋅∣∣−12∣∣,if (y1,y2)∈T(A),0,otherwise.={12,if 0≤y1+y2,y1−y2≤2,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 T−1:(y1,y2)↦(x1,x2) is given by
x1=y1y2y1+1andx2=y2y1+1.
The Jacobian of T−1 is
∂(x1,x2)∂(y1,y2)=det⎛⎜⎝∂x1∂y1∂x1∂y2∂x2∂y1∂x2∂y2⎞⎟⎠=det⎛⎝y2(y1+1)2y1y1+1−y2(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)2∫∞0λ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.
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−(1−FX(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)={1−e−t3,if t>0,0,if t≥0.
Since Ttotal=max(T1,T2,T3,T4) by Theorem 5.3.1, the CDF of Ttotal is
FTtotal(t)=FT1(t)4=⎧⎨⎩(1−e−t3)4,if t>0,0,if t≥0.
Therefore P(Ttotal<2.5)=FTtotal(2.5)=(1−e−2.53)4=(1−e−56)4≈0.102.