Idea Transcript
Transformations Dear students, Since we have covered the mgf technique extensively already, here we only review the cdf and the pdf techniques, first for univariate (one-to-one and more-to-one) and then for bivariate (one-to-one and more-to-one) transformations.
1. The cumulative distribution function (cdf) technique Suppose Y is a continuous random variable with cumulative distribution function (cdf) ๐น๐ (๐ฆ) โก ๐(๐ โค ๐ฆ). Let ๐ = ๐(๐) be a function of Y, and our goal is to find the distribution of U. The cdf technique is especially convenient when the cdf ๐น๐ (๐ฆ) has closed form analytical expression. This method can be used for both univariate and bivariate transformations.
Steps of the cdf technique: 1. Identify the domain of Y and U. 2. Write๐น๐ (๐ข) = ๐(๐ โค ๐ข), the cdf of U, in terms of ๐น๐ (๐ฆ), the cdf of Y . 3. Differentiate ๐น๐ (๐ข) to obtain the pdf of U, ๐๐ (๐ข). Example 1. Suppose that ๐ ~ ๐(0,1). Find the distribution of ๐ = ๐(๐) = โ ln ๐. Solution. The cdf of ๐ ~ ๐(0,1) is given by 0, ๐ฆโค0 ๐น๐ (๐ฆ) = {๐ฆ, 0 < ๐ฆ โค 1 1, ๐ฆโฅ1 The domain (*domain is the region where the pdf is non-zero) for ๐ ~ ๐(0,1) is ๐
๐ = {๐ฆ: 0 < ๐ฆ < 1}; thus, because ๐ข = โ ln ๐ฆ > 0, it follows that the domain for U is ๐
๐ = {๐ข: ๐ข > 0}. The cdf of U is: ๐น๐ (๐ข) = ๐(๐ โค ๐ข) = ๐(โ ln ๐ โค ๐ข) = ๐(ln ๐ > โ๐ข) = ๐(๐ > ๐ โ๐ข ) = 1 โ ๐(๐ โค ๐ โ๐ข ) = 1 โ ๐น๐ (๐ โ๐ข )
1
Because ๐น๐ (๐ฆ) = ๐ฆ for 0 < y < 1; i.e., for u > 0, we have ๐น๐ (๐ข) = 1 โ ๐น๐ (๐ โ๐ข ) = 1 โ ๐ โ๐ข Taking derivatives, we get, for u > 0, ๐๐ (๐ข) =
๐ ๐ (1 โ ๐ โ๐ข ) = ๐ โ๐ข ๐น๐ (๐ข) = ๐๐ข ๐๐ข
Summarizing, ๐๐ (๐ข) = {
๐ โ๐ข , 0,
๐ข>0 otherwise 1
This is an exponential pdf with mean ฮป = 1; that is, U ~ exponential(ฮป = 1). โก Example 2. Suppose that ๐ ~ ๐ (โ ๐โ2 , ๐โ2) . Find the distribution of the random variable defined by U = g(Y ) = tan(Y ). Solution. The cdf of ๐ ~ ๐ (โ ๐โ2 , ๐โ2) is given by 0, ๐ฆ + ๐โ2 ๐น๐ (๐ฆ) = , ๐ { 1,
๐ฆ โค โ ๐โ2 โ ๐โ2 < ๐ฆ โค ๐โ2 ๐ฆ โฅ ๐โ2
The domain for Y is ๐
๐ = {๐ฆ: โ ๐โ2 < ๐ฆ < ๐โ2}. Sketching a graph of the tangent function from โ ๐โ2 to ๐โ2, we see that โโ < ๐ข < โ . Thus, ๐
๐ = { ๐ข: โ โ < ๐ข < โ} โก ๐
, the set of all reals. The cdf of U is: ๐น๐ (๐ข) = ๐(๐ โค ๐ข) = ๐[tan(๐) โค ๐ข] = ๐[๐ โค tanโ1(๐ข)] = ๐น๐ [tanโ1(๐ข)] Because ๐น๐ (๐ฆ) = we have
๐ฆ+๐โ2 ๐
for โ ๐โ2 < ๐ฆ < ๐โ2 ; i. e. , for ๐ข โ โ ,
๐น๐ (๐ข) = ๐น๐ [tanโ1 (๐ข)] =
tanโ1(๐ข) + ๐โ2 ๐
The pdf of U, for ๐ข โ โ, is given by ๐ ๐ tanโ1 (๐ข) + ๐โ2 1 ๐๐ (๐ข) = ๐น๐ (๐ข) = [ ]= . ๐๐ข ๐๐ข ๐ ๐(1 + ๐ข2 ) Summarizing,
2
1 , โโ0 ๐๐ (๐ฆ) = { ๐ฝ 0, otherwise. Let ๐ = ๐(๐) = โ๐, . Use the method of transformations to find the pdf of U. Solution. First, we note that the transformation ๐(๐) = โ๐ is a continuous strictly increasing function of y over ๐
๐ = {๐ฆ: ๐ฆ > 0}, and, thus, ๐(๐) is one-to-one. Next, we need to find the domain of U. This is easy since y > 0 implies ๐ข = โ๐ฆ > 0 as well. Thus, ๐
๐ = {๐ข: ๐ข > 0}. Now, we find the inverse transformation: ๐(๐ฆ) = ๐ข = โ๐ฆ โ ๐ฆ = ๐โ1 (๐ข) = ๐ข2 (by inverse transformation) and its derivative:
4
๐ โ1 ๐ (๐ข2 ) = 2๐ข. ๐ (๐ข) = ๐๐ข ๐๐ข Thus, for u > 0, ๐๐ (๐ข) = ๐๐ [๐โ1 (๐ข)] |
๐ โ1 ๐ (๐ข) | ๐๐ข 2
2
1 โ๐ข 2๐ข โ๐ข๐ฝ = ๐ ๐ฝ ร |2๐ข| = ๐ . ๐ฝ ๐ฝ Summarizing, 2
2๐ข โ๐ข๐ฝ ๐ข>0 ๐๐ (๐ข) = { ๐ฝ ๐ , 0, otherwise. This is a Weibull distribution. The Weibull family of distributions is common in life science (survival analysis), engineering and actuarial science applications. โก Example 4. Suppose that Y ~ beta(ฮฑ = 6; ฮฒ = 2); i.e., the pdf of Y is given by 42๐ฆ 5 (1 โ ๐ฆ), ๐๐ (๐ฆ) = { 0,
0 0 for all i โ 0, and ๐๐1 ,๐2 (๐ฆ1 , ๐ฆ2 ) is continuous on each Ai , i โ 0. Furthermore, suppose that the transformation is 1-to-1 from Ai (i = 1, 2, โฆ, k,) to B, where B is the domain of ๐ผ = (๐1 = โ1 โ1 (โ), ๐2๐ (โ)) is a 1-to-1 ๐1 (๐1 , ๐2 ), ๐2 = ๐1 (๐1 , ๐2 )) such that (๐1๐ inverse mapping of Y to U from B to Ai. Let Ji denotes the Jacobina computed from the ith inverse, i = 1, 2, โฆ, k. Then, the pdf of U is given by ๐๐1 ,๐2 (๐ข1 , ๐ข2 ) ๐
={
โ ๐๐1 ,๐2 [๐1๐ โ1 (๐ข, ๐ฃ), ๐2๐ โ1 (๐ข, ๐ฃ)]|๐ฝ๐ | ,
๐ข โ ๐ต = ๐
๐
๐=1
0,
otherwise.
Example 7. Suppose that ๐1 ~ N(0, 1), ๐2 ~ N(0, 1), and that ๐1 and ๐2 are independent. Define the transformation ๐1 ๐1 = ๐1 (๐1 , ๐2 ) = ๐2 ๐2 = ๐2 (๐1 , ๐2 ) = |๐2 |. Find each of the following distributions: 12
(a) ๐๐1 ,๐2 (๐ข1 , ๐ข2 ), the joint distribution of ๐1 and ๐2 , (b) ๐๐1 (๐ข1 ), the marginal distribution of ๐1 . Solutions. (a) Since ๐1 and ๐2 are independent, the joint distribution of ๐1 and ๐2 is ๐๐1 ,๐2 (๐ฆ1 , ๐ฆ2 ) = ๐๐1 (๐ฆ1 )๐๐2 (๐ฆ2 ) 1 โ๐ฆ 2/2 โ๐ฆ2 /2 = ๐ 1 ๐ 2 2ฯ Here, ๐
๐1 ,๐2 = {(๐ฆ1 , ๐ฆ2 ): โโ < ๐ฆ1 < โ, โโ < ๐ฆ2 < โ}. The transformation of Y to U is not one-to-one because the points (๐ฆ1 , ๐ฆ2 ) and (โ๐ฆ1 , โ๐ฆ2 ) are both mapped to the same (๐ข1 , ๐ข2 ) point. But if we restrict considerations to either positive or negative values of ๐ฆ2 , then the transformation is one-to-one. We note that the three sets below form a partition of ๐ด = ๐
๐1 ,๐2 as defined above with ๐ด1 = {(๐ฆ1 , ๐ฆ2 ): ๐ฆ2 > 0}, ๐ด2 = {(๐ฆ1 , ๐ฆ2 ): ๐ฆ2 < 0} , and ๐ด0 = {(๐ฆ1 , ๐ฆ2 ): ๐ฆ2 = 0}. The domain of U, ๐ต = {(๐ข1 , ๐ข2 ): โโ < ๐ข1 < โ, ๐ข2 > 0} is the image of both ๐ด1 and ๐ด2 under the transformation. The inverse transformation from ๐ต ๐ก๐ ๐ด1 and ๐ต ๐ก๐ ๐ด2 are given by: ๐ฆ1 = ๐11 โ1 (๐ข1 , ๐ข2 ) = ๐ข1 ๐ข2 ๐ฆ2 = ๐21 โ1 (๐ข1 , ๐ข2 ) = ๐ข2 and ๐ฆ1 = ๐12 โ1 (๐ข1 , ๐ข2 ) = โ๐ข1 ๐ข2 ๐ฆ2 = ๐22 โ1 (๐ข1 , ๐ข2 ) = โ๐ข2 The Jacobians from the two inverses are ๐ฝ1 = ๐ฝ1 = ๐ข2 The pdf of U on its domain B is thus: 2
๐๐1 ,๐2 (๐ข1 , ๐ข2 ) = โ ๐๐1 ,๐2 [๐1๐ โ1 (๐ข, ๐ฃ), ๐2๐ โ1 (๐ข, ๐ฃ)]|๐ฝ๐ | Plugging in, we have:
๐=1
1 โ(๐ข ๐ข )2 /2 โ๐ข2 /2 ๐ 1 2 ๐ 2 |๐ข2 | 2ฯ 1 โ(โ๐ข ๐ข )2 /2 โ(โ๐ข )2 /2 1 2 2 |๐ข2 | + ๐ ๐ 2ฯ
๐๐1 ,๐2 (๐ข1 , ๐ข2 ) =
Simplifying, we have: ๐ข2 2 2 ๐๐1 ,๐2 (๐ข1 , ๐ข2 ) = ๐ โ(๐ข1 +1)๐ข2 /2 , โโ < ๐ข1 < โ, ๐ข2 > 0 ฯ (b) To obtain the marginal distribution of ๐1 , we integrate the joint pdf๐๐1 ,๐2 (๐ข1 , ๐ข2 ) over ๐ข2 . That is, โ
๐๐1 (๐ข1 ) = โซ ๐๐1 ,๐2 (๐ข1 , ๐ข2 ) ๐๐ข2 0
13
1 , โโ < ๐ข1 < โ + 1) Thus, marginally, U1 follows the standard Cauchy distribution. โก =
๐(๐ข12
REMARK: The transformation method can also be extended to handle n-variate transformations. Suppose that ๐1 , ๐2 , โฆ , ๐๐ are continuous random variables with joint pdf ๐๐ (๐ฆ) and define ๐1 = ๐1 (๐1 , ๐2 , โฆ , ๐๐ ) ๐2 = ๐2 (๐1 , ๐2 , โฆ , ๐๐ ) โฎ (๐ ๐๐ = ๐๐ 1 , ๐2 , โฆ , ๐๐ ). Example 8. Given independent random variables ๐ and๐, each with uniform distributions on (0, 1), find the joint pdf of U and V defined by U=X+Y, V=X-Y, and the marginal pdf of U. The joint pdf of ๐ and ๐ is๐๐,๐ (๐ฅ, ๐ฆ) = 1, 0 โค ๐ฅ โค 1, 0 โค ๐ฆ โค 1. The inverse transformation, written in terms of observed values is ๐ข+๐ฃ ๐ขโ๐ฃ ๐ฅ= , ๐๐๐ ๐ฆ = . 2 2 It is clearly one-to-one. The Jacobian is 1/2 1/2 ๐(๐ฅ,๐ฆ) 1 1 ๐ฝ = ๐(๐ข,๐ฃ) = | | = โ 2, so |๐ฝ| = 2. 1/2 โ1/2 We will use ๐ to denote the range space of (๐, ๐), and โฌ to denote that of (๐, ๐), and these are shown in the diagrams below. Firstly, note that there are 4 inequalities specifying ranges of ๐ฅ and๐ฆ, and these give 4 inequalities concerning ๐ข and๐ฃ, from which โฌcan be determined. That is, ๐ฅ โฅ 0 โ ๐ข + ๐ฃ โฅ 0, that is, ๐ฃ โฅ โ๐ข ๐ฅ โค 1 โ ๐ข + ๐ฃ โค 2, that is ๐ฃ โค 2 โ ๐ข ๐ฆ โฅ 0 โ ๐ข โ ๐ฃ โฅ 0, that is ๐ฃ โค ๐ข ๐ฆ โค 1 โ ๐ข โ ๐ฃ โค 2, that is ๐ฃ โฅ ๐ข โ 2 Drawing the four lines ๐ฃ = โ๐ข, ๐ฃ = 2 โ ๐ข, ๐ฃ = ๐ข, ๐ฃ = ๐ข โ 2 On the graph, enables us to see the region specified by the 4 inequalities.
14
Now, we have 1 1 โ๐ข โค ๐ฃ โค ๐ข, 0 โค ๐ข โค 1 = , { ๐ข โ 2 โค ๐ฃ โค 2 โ ๐ข, 1 โค ๐ข โค 2 2 2 The importance of having the range space correct is seen when we find marginal pdf of ๐. โ ๐๐ (๐ข) = โซโโ ๐๐,๐ (๐ข, ๐ฃ)๐๐ฃ ๐๐,๐ (๐ข, ๐ฃ) = 1 โ
๐ข 1
โซโ๐ข 2 ๐๐ฃ, = { โซ2โ๐ข 1 ๐๐ฃ, ๐ขโ2 2 0, ={
0โค๐ขโค1 1โค๐ขโค2 ๐๐กโ๐๐๐ค๐๐ ๐
๐ข, 0โค๐ขโค1 2 โ ๐ข, 1 โค ๐ข โค 2
= ๐ข๐ผ[0,1] (๐ข) + (2 โ ๐ข)๐ผ(1,2] (๐ข), using indicator functions. Example 9. Given ๐and ๐ are independent random variables 1
๐ฅ
each with pdf๐๐ (๐ฅ) = 2 ๐ โ2 , ๐ฅ โ [0, โ), find the distribution of(๐ โ ๐)/2. We note that the joint pdf of ๐ and ๐ is 1 ๐ฅ+๐ฆ ๐๐,๐ (๐ฅ, ๐ฆ) = ๐ 2 , 0 โค ๐ฅ < โ, 0 โค ๐ฆ < โ. 4 15
Define๐ = (๐ โ ๐)/2. Now we need to introduce a second random variable ๐ which is a function of ๐ and๐. We wish to do this in such a way that the resulting bivariate transformation is one-to-one and our actual task of finding the pdf of U is as easy as possible. Our choice for ๐ is of course, not unique. Let us define๐ = ๐. Then the transformation is, (using๐ข, ๐ฃ, ๐ฅ, ๐ฆ, since we are really dealing with the range spaces here). ๐ฅ = 2๐ข + ๐ฃ ๐ฆ=๐ฃ From it, we find the Jacobian, 2 1 ๐ฝ=| |=2 0 1 To determineโฌ, the range space of ๐ and๐, we note that ๐ฅ โฅ 0 โ 2๐ข + ๐ฃ โฅ 0 , that is ๐ฃ โฅ โ2๐ข ๐ฅ < โ โ 2๐ข + ๐ฃ < โ ๐ฆโฅ0 โ ๐ฃโฅ0 ๐ฆ