Books Probability and Statistical Inference

Transformation of Two Random Variables

We have considered the transformation of a single random variable 𝑋𝑋 with PDF 𝑓(𝑥)𝑓(𝑥). In continuous case, if function 𝑢(𝑥)𝑢(𝑥) is strictly increasing (or decreasing) and differentiable on the support 𝑆𝑋=(𝑎,𝑏){𝑆}_{𝑋}=(𝑎,𝑏), then the PDF of 𝑌=𝑢(𝑋)𝑌=𝑢(𝑋) is given by

𝑔(𝑦)=𝑓[𝑣(𝑦)]∣𝑣′(𝑦)∣,𝑐<𝑦<𝑑.𝑔(𝑦)=𝑓[𝑣(𝑦)]|{𝑣}^{\prime }(𝑦)|,\quad 𝑐<𝑦<𝑑.
(5.4)

where 𝑣(𝑦)𝑣(𝑦) is the inverse of 𝑢(𝑥)𝑢(𝑥) and the support 𝑆𝑌=(𝑐,𝑑){𝑆}_{𝑌}=(𝑐,𝑑) of 𝑌𝑌 is transformed from 𝑆𝑋{𝑆}_{𝑋} through 𝑢(𝑥)𝑢(𝑥).

We now consider the transformation of two random variables 𝑋1{𝑋}_{1} and 𝑋2{𝑋}_{2} of continuous type with joint PDF 𝑓(𝑥1,𝑥2)𝑓({𝑥}_{1},{𝑥}_{2}) on support 𝑆𝑋{𝑆}_{𝑋}. Suppose that the system of functions

{𝑦1=𝑢1(𝑥1,𝑥2)𝑦2=𝑢2(𝑥1,𝑥2)\begin{cases}{𝑦}_{1}={𝑢}_{1}({𝑥}_{1},{𝑥}_{2}) \\ {𝑦}_{2}={𝑢}_{2}({𝑥}_{1},{𝑥}_{2})\end{cases}

maps points in 𝑆𝑋{𝑆}_{𝑋} one-to-one and onto points in 𝑆𝑌{𝑆}_{𝑌}. Let random variables 𝑌1{𝑌}_{1} and 𝑌2{𝑌}_{2} be defined by 𝑌1=𝑢1(𝑋1,𝑋2){𝑌}_{1}={𝑢}_{1}({𝑋}_{1},{𝑋}_{2}) and 𝑌2=𝑢2(𝑋1,𝑋2){𝑌}_{2}={𝑢}_{2}({𝑋}_{1},{𝑋}_{2}). Then the joint PDF of 𝑌1{𝑌}_{1} and 𝑌2{𝑌}_{2} is given by

𝑔(𝑦1,𝑦2)=𝑓[𝑣1(𝑦1,𝑦2),𝑣2(𝑦1,𝑦2)]∣𝐽∣,(𝑦1,𝑦2)∈𝑆𝑌𝑔({𝑦}_{1},{𝑦}_{2})=𝑓[{𝑣}_{1}({𝑦}_{1},{𝑦}_{2}),{𝑣}_{2}({𝑦}_{1},{𝑦}_{2})]|𝐽|,\quad ({𝑦}_{1},{𝑦}_{2})\in {𝑆}_{𝑌}
(5.5)

where (𝑣1,𝑣2)({𝑣}_{1},{𝑣}_{2}) is the inverse of (𝑢1,𝑢2)({𝑢}_{1},{𝑢}_{2}) and

𝐽=∣∂𝑣1∂𝑦1∂𝑣1∂𝑦2∂𝑣2∂𝑦1∂𝑣2∂𝑦2∣𝐽=\begin{vmatrix}\frac{\partial {𝑣}_{1}}{\partial {𝑦}_{1}} & \frac{\partial {𝑣}_{1}}{\partial {𝑦}_{2}} \\ \frac{\partial {𝑣}_{2}}{\partial {𝑦}_{1}} & \frac{\partial {𝑣}_{2}}{\partial {𝑦}_{2}}\end{vmatrix}

is the Jacobian determinant of (𝑣1,𝑣2)({𝑣}_{1},{𝑣}_{2}) with respect to (𝑦1,𝑦2)({𝑦}_{1},{𝑦}_{2}).

Note
Equation (5.5) extends the pattern of (5.4) from a function of one variable to a transformation given by functions of several variables: the inverse (𝑣1,𝑣2)({𝑣}_{1},{𝑣}_{2}) replaces 𝑣(𝑦)𝑣(𝑦), and the Jacobian factor ∣𝐽∣|𝐽| replaces the derivative factor ∣𝑣′(𝑦)∣|{𝑣}^{\prime }(𝑦)|.
Example 5.3

Let 𝑋1{𝑋}_{1} and 𝑋2{𝑋}_{2} have the joint PDF

𝑓(𝑥1,𝑥2)=2,0<𝑥1<𝑥2<1.𝑓({𝑥}_{1},{𝑥}_{2})=2,\quad 0<{𝑥}_{1}<{𝑥}_{2}<1.

Let 𝑌1=𝑋1/𝑋2{𝑌}_{1}={𝑋}_{1}/{𝑋}_{2} and 𝑌2=𝑋2{𝑌}_{2}={𝑋}_{2}. That is, 𝑢1(𝑥1,𝑥2)=𝑥1/𝑥2{𝑢}_{1}({𝑥}_{1},{𝑥}_{2})={𝑥}_{1}/{𝑥}_{2} and 𝑢2(𝑥1,𝑥2)=𝑥2{𝑢}_{2}({𝑥}_{1},{𝑥}_{2})={𝑥}_{2}. The support 𝑆𝑋={(𝑥1,𝑥2):0<𝑥1<𝑥2<1}{𝑆}_{𝑋}=\{({𝑥}_{1},{𝑥}_{2}):0<{𝑥}_{1}<{𝑥}_{2}<1\} is transformed to 𝑆𝑌={(𝑦1,𝑦2):0<𝑦1<1,0<𝑦2<1}{𝑆}_{𝑌}=\{({𝑦}_{1},{𝑦}_{2}):0<{𝑦}_{1}<1,0<{𝑦}_{2}<1\} through (𝑢1,𝑢2)({𝑢}_{1},{𝑢}_{2}).

Figure 5.3 Supports for the preceding example: (a) 𝑆𝑋={(𝑥1,𝑥2):0<𝑥1<𝑥2<1}{𝑆}_{𝑋}=\{({𝑥}_{1},{𝑥}_{2}):0<{𝑥}_{1}<{𝑥}_{2}<1\}; (b) 𝑆𝑌={(𝑦1,𝑦2):0<𝑦1<1,0<𝑦2<1}{𝑆}_{𝑌}=\{({𝑦}_{1},{𝑦}_{2}):0<{𝑦}_{1}<1,0<{𝑦}_{2}<1\}.

Figure 5.3 shows 𝑆𝑋{𝑆}_{𝑋} as the upper triangle of the unit square (above the diagonal 𝑥1=𝑥2{𝑥}_{1}={𝑥}_{2}) and 𝑆𝑌{𝑆}_{𝑌} as the full open unit square. Evidently, 𝑋1{𝑋}_{1} and 𝑋2{𝑋}_{2} are dependent. However, we will show that 𝑌1{𝑌}_{1} and 𝑌2{𝑌}_{2} are independent.

Note
This is not a substitute for a careful argument; it is only a mental draft for guessing 𝑆𝑌{𝑆}_{𝑌} before you check inequalities and bijectivity properly. In your head, trace where each piece of the boundary of 𝑆𝑋{𝑆}_{𝑋} goes under (𝑢1,𝑢2)({𝑢}_{1},{𝑢}_{2}): segments suggest edges of 𝑆𝑌{𝑆}_{𝑌}, and corners suggest corners (sometimes several corners of 𝑆𝑋{𝑆}_{𝑋} collapse to one point of 𝑆𝑌{𝑆}_{𝑌}, or conversely a single vertex of 𝑆𝑋{𝑆}_{𝑋} traces out part of an edge of 𝑆𝑌{𝑆}_{𝑌}). Then decide which side of that boundary is the plausible interior for a one-to-one map from 𝑆𝑋{𝑆}_{𝑋}.

The inverse map is given by

𝑣1(𝑦1,𝑦2)=𝑦1𝑦2,𝑣2(𝑦1,𝑦2)=𝑦2.{𝑣}_{1}({𝑦}_{1},{𝑦}_{2})={𝑦}_{1}{𝑦}_{2},\quad {𝑣}_{2}({𝑦}_{1},{𝑦}_{2})={𝑦}_{2}.

Compute the Jacobian:

𝐽=∣∂𝑣1∂𝑦1∂𝑣1∂𝑦2∂𝑣2∂𝑦1∂𝑣2∂𝑦2∣=∣𝑦2𝑦101∣=𝑦2.𝐽=\begin{vmatrix}\frac{\partial {𝑣}_{1}}{\partial {𝑦}_{1}} & \frac{\partial {𝑣}_{1}}{\partial {𝑦}_{2}} \\ \frac{\partial {𝑣}_{2}}{\partial {𝑦}_{1}} & \frac{\partial {𝑣}_{2}}{\partial {𝑦}_{2}}\end{vmatrix}=\begin{vmatrix}{𝑦}_{2} & {𝑦}_{1} \\ 0 & 1\end{vmatrix}={𝑦}_{2}.

Thus, the joint PDF of 𝑌1{𝑌}_{1} and 𝑌2{𝑌}_{2} is given by

𝑔(𝑦1,𝑦2)=𝑓(𝑣1(𝑦1,𝑦2),𝑣2(𝑦1,𝑦2))∣𝐽∣=2𝑦2,0<𝑦1<1,0<𝑦2<1.𝑔({𝑦}_{1},{𝑦}_{2})=𝑓({𝑣}_{1}({𝑦}_{1},{𝑦}_{2}),{𝑣}_{2}({𝑦}_{1},{𝑦}_{2}))|𝐽|=2{𝑦}_{2},\quad 0<{𝑦}_{1}<1,0<{𝑦}_{2}<1.

We then compute the marginal PDFs of 𝑌1{𝑌}_{1} and 𝑌2{𝑌}_{2}. For 𝑌1{𝑌}_{1}, we have

𝑔𝑌1(𝑦1)=∫01𝑔(𝑦1,𝑦2) d𝑦2=∫012𝑦2 d𝑦2=[𝑦22]01=1,0<𝑦1<1.{𝑔}_{{𝑌}_{1}}({𝑦}_{1})={\int }_{0}^{1}𝑔({𝑦}_{1},{𝑦}_{2})\, \mathrm{d}{𝑦}_{2}={\int }_{0}^{1}2{𝑦}_{2}\, \mathrm{d}{𝑦}_{2}={[{𝑦}_{2}^{2}]}_{0}^{1}=1,\quad 0<{𝑦}_{1}<1.

And for 𝑌2{𝑌}_{2}, we have

𝑔𝑌2(𝑦2)=∫01𝑔(𝑦1,𝑦2) d𝑦1=∫012𝑦2 d𝑦1=2𝑦2,0<𝑦2<1.{𝑔}_{{𝑌}_{2}}({𝑦}_{2})={\int }_{0}^{1}𝑔({𝑦}_{1},{𝑦}_{2})\, \mathrm{d}{𝑦}_{1}={\int }_{0}^{1}2{𝑦}_{2}\, \mathrm{d}{𝑦}_{1}=2{𝑦}_{2},\quad 0<{𝑦}_{2}<1.

Note that

𝑔(𝑦1,𝑦2)=2𝑦2=𝑔𝑌1(𝑦1)𝑔𝑌2(𝑦2).𝑔({𝑦}_{1},{𝑦}_{2})=2{𝑦}_{2}={𝑔}_{{𝑌}_{1}}({𝑦}_{1}){𝑔}_{{𝑌}_{2}}({𝑦}_{2}).

This means that 𝑌1{𝑌}_{1} and 𝑌2{𝑌}_{2} are independent.

With the techniques of transformation of two random variables, we will develop two important distributions in the following examples.

Example 5.4

Let 𝑋1{𝑋}_{1} and 𝑋2{𝑋}_{2} have independent gamma distributions, 𝑋1∼Gamma⁡(α,θ){𝑋}_{1}∼\operatorname{Gamma}(\alpha ,\theta ) and 𝑋2∼Gamma⁡(β,θ){𝑋}_{2}∼\operatorname{Gamma}(\beta ,\theta ). Since 𝑋1{𝑋}_{1} and 𝑋2{𝑋}_{2} are independent, the joint PDF of 𝑋1{𝑋}_{1} and 𝑋2{𝑋}_{2} is the product of the two gamma PDFs:

𝑓(𝑥1,𝑥2)=1Γ(α)Γ(β)θα+β𝑥1α−1𝑥2β−1𝑒−(𝑥1+𝑥2)/θ,𝑥1>0,𝑥2>0.𝑓({𝑥}_{1},{𝑥}_{2})=\frac{1}{\Gamma (\alpha )\Gamma (\beta ){\theta }^{\alpha +\beta }}{𝑥}_{1}^{\alpha -1}{𝑥}_{2}^{\beta -1}{𝑒}^{-({𝑥}_{1}+{𝑥}_{2})/\theta },\quad {𝑥}_{1}>0,{𝑥}_{2}>0.

Let

𝑌1=𝑋1𝑋1+𝑋2and𝑌2=𝑋1+𝑋2.{𝑌}_{1}=\frac{{𝑋}_{1}}{{𝑋}_{1}+{𝑋}_{2}}\quad \text{and}\quad {𝑌}_{2}={𝑋}_{1}+{𝑋}_{2}.

Under this transformation, the support 𝑆𝑋{𝑆}_{𝑋}, the first quadrant of the 2D plane, is transformed to

𝑆𝑌={(𝑦1,𝑦2):0<𝑦1<1,𝑦2>0}.{𝑆}_{𝑌}=\{({𝑦}_{1},{𝑦}_{2}):0<{𝑦}_{1}<1,{𝑦}_{2}>0\}.

Geometrically, 𝑆𝑌{𝑆}_{𝑌} is an infinite vertical strip: the 𝑦1{𝑦}_{1}-coordinate is confined to an interval of length 11, while the 𝑦2{𝑦}_{2}-coordinate is unbounded above.

The inverse map is given by

𝑣1(𝑦1,𝑦2)=𝑦1𝑦2,𝑣2(𝑦1,𝑦2)=(1−𝑦1)𝑦2.{𝑣}_{1}({𝑦}_{1},{𝑦}_{2})={𝑦}_{1}{𝑦}_{2},\quad {𝑣}_{2}({𝑦}_{1},{𝑦}_{2})=(1-{𝑦}_{1}){𝑦}_{2}.

Compute the Jacobian:

𝐽=∣𝑦2𝑦1−𝑦21−𝑦1∣=𝑦2.𝐽=\begin{vmatrix}{𝑦}_{2} & {𝑦}_{1} \\ -{𝑦}_{2} & 1-{𝑦}_{1}\end{vmatrix}={𝑦}_{2}.

Applying the change-of-variable technique, the joint PDF of 𝑌1{𝑌}_{1} and 𝑌2{𝑌}_{2} is given by

𝑔(𝑦1,𝑦2)=1Γ(α)Γ(β)θα+β𝑦1α−1(1−𝑦1)β−1𝑦2α+β−1𝑒−𝑦2/θ,0<𝑦1<1,𝑦2>0.𝑔({𝑦}_{1},{𝑦}_{2})=\frac{1}{\Gamma (\alpha )\Gamma (\beta ){\theta }^{\alpha +\beta }}{𝑦}_{1}^{\alpha -1}{(1-{𝑦}_{1})}^{\beta -1}{𝑦}_{2}^{\alpha +\beta -1}{𝑒}^{-{𝑦}_{2}/\theta },\quad 0<{𝑦}_{1}<1,{𝑦}_{2}>0.

We are interested in the marginal PDF of 𝑌1{𝑌}_{1}. Integrating over 𝑦2{𝑦}_{2}, we

𝑔𝑌1(𝑦1)=1Γ(α)Γ(β)θα+β𝑦1α−1(1−𝑦1)β−1∫0∞𝑦2α+β−1𝑒−𝑦2/θ d𝑦2⏟=𝐼.{𝑔}_{{𝑌}_{1}}({𝑦}_{1})=\frac{1}{\Gamma (\alpha )\Gamma (\beta ){\theta }^{\alpha +\beta }}{𝑦}_{1}^{\alpha -1}{(1-{𝑦}_{1})}^{\beta -1}\underbrace{{\int }_{0}^{\infty }{𝑦}_{2}^{\alpha +\beta -1}{𝑒}^{-{𝑦}_{2}/\theta }\, \mathrm{d}{𝑦}_{2}}_{=𝐼}.
(5.6)

Recall the formula for the gamma function:

Γ(𝑧)=∫0∞𝑡𝑧−1𝑒−𝑡 d𝑡,𝑧>0.\Gamma (𝑧)={\int }_{0}^{\infty }{𝑡}^{𝑧-1}{𝑒}^{-𝑡}\, \mathrm{d}𝑡,\quad 𝑧>0.

Note that the integral 𝐼𝐼 almost matches the form a gamma function. We can make it match by applying a change of variable.

𝐼=∫0∞𝑦2α+β−1𝑒−𝑦2/θ d𝑦2Substitute 𝑦2=θ𝑡=∫0∞(θ𝑡)α+β−1𝑒−𝑡θ d𝑡=θα+β∫0∞𝑡α+β−1𝑒−𝑡 d𝑡⏟=Γ(α+β)=θα+βΓ(α+β).\begin{aligned}𝐼 & ={\int }_{0}^{\infty }{𝑦}_{2}^{\alpha +\beta -1}{𝑒}^{-{𝑦}_{2}/\theta }\, \mathrm{d}{𝑦}_{2} \\ & \text{Substitute}\, {𝑦}_{2}=\theta 𝑡 \\ & ={\int }_{0}^{\infty }{(\theta 𝑡)}^{\alpha +\beta -1}{𝑒}^{-𝑡}\theta \, \mathrm{d}𝑡 \\ & ={\theta }^{\alpha +\beta }\underbrace{{\int }_{0}^{\infty }{𝑡}^{\alpha +\beta -1}{𝑒}^{-𝑡}\, \mathrm{d}𝑡}_{=\Gamma (\alpha +\beta )} \\ & ={\theta }^{\alpha +\beta }\Gamma (\alpha +\beta ).\end{aligned}

Plugging back into (5.6) yields

𝑔𝑌1(𝑦1)=Γ(α+β)Γ(α)Γ(β)𝑦1α−1(1−𝑦1)β−1.{𝑔}_{{𝑌}_{1}}({𝑦}_{1})=\frac{\Gamma (\alpha +\beta )}{\Gamma (\alpha )\Gamma (\beta )}{𝑦}_{1}^{\alpha -1}{(1-{𝑦}_{1})}^{\beta -1}.

We say 𝑌1{𝑌}_{1} has a beta distribution with parameters α\alpha and β\beta .

Formally, if a random variable 𝑋𝑋 has a PDF with the form

𝑓(𝑥)=Γ(α+β)Γ(α)Γ(β)𝑥α−1(1−𝑥)β−1,0<𝑥<1,𝑓(𝑥)=\frac{\Gamma (\alpha +\beta )}{\Gamma (\alpha )\Gamma (\beta )}{𝑥}^{\alpha -1}{(1-𝑥)}^{\beta -1},\quad 0<𝑥<1,
(5.7)

then we say 𝑋𝑋 has a beta distribution with parameters α\alpha and β\beta .

We may also develop the beta distribution by considering the function of the form

𝑓(𝑥)=𝑐⋅𝑥α−1(1−𝑥)β−1,0<𝑥<1,𝑓(𝑥)=𝑐\cdot {𝑥}^{\alpha -1}{(1-𝑥)}^{\beta -1},\quad 0<𝑥<1,

where 𝑐𝑐 is a normalizing constant to ensure the 𝑓𝑓 integrates to 11 so that 𝑓𝑓 may be a valid PDF. The beta function is defined as

𝐵(α,β)=Γ(α)Γ(β)Γ(α+β),α>0,β>0.𝐵(\alpha ,\beta )=\frac{\Gamma (\alpha )\Gamma (\beta )}{\Gamma (\alpha +\beta )},\quad \alpha >0,\beta >0.

Thus, the beta PDF can also be written as

𝑓(𝑥)=1𝐵(α,β)𝑥α−1(1−𝑥)β−1,0<𝑥<1.𝑓(𝑥)=\frac{1}{𝐵(\alpha ,\beta )}{𝑥}^{\alpha -1}{(1-𝑥)}^{\beta -1},\quad 0<𝑥<1.

Figure 5.4 shows several beta PDFs for representative parameter pairs (α,β)(\alpha ,\beta ).

Figure 5.4 Beta PDFs.

Read the picture loosely: the factor 𝑥α−1{𝑥}^{\alpha -1} pulls probability toward the left endpoint 𝑥=0𝑥=0 when α\alpha is small (the curve may spike there) and pushes it away from 00 when α\alpha is large, leaving room for a hump in the interior. The factor (1−𝑥)β−1{(1-𝑥)}^{\beta -1} does the analogous job at 𝑥=1𝑥=1.

When α=β\alpha =\beta , the two sides balance, so the density is symmetric about 0.50.5, as with (2,2)(2,2) and (5,5)(5,5); raising both parameters together keeps that balance but concentrates more mass around the middle—a bell-like profile where middling proportions are typical.

When β>α\beta >\alpha , the right endpoint wins the tug-of-war, so the hump slides toward 11 (compare (2,5)(2,5) with (5,2)(5,2)).

When both parameters are below 11, both endpoints win at once: the middle thins out and the mass sits near 00 and near 11, giving a U-shaped curve that favors very small or very large values over middling ones.

When only one parameter is below 11, that side of the interval dominates on its own—for instance, (2,0.5)(2,0.5) hugs the right edge 𝑥=1𝑥=1.

In the gamma-ratio story in Example 5.4, α\alpha and β\beta came from the two underlying gamma shapes; qualitatively, whichever shape parameter is larger tilts 𝑌1=𝑋1/(𝑋1+𝑋2){𝑌}_{1}={𝑋}_{1}/({𝑋}_{1}+{𝑋}_{2}) toward the corresponding component.

Example 5.5

Let 𝑈𝑈 and 𝑉𝑉 be two independent chi-squared random variables with 𝑟1{𝑟}_{1} and 𝑟2{𝑟}_{2} degrees of freedom, respectively. We are interested in the distribution of

𝐹=𝑈/𝑟1𝑉/𝑟2.𝐹=\frac{𝑈/{𝑟}_{1}}{𝑉/{𝑟}_{2}}.

To prevent the confusion of the random variable 𝐹𝐹 and the notation of CDF 𝐹𝐹, we will use the letter 𝑊𝑊 to denote the random variable in the rest of this example. That is,

𝑊=𝑈/𝑟1𝑉/𝑟2.𝑊=\frac{𝑈/{𝑟}_{1}}{𝑉/{𝑟}_{2}}.

Recall the formula for the PDF of χ2(𝑟){\chi }^{2}(𝑟):

𝑓(𝑥)=1Γ(𝑟/2)2𝑟/2𝑥𝑟/2−1𝑒−𝑥/2,𝑥>0.𝑓(𝑥)=\frac{1}{\Gamma (𝑟/2){2}^{𝑟/2}}{𝑥}^{𝑟/2-1}{𝑒}^{-𝑥/2},\quad 𝑥>0.

Because 𝑈𝑈 and 𝑉𝑉 are independent, their joint PDF is given by

𝑔(𝑢,𝑣)=1Γ(𝑟1/2)2𝑟1/2𝑢𝑟1/2−1𝑒−𝑢/2⋅1Γ(𝑟2/2)2𝑟2/2𝑣𝑟2/2−1𝑒−𝑣/2,𝑢>0,𝑣>0.𝑔(𝑢,𝑣)=\frac{1}{\Gamma ({𝑟}_{1}/2){2}^{{𝑟}_{1}/2}}{𝑢}^{{𝑟}_{1}/2-1}{𝑒}^{-𝑢/2}\cdot \frac{1}{\Gamma ({𝑟}_{2}/2){2}^{{𝑟}_{2}/2}}{𝑣}^{{𝑟}_{2}/2-1}{𝑒}^{-𝑣/2},\quad 𝑢>0,𝑣>0.

We want to find the CDF 𝐹(𝑤)𝐹(𝑤) of 𝑊𝑊. We have

𝐹(𝑤)=P(𝑊≤𝑤)=P(𝑈/𝑟1𝑉/𝑟2≤𝑤)=P(𝑈≤(𝑟1/𝑟2)𝑤𝑉).𝐹(𝑤)=ℙ(𝑊\leq 𝑤)=ℙ\left(\frac{𝑈/{𝑟}_{1}}{𝑉/{𝑟}_{2}}\leq 𝑤\right)=ℙ(𝑈\leq ({𝑟}_{1}/{𝑟}_{2})𝑤𝑉).

The event {𝑈≤(𝑟1/𝑟2)𝑤𝑉}\{𝑈\leq ({𝑟}_{1}/{𝑟}_{2})𝑤𝑉\} yields a region in the 𝑢𝑣𝑢𝑣-plane, displayed in Figure 5.5, that we should integrate over to find the CDF.

Figure 5.5 Region in the 𝑢𝑣𝑢𝑣-plane for the event {𝑈≤(𝑟1/𝑟2)𝑤𝑉}\{𝑈\leq ({𝑟}_{1}/{𝑟}_{2})𝑤𝑉\}.

Thus,

𝐹(𝑤)=∫0∞∫0(𝑟1/𝑟2)𝑤𝑣𝑔(𝑢,𝑣) d𝑢 d𝑣.𝐹(𝑤)={\int }_{0}^{\infty }{\int }_{0}^{({𝑟}_{1}/{𝑟}_{2})𝑤𝑣}𝑔(𝑢,𝑣)\, \mathrm{d}𝑢\, \mathrm{d}𝑣.

Differentiate with respect to 𝑤𝑤:

𝑓(𝑤)=𝐹′(𝑤)=dd𝑤∫0∞∫0(𝑟1/𝑟2)𝑤𝑣𝑔(𝑢,𝑣) d𝑢 d𝑣=∫0∞dd𝑤∫0(𝑟1/𝑟2)𝑤𝑣𝑔(𝑢,𝑣) d𝑢 d𝑣=∫0∞(𝑟1/𝑟2)𝑣⋅𝑔((𝑟1/𝑟2)𝑤𝑣,𝑣) d𝑣\begin{aligned}𝑓(𝑤)={𝐹}^{\prime }(𝑤) & =\frac{\mathrm{d}}{\mathrm{d}𝑤}{\int }_{0}^{\infty }{\int }_{0}^{({𝑟}_{1}/{𝑟}_{2})𝑤𝑣}𝑔(𝑢,𝑣)\, \mathrm{d}𝑢\, \mathrm{d}𝑣 \\ & ={\int }_{0}^{\infty }\frac{\mathrm{d}}{\mathrm{d}𝑤}{\int }_{0}^{({𝑟}_{1}/{𝑟}_{2})𝑤𝑣}𝑔(𝑢,𝑣)\, \mathrm{d}𝑢\, \mathrm{d}𝑣 \\ & ={\int }_{0}^{\infty }({𝑟}_{1}/{𝑟}_{2})𝑣\cdot 𝑔(({𝑟}_{1}/{𝑟}_{2})𝑤𝑣,𝑣)\, \mathrm{d}𝑣\end{aligned}
(5.8)

Moving terms independent of 𝑣𝑣 out of the integral, we get

𝑓(𝑤)=(𝑟1/𝑟2)𝑟1/2𝑤𝑟1/2−1Γ(𝑟1/2)Γ(𝑟2/2)2(𝑟1+𝑟2)/2⋅∫0∞𝑣𝑟1+𝑟22−1exp⁡[−[(𝑟1/𝑟2)𝑤+1]𝑣2] d𝑣⏟=𝐼.\begin{aligned}𝑓(𝑤)= & {({𝑟}_{1}/{𝑟}_{2})}^{{𝑟}_{1}/2}\frac{{𝑤}^{{𝑟}_{1}/2-1}}{\Gamma ({𝑟}_{1}/2)\Gamma ({𝑟}_{2}/2){2}^{({𝑟}_{1}+{𝑟}_{2})/2}} \\ & \cdot \underbrace{{\int }_{0}^{\infty }{𝑣}^{\frac{{𝑟}_{1}+{𝑟}_{2}}{2}-1}\exp \left[-\frac{[({𝑟}_{1}/{𝑟}_{2})𝑤+1]𝑣}{2}\right]\, \mathrm{d}𝑣}_{=𝐼}.\end{aligned}

The rest of the work is to evaluate the integral 𝐼𝐼. We note that the integrand of 𝐼𝐼 is similar to the form of a chi-squared PDF. Substituting 𝑣=𝑡/[(𝑟1/𝑟2)𝑤+1]𝑣=𝑡/[({𝑟}_{1}/{𝑟}_{2})𝑤+1] into 𝐼𝐼, we get

𝐼=1[(𝑟1/𝑟2)𝑤+1]𝑟1+𝑟22∫0∞𝑡𝑟1+𝑟22−1𝑒−𝑡/2⏟Compare to the PDF of χ2(𝑟1+𝑟2) d𝑡=1[(𝑟1/𝑟2)𝑤+1]𝑟1+𝑟22Γ(𝑟1+𝑟22)2𝑟1+𝑟22.\begin{aligned}𝐼 & =\frac{1}{{[({𝑟}_{1}/{𝑟}_{2})𝑤+1]}^{\frac{{𝑟}_{1}+{𝑟}_{2}}{2}}}{\int }_{0}^{\infty }\underbrace{{𝑡}^{\frac{{𝑟}_{1}+{𝑟}_{2}}{2}-1}{𝑒}^{-𝑡/2}}_{\text{Compare to the PDF of}\, {\chi }^{2}({𝑟}_{1}+{𝑟}_{2})}\, \mathrm{d}𝑡 \\ & =\frac{1}{{[({𝑟}_{1}/{𝑟}_{2})𝑤+1]}^{\frac{{𝑟}_{1}+{𝑟}_{2}}{2}}}\Gamma \left(\frac{{𝑟}_{1}+{𝑟}_{2}}{2}\right){2}^{\frac{{𝑟}_{1}+{𝑟}_{2}}{2}}.\end{aligned}

Plugging 𝐼𝐼 back into (5.8) yields

𝑓(𝑤)=(𝑟1/𝑟2)𝑟1/2Γ(𝑟1+𝑟22)Γ(𝑟1/2)Γ(𝑟2/2)⋅𝑤𝑟1/2−1[(𝑟1/𝑟2)𝑤+1]𝑟1+𝑟22,𝑤>0.𝑓(𝑤)={({𝑟}_{1}/{𝑟}_{2})}^{{𝑟}_{1}/2}\frac{\Gamma \left(\frac{{𝑟}_{1}+{𝑟}_{2}}{2}\right)}{\Gamma ({𝑟}_{1}/2)\Gamma ({𝑟}_{2}/2)}\cdot \frac{{𝑤}^{{𝑟}_{1}/2-1}}{{[({𝑟}_{1}/{𝑟}_{2})𝑤+1]}^{\frac{{𝑟}_{1}+{𝑟}_{2}}{2}}},\quad 𝑤>0.
(5.9)

Suppose that 𝑟1,𝑟2∈Z+{𝑟}_{1},{𝑟}_{2}\in {\mathbb{Z}}^{+}. We say random variable 𝑊𝑊 has a 𝐹𝐹-distribution with 𝑟1{𝑟}_{1} and 𝑟2{𝑟}_{2} degrees of freedom if its PDF is given by (5.9).

Remark
Note that when 𝑟1≥2{𝑟}_{1}\geq 2, we have 𝑟1/2−1≥0{𝑟}_{1}/2-1\geq 0. Thus the PDF 𝑓(𝑤)𝑓(𝑤) in (5.9) may have a definition at 𝑤=0𝑤=0.

Graphs of the 𝐹𝐹-distribution PDFs for representative parameter pairs (𝑟1,𝑟2)({𝑟}_{1},{𝑟}_{2}) are shown in Figure 5.6.

Figure 5.6 𝐹𝐹-distribution PDFs.

When 𝑟1=2{𝑟}_{1}=2, every PDF in Figure 5.6 decreases from (0,1)(0,1), regardless of 𝑟2{𝑟}_{2}. We can prove this as an exercise.

Exercise 5.5
Let 𝑊𝑊 have a 𝐹𝐹-distribution with 𝑟1{𝑟}_{1} and 𝑟2{𝑟}_{2} degrees of freedom. Show that if 𝑟1=2{𝑟}_{1}=2, then the PDF of 𝑊𝑊 is decreasing with mode 00, and the maximum value of the PDF is 11.
Proof

When 𝑟1=2{𝑟}_{1}=2, the PDF is given by

𝑓(𝑤)=2𝑟2⋅Γ(𝑟2/2+1)Γ(1)Γ(𝑟2/2)⋅1[(2/𝑟2)𝑤+1]𝑟2/2+1,𝑤≥0.𝑓(𝑤)=\frac{2}{{𝑟}_{2}}\cdot \frac{\Gamma ({𝑟}_{2}/2+1)}{\Gamma (1)\Gamma ({𝑟}_{2}/2)}\cdot \frac{1}{{[(2/{𝑟}_{2})𝑤+1]}^{{𝑟}_{2}/2+1}},\quad 𝑤\geq 0.

Recall the property of the gamma function:

Γ(𝑧+1)=𝑧Γ(𝑧).\Gamma (𝑧+1)=𝑧\Gamma (𝑧).

The formula for 𝑓(𝑤)𝑓(𝑤) can be further simplified as

𝑓(𝑤)=1[(2/𝑟2)𝑤+1]𝑟2/2+1.𝑓(𝑤)=\frac{1}{{[(2/{𝑟}_{2})𝑤+1]}^{{𝑟}_{2}/2+1}}.

Clearly, 𝑓(𝑤)𝑓(𝑤) is decreasing, and the maximum value of the PDF is 𝑓(0)=1𝑓(0)=1.

Recall the construction of an 𝐹𝐹 random variable:

𝐹=𝑈/𝑟1𝑉/𝑟2,𝐹=\frac{𝑈/{𝑟}_{1}}{𝑉/{𝑟}_{2}},

where 𝑈𝑈 and 𝑉𝑉 are independent chi-squared random variables with 𝑟1{𝑟}_{1} and 𝑟2{𝑟}_{2} degrees of freedom, respectively. Note that if we take the reciprocal of 𝐹𝐹, we get

1𝐹=𝑉/𝑟2𝑈/𝑟1,\frac{1}{𝐹}=\frac{𝑉/{𝑟}_{2}}{𝑈/{𝑟}_{1}},

which also follows an 𝐹𝐹-distribution but with 𝑟1{𝑟}_{1} and 𝑟2{𝑟}_{2} swapped, i.e. 𝐹(𝑟2,𝑟1)𝐹({𝑟}_{2},{𝑟}_{1}).

For a right-tail probability of α\alpha , we write

P(𝑊≥𝐹α(𝑟1,𝑟2))=α.ℙ(𝑊\geq {𝐹}_{\alpha }({𝑟}_{1},{𝑟}_{2}))=\alpha .

Of course, for a left-tail probability of α\alpha , we have

P(𝑊≤𝐹1−α(𝑟1,𝑟2))=α.ℙ(𝑊\leq {𝐹}_{1-\alpha }({𝑟}_{1},{𝑟}_{2}))=\alpha .

For the random variable 1/𝑊1/𝑊, we have

P(1/𝑊≥1/𝐹1−α(𝑟1,𝑟2))=P(𝑊≤𝐹1−α(𝑟1,𝑟2))=α.ℙ(1/𝑊\geq 1/{𝐹}_{1-\alpha }({𝑟}_{1},{𝑟}_{2}))=ℙ(𝑊\leq {𝐹}_{1-\alpha }({𝑟}_{1},{𝑟}_{2}))=\alpha .

On the other hand, Since 1/𝑊∼𝐹(𝑟2,𝑟1)1/𝑊∼𝐹({𝑟}_{2},{𝑟}_{1}),

P(1/𝑊≥𝐹α(𝑟2,𝑟1))=α.ℙ(1/𝑊\geq {𝐹}_{\alpha }({𝑟}_{2},{𝑟}_{1}))=\alpha .

It then follows that

1𝐹1−α(𝑟1,𝑟2)=𝐹α(𝑟2,𝑟1).\frac{1}{{𝐹}_{1-\alpha }({𝑟}_{1},{𝑟}_{2})}={𝐹}_{\alpha }({𝑟}_{2},{𝑟}_{1}).

Next we introduce an important simulation tool, the Box-Muller transformation, whose main role is to turn independent uniforms into independent standard normal random variables (Gaussian noise, in applications).

Let 𝑈1{𝑈}_{1} and 𝑈2{𝑈}_{2} be independent random variables, each uniformly distributed on (0,1)(0,1). Define

𝑍1=−2ln⁡𝑈1cos⁡(2π𝑈2)and𝑍2=−2ln⁡𝑈1sin⁡(2π𝑈2).{𝑍}_{1}=\sqrt{-2\ln {𝑈}_{1}}\cos (2\pi {𝑈}_{2})\quad \text{and}\quad {𝑍}_{2}=\sqrt{-2\ln {𝑈}_{1}}\sin (2\pi {𝑈}_{2}).

Geometrically, −2ln⁡𝑈1\sqrt{-2\ln {𝑈}_{1}}, which ranges over (0,∞)(0,\infty ), is the Euclidean radius of (𝑍1,𝑍2)({𝑍}_{1},{𝑍}_{2}) in the (𝑧1,𝑧2)({𝑧}_{1},{𝑧}_{2})-plane, while cos⁡(2π𝑈2)\cos (2\pi {𝑈}_{2}) and sin⁡(2π𝑈2)\sin (2\pi {𝑈}_{2}) fix the direction. Note that the polar angle 2π𝑈22\pi {𝑈}_{2} lies in (0,2π)(0,2\pi ). Intuitively, the open unit square—the support of (𝑈1,𝑈2)({𝑈}_{1},{𝑈}_{2})—is mapped onto the whole (𝑧1,𝑧2)({𝑧}_{1},{𝑧}_{2})-plane with the origin and the positive 𝑧1{𝑧}_{1}-axis removed. We have

𝑍12+𝑍22=−2ln⁡𝑈1{𝑍}_{1}^{2}+{𝑍}_{2}^{2}=-2\ln {𝑈}_{1}

and, whenever 𝑈2{𝑈}_{2} is neither π/2\pi /2 nor 3π/23\pi /2,

𝑍2𝑍1=tan⁡(2π𝑈2).\frac{{𝑍}_{2}}{{𝑍}_{1}}=\tan (2\pi {𝑈}_{2}).

We now consider the inverse transformation. Clearly

𝑈1=𝑣1(𝑍1,𝑍2)=exp⁡(−𝑍12+𝑍222).{𝑈}_{1}={𝑣}_{1}({𝑍}_{1},{𝑍}_{2})=\exp \left(-\frac{{𝑍}_{1}^{2}+{𝑍}_{2}^{2}}{2}\right).

To obtain a formula for 𝑈2{𝑈}_{2}, we must be careful with arctan⁡\operatorname{arctan} and quadrant ambiguities, so we treat the cases by quadrant. We have

𝑈2=𝑣2(𝑍1,𝑍2)={12πarctan⁡(𝑍2/𝑍1),𝑍1>0,𝑍2>012πarctan⁡(𝑍2/𝑍1)+12,𝑍1<012πarctan⁡(𝑍2/𝑍1)+1,𝑍1>0,𝑍2<014,𝑍1=0,𝑍2>034,𝑍1=0,𝑍2<0{𝑈}_{2}={𝑣}_{2}({𝑍}_{1},{𝑍}_{2})=\begin{cases}\frac{1}{2\pi }\operatorname{arctan}({𝑍}_{2}/{𝑍}_{1}),\quad & {𝑍}_{1}>0,{𝑍}_{2}>0 \\ \frac{1}{2\pi }\operatorname{arctan}({𝑍}_{2}/{𝑍}_{1})+\frac{1}{2},\quad & {𝑍}_{1}<0 \\ \frac{1}{2\pi }\operatorname{arctan}({𝑍}_{2}/{𝑍}_{1})+1,\quad & {𝑍}_{1}>0,{𝑍}_{2}<0 \\ \frac{1}{4},\quad & {𝑍}_{1}=0,{𝑍}_{2}>0 \\ \frac{3}{4},\quad & {𝑍}_{1}=0,{𝑍}_{2}<0\end{cases}

The Jacobian is given by

𝐽=∣−𝑧1exp⁡(−𝑧12+𝑧222)−𝑧2exp⁡(−𝑧12+𝑧222)−12π⋅𝑧2𝑧12+𝑧2212π⋅𝑧1𝑧12+𝑧22∣=−12πexp⁡(−𝑧12+𝑧222).𝐽=\begin{vmatrix}-{𝑧}_{1}\exp \left(-\frac{{𝑧}_{1}^{2}+{𝑧}_{2}^{2}}{2}\right) & -{𝑧}_{2}\exp \left(-\frac{{𝑧}_{1}^{2}+{𝑧}_{2}^{2}}{2}\right) \\ -\frac{1}{2\pi }\cdot \frac{{𝑧}_{2}}{{𝑧}_{1}^{2}+{𝑧}_{2}^{2}} & \frac{1}{2\pi }\cdot \frac{{𝑧}_{1}}{{𝑧}_{1}^{2}+{𝑧}_{2}^{2}}\end{vmatrix}=-\frac{1}{2\pi }\exp \left(-\frac{{𝑧}_{1}^{2}+{𝑧}_{2}^{2}}{2}\right).

Since the joint PDF of 𝑈1{𝑈}_{1} and 𝑈2{𝑈}_{2} is

𝑓(𝑢1,𝑢2)=1,0<𝑢1<1,0<𝑢2<1,𝑓({𝑢}_{1},{𝑢}_{2})=1,\quad 0<{𝑢}_{1}<1,0<{𝑢}_{2}<1,

the change-of-variables formula gives the joint PDF of 𝑍1{𝑍}_{1} and 𝑍2{𝑍}_{2} as

𝑔(𝑧1,𝑧2)=𝑓(𝑣1(𝑧1,𝑧2),𝑣2(𝑧1,𝑧2))∣𝐽∣=12πexp⁡(−𝑧12+𝑧222),𝑧1∈R,𝑧2∈R.\begin{aligned}𝑔({𝑧}_{1},{𝑧}_{2}) & =𝑓({𝑣}_{1}({𝑧}_{1},{𝑧}_{2}),{𝑣}_{2}({𝑧}_{1},{𝑧}_{2}))|𝐽| \\ & =\frac{1}{2\pi }\exp \left(-\frac{{𝑧}_{1}^{2}+{𝑧}_{2}^{2}}{2}\right),\quad {𝑧}_{1}\in \mathbb{R},{𝑧}_{2}\in \mathbb{R}.\end{aligned}

The same expression holds on R2{\mathbb{R}}^{2} with the half-line {(𝑧1,𝑧2):𝑧1≥0,𝑧2=0}\{({𝑧}_{1},{𝑧}_{2}):{𝑧}_{1}\geq 0,{𝑧}_{2}=0\} removed, where the polar-angle map is not differentiable; that set has Lebesgue measure zero, so it does not affect the distribution. Thus 𝑍1{𝑍}_{1} and 𝑍2{𝑍}_{2} are independent, and each is standard normal.

As noted earlier, inverse-transform sampling via Theorem 5.1 is awkward for standard normals because Φ−1{\Phi }^{-1} has no convenient closed form. The Box-Muller transformation avoids that obstacle. Let 𝑈1{𝑈}_{1} and 𝑈2{𝑈}_{2} be independent 𝒰(0,1)𝒰(0,1) random variables and set

𝑍=−2ln⁡𝑈1cos⁡(2π𝑈2)𝑍=\sqrt{-2\ln {𝑈}_{1}}\cos (2\pi {𝑈}_{2})

or

𝑍=−2ln⁡𝑈1sin⁡(2π𝑈2).𝑍=\sqrt{-2\ln {𝑈}_{1}}\sin (2\pi {𝑈}_{2}).

Then 𝑍∼𝒩(0,1)𝑍∼𝒩(0,1), as we showed above. Figure 5.7 gives a histogram of simulated draws of 𝑍=−2ln⁡𝑈1cos⁡(2π𝑈2)𝑍=\sqrt{-2\ln {𝑈}_{1}}\cos (2\pi {𝑈}_{2}), which tracks the 𝒩(0,1)𝒩(0,1) density closely.

Figure 5.7 Histogram of standard normal draws produced by the Box-Muller transformation using the formula 𝑍=−2ln⁡𝑈1cos⁡(2π𝑈2)𝑍=\sqrt{-2\ln {𝑈}_{1}}\cos (2\pi {𝑈}_{2}) (104{10}^{4} samples), with the theoretical PDF of 𝒩(0,1)𝒩(0,1) overlaid.

A particularly useful application is finding the PDF of the sum of two independent random variables, a problem that arises constantly in practice. The answer turns out to be remarkably compact: it is simply the convolution of the two PDFs.

Proposition 5.1

Let 𝑋𝑋 and 𝑌𝑌 be independent continuous random variables with PDFs 𝑓𝑋{𝑓}_{𝑋} and 𝑓𝑌{𝑓}_{𝑌}, respectively. Define 𝑍=𝑋+𝑌𝑍=𝑋+𝑌. Then the PDF of 𝑍𝑍 is the convolution of 𝑓𝑋{𝑓}_{𝑋} and 𝑓𝑌{𝑓}_{𝑌}:

𝑓𝑍(𝑧)=∫−∞∞𝑓𝑋(𝑤)𝑓𝑌(𝑧−𝑤) d𝑤=(𝑓𝑋∗𝑓𝑌)(𝑧).{𝑓}_{𝑍}(𝑧)={\int }_{-\infty }^{\infty }{𝑓}_{𝑋}(𝑤){𝑓}_{𝑌}(𝑧-𝑤)\, \mathrm{d}𝑤=({𝑓}_{𝑋}\ast {𝑓}_{𝑌})(𝑧).

For the proof, we use the constructive approach: define 𝑊=𝑋𝑊=𝑋 alongside 𝑍=𝑋+𝑌𝑍=𝑋+𝑌. This reframes the problem as a bivariate transformation (𝑋,𝑌)→(𝑍,𝑊)(𝑋,𝑌)\to (𝑍,𝑊), so the Jacobian method of this section applies directly.

Proof

Define 𝑊=𝑋𝑊=𝑋. Consider the transformation from (𝑋,𝑌)(𝑋,𝑌) to (𝑍,𝑊)(𝑍,𝑊):

{𝑍=𝑋+𝑌𝑊=𝑋\begin{cases}𝑍 & =𝑋+𝑌 \\ 𝑊 & =𝑋\end{cases}

Solving for (𝑋,𝑌)(𝑋,𝑌) in terms of (𝑍,𝑊)(𝑍,𝑊), we get

{𝑋=𝑊=𝑣1(𝑍,𝑊)𝑌=𝑍−𝑊=𝑣2(𝑍,𝑊)\begin{cases}𝑋 & =𝑊 & ={𝑣}_{1}(𝑍,𝑊) \\ 𝑌 & =𝑍-𝑊 & ={𝑣}_{2}(𝑍,𝑊)\end{cases}

The Jacobian is given by

𝐽=∣∂𝑣1∂𝑧∂𝑣1∂𝑤∂𝑣2∂𝑧∂𝑣2∂𝑤∣=∣011−1∣=−1.𝐽=\begin{vmatrix}\frac{\partial {𝑣}_{1}}{\partial 𝑧} & \frac{\partial {𝑣}_{1}}{\partial 𝑤} \\ \frac{\partial {𝑣}_{2}}{\partial 𝑧} & \frac{\partial {𝑣}_{2}}{\partial 𝑤}\end{vmatrix}=\begin{vmatrix}0 & 1 \\ 1 & -1\end{vmatrix}=-1.

Therefore, the joint PDF of (𝑍,𝑊)(𝑍,𝑊) is given by

𝑓𝑍𝑊(𝑧,𝑤)=𝑓𝑋𝑌(𝑤,𝑧−𝑤)∣𝐽∣=𝑓𝑋𝑌(𝑤,𝑧−𝑤).{𝑓}_{𝑍𝑊}(𝑧,𝑤)={𝑓}_{𝑋𝑌}(𝑤,𝑧-𝑤)|𝐽|={𝑓}_{𝑋𝑌}(𝑤,𝑧-𝑤).

Since 𝑋𝑋 and 𝑌𝑌 are independent, we have

𝑓𝑍𝑊(𝑧,𝑤)=𝑓𝑋(𝑤)𝑓𝑌(𝑧−𝑤).{𝑓}_{𝑍𝑊}(𝑧,𝑤)={𝑓}_{𝑋}(𝑤){𝑓}_{𝑌}(𝑧-𝑤).

Integrating out 𝑤𝑤, we get

𝑓𝑍(𝑧)=∫−∞∞𝑓𝑋(𝑤)𝑓𝑌(𝑧−𝑤) d𝑤=(𝑓𝑋∗𝑓𝑌)(𝑧).{𝑓}_{𝑍}(𝑧)={\int }_{-\infty }^{\infty }{𝑓}_{𝑋}(𝑤){𝑓}_{𝑌}(𝑧-𝑤)\, \mathrm{d}𝑤=({𝑓}_{𝑋}\ast {𝑓}_{𝑌})(𝑧).
Exercise 5.6
Let 𝑋1,𝑋2∼𝒰(0,1){𝑋}_{1},{𝑋}_{2}∼𝒰(0,1) be i.i.d.i.i.d. and 𝑌=𝑋1+𝑋2𝑌={𝑋}_{1}+{𝑋}_{2}. Find the PDF of 𝑌𝑌.
Solution

Since 𝑋1{𝑋}_{1} and 𝑋2{𝑋}_{2} are i.i.d., each has PDF

𝑓(𝑥)={1,0<𝑥<10,otherwise𝑓(𝑥)=\begin{cases}1,\quad & 0<𝑥<1 \\ 0,\quad & \text{otherwise}\end{cases}

By Proposition 5.1, the PDF of 𝑌𝑌 is the convolution

𝑔(𝑦)=(𝑓∗𝑓)(𝑦)=∫−∞∞𝑓(𝑤)𝑓(𝑦−𝑤) d𝑤.𝑔(𝑦)=(𝑓\ast 𝑓)(𝑦)={\int }_{-\infty }^{\infty }𝑓(𝑤)𝑓(𝑦-𝑤)\, \mathrm{d}𝑤.
Note
A useful picture for evaluating a convolution is to fix one function and slide the other across the 𝑤𝑤-axis. Here 𝑓(𝑤)𝑓(𝑤) stays fixed on (0,1)(0,1) while 𝑓(𝑦−𝑤)𝑓(𝑦-𝑤) acts as the sliding window; as 𝑦𝑦 varies, the window shifts. Only values of 𝑤𝑤 where both factors are nonzero contribute to the integral.
Figure 5.8 Convolution of two 𝒰(0,1)𝒰(0,1) PDFs: (a) 0<𝑦<10<𝑦<1; (b) 1≤𝑦≤21\leq 𝑦\leq 2. The shaded overlap has area 𝑔(𝑦)𝑔(𝑦).

Figure 5.8 illustrates the sliding-window picture for the two nontrivial overlap cases.

If 𝑦<0𝑦<0, the supports of 𝑓(𝑤)𝑓(𝑤) and 𝑓(𝑦−𝑤)𝑓(𝑦-𝑤) do not overlap, so 𝑔(𝑦)=0𝑔(𝑦)=0.

If 0≤𝑦<10\leq 𝑦<1, both factors equal 11 precisely when 0<𝑤<𝑦0<𝑤<𝑦, so

𝑔(𝑦)=∫−∞∞𝑓(𝑤)𝑓(𝑦−𝑤) d𝑤=∫0𝑦𝑓(𝑤)𝑓(𝑦−𝑤) d𝑤=∫0𝑦1⋅1 d𝑤=𝑦.\begin{aligned}𝑔(𝑦) & ={\int }_{-\infty }^{\infty }𝑓(𝑤)𝑓(𝑦-𝑤)\, \mathrm{d}𝑤 \\ & ={\int }_{0}^{𝑦}𝑓(𝑤)𝑓(𝑦-𝑤)\, \mathrm{d}𝑤 \\ & ={\int }_{0}^{𝑦}1\cdot 1\, \mathrm{d}𝑤 \\ & =𝑦.\end{aligned}

If 1≤𝑦≤21\leq 𝑦\leq 2, overlap occurs when 𝑦−1<𝑤<1𝑦-1<𝑤<1, so

𝑔(𝑦)=∫−∞∞𝑓(𝑤)𝑓(𝑦−𝑤) d𝑤=∫𝑦−11𝑓(𝑤)𝑓(𝑦−𝑤) d𝑤=∫𝑦−111⋅1 d𝑤=2−𝑦.\begin{aligned}𝑔(𝑦) & ={\int }_{-\infty }^{\infty }𝑓(𝑤)𝑓(𝑦-𝑤)\, \mathrm{d}𝑤 \\ & ={\int }_{𝑦-1}^{1}𝑓(𝑤)𝑓(𝑦-𝑤)\, \mathrm{d}𝑤 \\ & ={\int }_{𝑦-1}^{1}1\cdot 1\, \mathrm{d}𝑤 \\ & =2-𝑦.\end{aligned}

If 𝑦>2𝑦>2, the supports again do not overlap, so 𝑔(𝑦)=0𝑔(𝑦)=0.

Hence the PDF of 𝑌=𝑋1+𝑋2𝑌={𝑋}_{1}+{𝑋}_{2} is

𝑔(𝑦)={𝑦,0≤𝑦<12−𝑦,1≤𝑦≤20,otherwise𝑔(𝑦)=\begin{cases}𝑦,\quad & 0\leq 𝑦<1 \\ 2-𝑦,\quad & 1\leq 𝑦\leq 2 \\ 0,\quad & \text{otherwise}\end{cases}

Exercises

Exercise 5.7

Let 𝑋∼Beta⁡(α,β)𝑋∼\operatorname{Beta}(\alpha ,\beta ).

  1. Show that the mean and variance of 𝑋𝑋 are given by

    E[𝑋]=αα+βandVar⁡[𝑋]=αβ(α+β)2(α+β+1).\mathbb{E}[𝑋]=\frac{\alpha }{\alpha +\beta }\quad \text{and}\quad \operatorname{Var}[𝑋]=\frac{\alpha \beta }{{(\alpha +\beta )}^{2}(\alpha +\beta +1)}.
  2. Show that when α>1\alpha >1 and β>1\beta >1, the mode of 𝑋𝑋 is given by

    𝑥=α−1α+β−2.𝑥=\frac{\alpha -1}{\alpha +\beta -2}.
Proof

(a) We have

E[𝑋]=∫01𝑥𝑓(𝑥) d𝑥=∫011𝐵(α,β)𝑥α(1−𝑥)β−1 d𝑥=1𝐵(α,β)∫01𝑥(α+1)−1(1−𝑥)β−1 d𝑥\begin{aligned}\mathbb{E}[𝑋]={\int }_{0}^{1}𝑥𝑓(𝑥)\, \mathrm{d}𝑥 & ={\int }_{0}^{1}\frac{1}{𝐵(\alpha ,\beta )}{𝑥}^{\alpha }{(1-𝑥)}^{\beta -1}\, \mathrm{d}𝑥 \\ & =\frac{1}{𝐵(\alpha ,\beta )}{\int }_{0}^{1}{𝑥}^{(\alpha +1)-1}{(1-𝑥)}^{\beta -1}\, \mathrm{d}𝑥\end{aligned}

The trick is by comparing the integrand to the form of a beta PDF. We choose to compare to the PDF of Beta⁡(α+1,β)\operatorname{Beta}(\alpha +1,\beta ):

E[𝑋]=1𝐵(α,β)∫01𝑥(α+1)−1(1−𝑥)β−1⏟Compare to the PDF ofBeta⁡(α+1,β) d𝑥=1𝐵(α,β)⋅𝐵(α+1,β)=Γ(α+β)Γ(α)Γ(β)⋅Γ(α+1)Γ(β)Γ(α+β+1)=Γ(α+β)Γ(α)Γ(β)⋅αΓ(α)Γ(β)(α+β)Γ(α+β)=αα+β.\begin{aligned}\mathbb{E}[𝑋] & =\frac{1}{𝐵(\alpha ,\beta )}{\int }_{0}^{1}\underbrace{{𝑥}^{(\alpha +1)-1}{(1-𝑥)}^{\beta -1}}_{\text{Compare to the PDF of}\operatorname{Beta}(\alpha +1,\beta )}\, \mathrm{d}𝑥 \\ & =\frac{1}{𝐵(\alpha ,\beta )}\cdot 𝐵(\alpha +1,\beta ) \\ & =\frac{\Gamma (\alpha +\beta )}{\Gamma (\alpha )\Gamma (\beta )}\cdot \frac{\Gamma (\alpha +1)\Gamma (\beta )}{\Gamma (\alpha +\beta +1)} \\ & =\frac{\Gamma (\alpha +\beta )}{\Gamma (\alpha )\Gamma (\beta )}\cdot \frac{\alpha \Gamma (\alpha )\Gamma (\beta )}{(\alpha +\beta )\Gamma (\alpha +\beta )} \\ & =\frac{\alpha }{\alpha +\beta }.\end{aligned}

We may compute E[𝑋2]\mathbb{E}[{𝑋}^{2}] similarly:

E[𝑋2]=∫01𝑥2𝑓(𝑥) d𝑥=1𝐵(α,β)∫01𝑥(α+2)−1(1−𝑥)β−1⏟Compare to the PDF ofBeta⁡(α+2,β) d𝑥=1𝐵(α,β)⋅𝐵(α+2,β)=Γ(α+β)Γ(α)Γ(β)⋅Γ(α+2)Γ(β)Γ(α+β+2)=Γ(α+β)Γ(α)Γ(β)⋅α(α+1)Γ(α)Γ(β)(α+β)(α+β+1)Γ(α+β+2)=α(α+1)(α+β)(α+β+1).\begin{aligned}\mathbb{E}[{𝑋}^{2}]={\int }_{0}^{1}{𝑥}^{2}𝑓(𝑥)\, \mathrm{d}𝑥 & =\frac{1}{𝐵(\alpha ,\beta )}{\int }_{0}^{1}\underbrace{{𝑥}^{(\alpha +2)-1}{(1-𝑥)}^{\beta -1}}_{\text{Compare to the PDF of}\operatorname{Beta}(\alpha +2,\beta )}\, \mathrm{d}𝑥 \\ & =\frac{1}{𝐵(\alpha ,\beta )}\cdot 𝐵(\alpha +2,\beta ) \\ & =\frac{\Gamma (\alpha +\beta )}{\Gamma (\alpha )\Gamma (\beta )}\cdot \frac{\Gamma (\alpha +2)\Gamma (\beta )}{\Gamma (\alpha +\beta +2)} \\ & =\frac{\Gamma (\alpha +\beta )}{\Gamma (\alpha )\Gamma (\beta )}\cdot \frac{\alpha (\alpha +1)\Gamma (\alpha )\Gamma (\beta )}{(\alpha +\beta )(\alpha +\beta +1)\Gamma (\alpha +\beta +2)} \\ & =\frac{\alpha (\alpha +1)}{(\alpha +\beta )(\alpha +\beta +1)}.\end{aligned}

To obtain the variance, we compute:

σ2=E[𝑋2]−(E[𝑋])2=α(α+1)(α+β)(α+β+1)−(αα+β)2=αβ(α+β)2(α+β+1).\begin{aligned}{\sigma }^{2}=\mathbb{E}[{𝑋}^{2}]-{(\mathbb{E}[𝑋])}^{2} & =\frac{\alpha (\alpha +1)}{(\alpha +\beta )(\alpha +\beta +1)}-{\left(\frac{\alpha }{\alpha +\beta }\right)}^{2} \\ & =\frac{\alpha \beta }{{(\alpha +\beta )}^{2}(\alpha +\beta +1)}.\end{aligned}

(b) Taking the derivative of the beta PDF, we obtain

𝑓′(𝑥)=1𝐵(α,β)[(α−1)𝑥α−2(1−𝑥)β−1−(β−1)𝑥α−1(1−𝑥)β−2]=𝑥α−2(1−𝑥)β−2𝐵(α,β)[(α−1)(1−𝑥)−(β−1)𝑥]=𝑥α−2(1−𝑥)β−2𝐵(α,β)[(α−1)−(α+β−2)𝑥].\begin{aligned}{𝑓}^{\prime }(𝑥) & =\frac{1}{𝐵(\alpha ,\beta )}[(\alpha -1){𝑥}^{\alpha -2}{(1-𝑥)}^{\beta -1}-(\beta -1){𝑥}^{\alpha -1}{(1-𝑥)}^{\beta -2}] \\ & =\frac{{𝑥}^{\alpha -2}{(1-𝑥)}^{\beta -2}}{𝐵(\alpha ,\beta )}[(\alpha -1)(1-𝑥)-(\beta -1)𝑥] \\ & =\frac{{𝑥}^{\alpha -2}{(1-𝑥)}^{\beta -2}}{𝐵(\alpha ,\beta )}[(\alpha -1)-(\alpha +\beta -2)𝑥].\end{aligned}

Since (α+β−2)>0(\alpha +\beta -2)>0, we conlcude that 𝑓′(𝑥){𝑓}^{\prime }(𝑥) is decreasing on (0,1)(0,1).

Putting 𝑓′(𝑥∗)=0{𝑓}^{\prime }({𝑥}^{\ast })=0, we get

(α−1)−(α+β−2)𝑥∗=0,(\alpha -1)-(\alpha +\beta -2){𝑥}^{\ast }=0,

which yields

𝑥∗=α−1α+β−2.{𝑥}^{\ast }=\frac{\alpha -1}{\alpha +\beta -2}.

Note that 𝑥∗∈(0,1){𝑥}^{\ast }\in (0,1) since α>1\alpha >1 and β>1\beta >1. (The given conditions are really necessary here.) And because we have noticed that 𝑓′{𝑓}^{\prime } is decreasing on (0,1)(0,1), we may conclude that 𝑥∗{𝑥}^{\ast } is the one and only mode of 𝑋𝑋.

Exercise 5.8

Let α,β∈Z+\alpha ,\beta \in {\mathbb{Z}}^{+} and 0<𝑝<10<𝑝<1. Show that

∫0𝑝Γ(α+β)Γ(α)Γ(β)𝑥α−1(1−𝑥)β−1 d𝑥=∑𝑥=α𝑛(𝑛𝑥)𝑝𝑥(1−𝑝)𝑛−𝑥{\int }_{0}^{𝑝}\frac{\Gamma (\alpha +\beta )}{\Gamma (\alpha )\Gamma (\beta )}{𝑥}^{\alpha -1}{(1-𝑥)}^{\beta -1}\, \mathrm{d}𝑥=\sum _{𝑥=\alpha }^{𝑛}\binom{𝑛}{𝑥}{𝑝}^{𝑥}{(1-𝑝)}^{𝑛-𝑥}

where 𝑛=α+β−1𝑛=\alpha +\beta -1.

Proof

The general idea is to apply the integration by parts formula to the integral of the form

∫0𝑝𝑥𝑘(1−𝑥)𝑚 d𝑥{\int }_{0}^{𝑝}{𝑥}^{𝑘}{(1-𝑥)}^{𝑚}\, \mathrm{d}𝑥

with goal of increasing 𝑘𝑘 and reducing 𝑚𝑚.

We have

∫0𝑝𝑥α−1(1−𝑥)β−1 d𝑥=[1α𝑥α(1−𝑥)β−1]0𝑝−∫0𝑝1α𝑥α(β−1)(1−𝑥)β−2⋅(−1) d𝑥=1α𝑝α(1−𝑝)β−1+β−1α∫0𝑝𝑥α(1−𝑥)β−2 d𝑥.\begin{aligned}{\int }_{0}^{𝑝}{𝑥}^{\alpha -1}{(1-𝑥)}^{\beta -1}\, \mathrm{d}𝑥 & & = & {\left[\frac{1}{\alpha }{𝑥}^{\alpha }{(1-𝑥)}^{\beta -1}\right]}_{0}^{𝑝} \\ & & & -{\int }_{0}^{𝑝}\frac{1}{\alpha }{𝑥}^{\alpha }(\beta -1){(1-𝑥)}^{\beta -2}\cdot (-1)\, \mathrm{d}𝑥 \\ & & = & \frac{1}{\alpha }{𝑝}^{\alpha }{(1-𝑝)}^{\beta -1}+\frac{\beta -1}{\alpha }{\int }_{0}^{𝑝}{𝑥}^{\alpha }{(1-𝑥)}^{\beta -2}\, \mathrm{d}𝑥.\end{aligned}

We note that the power of 𝑥𝑥 in the integrand is increased by 11, while the power of (1−𝑥)(1-𝑥) is decreased by 11. Applying the integration by parts formula again on ∫0𝑝𝑥α(1−𝑥)β−2 d𝑥{\int }_{0}^{𝑝}{𝑥}^{\alpha }{(1-𝑥)}^{\beta -2}\, \mathrm{d}𝑥 gives:

∫0𝑝𝑥α−1(1−𝑥)β−1 d𝑥=1α𝑝α(1−𝑝)β−1+β−1(α+1)α𝑝α+1(1−𝑝)β−2+(β−1)(β−2)(α+1)α∫0𝑝𝑥α+1(1−𝑥)β−3 d𝑥.\begin{aligned}{\int }_{0}^{𝑝}{𝑥}^{\alpha -1}{(1-𝑥)}^{\beta -1}\, \mathrm{d}𝑥 & & = & \frac{1}{\alpha }{𝑝}^{\alpha }{(1-𝑝)}^{\beta -1}+\frac{\beta -1}{(\alpha +1)\alpha }{𝑝}^{\alpha +1}{(1-𝑝)}^{\beta -2} \\ & & & +\frac{(\beta -1)(\beta -2)}{(\alpha +1)\alpha }{\int }_{0}^{𝑝}{𝑥}^{\alpha +1}{(1-𝑥)}^{\beta -3}\, \mathrm{d}𝑥.\end{aligned}

Following this pattern, we obtain:

∫0𝑝𝑥α−1(1−𝑥)β−1 d𝑥=1α𝑝α(1−𝑝)β−1+β−1(α+1)α𝑝α+1(1−𝑝)β−2+⋯+(β−1)(β−2)⋯1𝑛(𝑛−1)⋯α𝑝𝑛Write β in terms of 𝑛 and α with 𝑛=α+β−1=1α𝑝α(1−𝑝)𝑛−α+𝑛−α(α+1)α𝑝α+1(1−𝑝)𝑛−α−1+⋯+(𝑛−α)(𝑛−α−1)⋯1𝑛(𝑛−1)⋯α𝑝𝑛=∑𝑥=α𝑛(α−1)!𝑥!⋅(𝑛−α)!(𝑛−𝑥)!⋅𝑝𝑥(1−𝑝)𝑛−𝑥.\begin{aligned}{\int }_{0}^{𝑝}{𝑥}^{\alpha -1}{(1-𝑥)}^{\beta -1}\, \mathrm{d}𝑥 & & = & \frac{1}{\alpha }{𝑝}^{\alpha }{(1-𝑝)}^{\beta -1}+\frac{\beta -1}{(\alpha +1)\alpha }{𝑝}^{\alpha +1}{(1-𝑝)}^{\beta -2} \\ & & & +\cdots +\frac{(\beta -1)(\beta -2)\cdots 1}{𝑛(𝑛-1)\cdots \alpha }{𝑝}^{𝑛} \\ & & & \text{Write}\, \beta \, \text{in terms of}\, 𝑛\, \text{and}\, \alpha \, \text{with}\, 𝑛=\alpha +\beta -1 \\ & & = & \frac{1}{\alpha }{𝑝}^{\alpha }{(1-𝑝)}^{𝑛-\alpha }+\frac{𝑛-\alpha }{(\alpha +1)\alpha }{𝑝}^{\alpha +1}{(1-𝑝)}^{𝑛-\alpha -1} \\ & & & +\cdots +\frac{(𝑛-\alpha )(𝑛-\alpha -1)\cdots 1}{𝑛(𝑛-1)\cdots \alpha }{𝑝}^{𝑛} \\ & & = & \sum _{𝑥=\alpha }^{𝑛}\frac{(\alpha -1)!}{𝑥!}\cdot \frac{(𝑛-\alpha )!}{(𝑛-𝑥)!}\cdot {𝑝}^{𝑥}{(1-𝑝)}^{𝑛-𝑥}.\end{aligned}

Multiplying both sides by

Γ(α+β)Γ(α)Γ(β)=𝑛!(α−1)!(β−1)!=𝑛!(α−1)!(𝑛−α)!\frac{\Gamma (\alpha +\beta )}{\Gamma (\alpha )\Gamma (\beta )}=\frac{𝑛!}{(\alpha -1)!(\beta -1)!}=\frac{𝑛!}{(\alpha -1)!(𝑛-\alpha )!}

we get

∫0𝑝Γ(α+β)Γ(α)Γ(β)𝑥α−1(1−𝑥)β−1 d𝑥=∑𝑥=α𝑛𝑛!𝑥!(𝑛−𝑥)!𝑝𝑥(1−𝑝)𝑛−𝑥=∑𝑥=α𝑛(𝑛𝑥)𝑝𝑥(1−𝑝)𝑛−𝑥.\begin{aligned}{\int }_{0}^{𝑝}\frac{\Gamma (\alpha +\beta )}{\Gamma (\alpha )\Gamma (\beta )}{𝑥}^{\alpha -1}{(1-𝑥)}^{\beta -1}\, \mathrm{d}𝑥 & =\sum _{𝑥=\alpha }^{𝑛}\frac{𝑛!}{𝑥!(𝑛-𝑥)!}{𝑝}^{𝑥}{(1-𝑝)}^{𝑛-𝑥} \\ & =\sum _{𝑥=\alpha }^{𝑛}\binom{𝑛}{𝑥}{𝑝}^{𝑥}{(1-𝑝)}^{𝑛-𝑥}.\end{aligned}
Exercise 5.9

Suppose that 𝑋∼Gamma⁡(α,θ)𝑋∼\operatorname{Gamma}(\alpha ,\theta ) and 𝑌∼Gamma⁡(β,θ)𝑌∼\operatorname{Gamma}(\beta ,\theta ) where 2α,2β∈Z+2\alpha ,2\beta \in {\mathbb{Z}}^{+}. Show that

βα⋅𝑋𝑌∼𝐹(2α,2β).\frac{\beta }{\alpha }\cdot \frac{𝑋}{𝑌}∼𝐹(2\alpha ,2\beta ).
Proof

Recall the result from Exercise 5.4:

𝑎𝑊∼Gamma⁡(α,𝑎θ)𝑎𝑊∼\operatorname{Gamma}(\alpha ,𝑎\theta )

where 𝑊∼Gamma⁡(α,θ)𝑊∼\operatorname{Gamma}(\alpha ,\theta ) and 𝑎>0𝑎>0.

We have

𝑈=2θ𝑋∼Gamma⁡(α,2)=χ2(2α)and𝑉=2θ𝑌∼Gamma⁡(β,2)=χ2(2β).𝑈=\frac{2}{\theta }𝑋∼\operatorname{Gamma}(\alpha ,2)={\chi }^{2}(2\alpha )\quad \text{and}\quad 𝑉=\frac{2}{\theta }𝑌∼\operatorname{Gamma}(\beta ,2)={\chi }^{2}(2\beta ).

Therefore,

βα⋅𝑋𝑌=βα⋅(2/θ)𝑋(2/θ)𝑌=βα⋅𝑈𝑉=𝑈/(2α)𝑉/(2β)∼𝐹(2α,2β).\frac{\beta }{\alpha }\cdot \frac{𝑋}{𝑌}=\frac{\beta }{\alpha }\cdot \frac{(2/\theta )𝑋}{(2/\theta )𝑌}=\frac{\beta }{\alpha }\cdot \frac{𝑈}{𝑉}=\frac{𝑈/(2\alpha )}{𝑉/(2\beta )}∼𝐹(2\alpha ,2\beta ).
Exercise 5.10

Let 𝑊∼𝐹(𝑟1,𝑟2)𝑊∼𝐹({𝑟}_{1},{𝑟}_{2}) and let

𝑍=11+(𝑟1/𝑟2)𝑊.𝑍=\frac{1}{1+({𝑟}_{1}/{𝑟}_{2})𝑊}.

Show that 𝑍∼Beta⁡(𝑟2/2,𝑟1/2)𝑍∼\operatorname{Beta}({𝑟}_{2}/2,{𝑟}_{1}/2).

Remark

The transformation above links an 𝐹𝐹-distributed random variable to a beta distributed one in a particularly simple way.

The proof is a direct application of the change-of-variable technique for a single variable.

Proof

The transformation function is given by 𝑢(𝑤)=1/[1+(𝑟1/𝑟2)𝑤]𝑢(𝑤)=1/[1+({𝑟}_{1}/{𝑟}_{2})𝑤]. We may find its inverse:

𝑣(𝑧)=(𝑟2/𝑟1)(1𝑧−1)=(𝑟2/𝑟1)1−𝑧𝑧,0<𝑧<1.𝑣(𝑧)=({𝑟}_{2}/{𝑟}_{1})\left(\frac{1}{𝑧}-1\right)=({𝑟}_{2}/{𝑟}_{1})\frac{1-𝑧}{𝑧},\quad 0<𝑧<1.

Taking the derivative, we get

𝑣′(𝑧)=−𝑟2/𝑟1𝑧2.{𝑣}^{\prime }(𝑧)=-\frac{{𝑟}_{2}/{𝑟}_{1}}{{𝑧}^{2}}.

Therefore, the PDF of 𝑍𝑍 is given by

𝑔(𝑧)=𝑓(𝑣(𝑧))∣𝑣′(𝑧)∣=(𝑟1/𝑟2)𝑟1/2Γ(𝑟1/2+𝑟2/2)Γ(𝑟1/2)Γ(𝑟2/2)⋅(𝑟2/𝑟1)𝑟1/2−1(1−𝑧)𝑟1/2−1𝑧𝑟1/2−1⋅1[(𝑟1/𝑟2)⋅(𝑟2/𝑟1)⋅1−𝑧𝑧+1]𝑟1/2+𝑟2/2⋅𝑟2/𝑟1𝑧2The factors related to (𝑟1/𝑟2) and (𝑟2/𝑟1) cancel out=Γ(𝑟1/2+𝑟2/2)Γ(𝑟1/2)Γ(𝑟2/2)⋅(1−𝑧)𝑟1/2−1𝑧𝑟1/2−1⋅1(1𝑧)𝑟1/2+𝑟2/2⋅1𝑧2=Γ(𝑟1/2+𝑟2/2)Γ(𝑟1/2)Γ(𝑟2/2)⋅(1−𝑧)𝑟1/2−1⋅𝑧𝑟1/2+𝑟2/2𝑧𝑟1/2−1⋅𝑧2=Γ(𝑟1/2+𝑟2/2)Γ(𝑟1/2)Γ(𝑟2/2)⋅(1−𝑧)𝑟1/2−1⋅𝑧𝑟2/2−1\begin{aligned}𝑔(𝑧) & = & & 𝑓(𝑣(𝑧))|{𝑣}^{\prime }(𝑧)| \\ & = & & {({𝑟}_{1}/{𝑟}_{2})}^{{𝑟}_{1}/2}\frac{\Gamma ({𝑟}_{1}/2+{𝑟}_{2}/2)}{\Gamma ({𝑟}_{1}/2)\Gamma ({𝑟}_{2}/2)} \\ & & & \cdot {({𝑟}_{2}/{𝑟}_{1})}^{{𝑟}_{1}/2-1}\frac{{(1-𝑧)}^{{𝑟}_{1}/2-1}}{{𝑧}^{{𝑟}_{1}/2-1}} \\ & & & \cdot \frac{1}{{\left[({𝑟}_{1}/{𝑟}_{2})\cdot ({𝑟}_{2}/{𝑟}_{1})\cdot \frac{1-𝑧}{𝑧}+1\right]}^{{𝑟}_{1}/2+{𝑟}_{2}/2}} \\ & & & \cdot \frac{{𝑟}_{2}/{𝑟}_{1}}{{𝑧}^{2}} \\ & & & \text{The factors related to}\, ({𝑟}_{1}/{𝑟}_{2})\, \text{and}\, ({𝑟}_{2}/{𝑟}_{1})\, \text{cancel out} \\ & = & & \frac{\Gamma ({𝑟}_{1}/2+{𝑟}_{2}/2)}{\Gamma ({𝑟}_{1}/2)\Gamma ({𝑟}_{2}/2)}\cdot \frac{{(1-𝑧)}^{{𝑟}_{1}/2-1}}{{𝑧}^{{𝑟}_{1}/2-1}}\cdot \frac{1}{{\left(\frac{1}{𝑧}\right)}^{{𝑟}_{1}/2+{𝑟}_{2}/2}}\cdot \frac{1}{{𝑧}^{2}} \\ & = & & \frac{\Gamma ({𝑟}_{1}/2+{𝑟}_{2}/2)}{\Gamma ({𝑟}_{1}/2)\Gamma ({𝑟}_{2}/2)}\cdot {(1-𝑧)}^{{𝑟}_{1}/2-1}\cdot \frac{{𝑧}^{{𝑟}_{1}/2+{𝑟}_{2}/2}}{{𝑧}^{{𝑟}_{1}/2-1}\cdot {𝑧}^{2}} \\ & = & & \frac{\Gamma ({𝑟}_{1}/2+{𝑟}_{2}/2)}{\Gamma ({𝑟}_{1}/2)\Gamma ({𝑟}_{2}/2)}\cdot {(1-𝑧)}^{{𝑟}_{1}/2-1}\cdot {𝑧}^{{𝑟}_{2}/2-1}\end{aligned}

In summary, we have

𝑔(𝑧)=Γ(𝑟1/2+𝑟2/2)Γ(𝑟1/2)Γ(𝑟2/2)⋅(1−𝑧)𝑟1/2−1⋅𝑧𝑟2/2−1,0<𝑧<1.𝑔(𝑧)=\frac{\Gamma ({𝑟}_{1}/2+{𝑟}_{2}/2)}{\Gamma ({𝑟}_{1}/2)\Gamma ({𝑟}_{2}/2)}\cdot {(1-𝑧)}^{{𝑟}_{1}/2-1}\cdot {𝑧}^{{𝑟}_{2}/2-1},\quad 0<𝑧<1.

This is exactly the PDF of a Beta⁡(𝑟2/2,𝑟1/2)\operatorname{Beta}({𝑟}_{2}/2,{𝑟}_{1}/2).