Lecture 1 – Week 1 Functions of Random Variables (Transformations) Study: Rice - Chapter 2.3 and Chapter 3.6 Wackerly - Chapter 6.4 and 6.6 Functions of random variables: Sometimes it is necessary to find the distribution of a function of a random variable or a function with more than one variable. Usually we find the density and then use theory to find the distribution of the new random variable(s) and sometimes the new density is in the form of a familiar, a known density such as the gamma or normal or beta. Example of such questions. If a random variable Y with a probability density function (pdf) is given by Hence, we might be interested in a new variable and its density such as Study the examples of Section 6.4 in Wackerly. Applying Proposition B UnivariateExample: Let the random variable π possess a uniform distribution on the interval (0,1). a. Use the transformation method to find the pdf (probability density function) of the random variable π = √π. What is the name of this distribution? Find the expected value of W. b. Find the cdf (probability distribution) of π = √π. 1 Solution: Uniform density, π(π¦) = 1, 0 < π¦ < 1. a. If π = √π then π = π 2 . Hence, π = 2π€ . ππ€ Applying Proposition B ππ (π€) = ππ (π€ 2 ) × |2π€| = 1 × 2π€ = 2π€ The interval of π€ is 0<π¦<1 0 < π€2 < 1 0 < π€ < 1. The probability density function of random variable π is 2π€, π(π€) = { 0, π < π < π, πππ ππ€βπππ. Can we identify this distribution? This must always be attempted. Some guidelines: • • If the boundaries of the random variable π is between 0 ≤ π¦ ≤ 1 then evaluate for either an uniform of beta probability distribution If the boundaries of the random variable π is between 0 ≤ π¦ ≤ ∞ then evaluate for a gamma, exponential of chi-square probability distribution. Yes, by the boundaries it might be a beta. We rewrite the variable factor of π(π€) ππ (π€) = 2π€(1 − π€)0 . Then we have πΌ − 1 = 1 πππ π½ − 1 = 0. Hence πΌ = 2 πππ π½ = 1 The constant factor Γ(πΌ + π½) Γ(2 + 1) Γ(3) 2Γ(2) = = = = 2. Γ(π½)Γ(πΌ) Γ(1)Γ(2) Γ(2) Γ(2) Thus π~πππ‘π(2,1). b. Find the distribution of π = π 2 , 2 πΉπ (π€) = π(π ≤ π€) = π(√π ≤ π€) = π(π ≤ π€ 2 ) Then π€2 1. ππ‘ = π€ 2 πΉ(π€) = ∫ 0 Thus the cdf of random variable π 0, π€ ≤ 0, πΉ(π€) = {π€ 2 , 0 < π€ < 1, 1, π€ ≥ 1. Check: π(π€) = π π 2 πΉ(π€) = π€ = 2π€. ππ€ ππ€ 3 Convolution 4 The Multivariate Transformation Method (General Case) Note: π½ ππ π‘βπ π½πππππππ. 5 Example: This Example of Rice must also be studied. Page 103. But I am doing it my way - study this. Solution: Normal: π~(0,1) ππ π~(2,3) Standard Normal It is given that πΏπ πππ πΏπ πππ πππ πππππ πππ and both are π(π, π) distributed. First let us have the pdf of the bivariate normal distribution. That is the joint distribution of πΏπ πππ πΏπ that are π(π, ππ ) distributed. π(π₯1 , π₯2 ) = 1 exp [− 2ππ1 π2 √1 − π2 π₯2 − π2 2 + ( ) }] π2 1 π₯1 − π1 2 π₯1 − π1 π₯2 − π2 {( − 2π ) ( )( ) 2(1 − π2 ) π1 π1 π2 The bivariate normal distribution: So π1 π2 ~π(π1 , π2 , π12 , π22 , π) If each variable has the standard normal distribution π1 = π2 = π and πππ = πππ = π AND If πΏπ πππ πΏπ πππ πππ πππππ πππ , ππππ π = π Then the above density becomes, for the standard normal variates, 6 π(π₯1 , π₯2 ) = 1 1 exp [− {π₯1 2 + π₯2 2 }] 2π 2 If πΏπ = ππ and πΏπ = ππ − ππ THEN the inverses are π1 = π1 and π2 = π1 + π2 as already given by Rice and therefore π½=| π π¦1 /ππ₯1 π π¦2 /ππ₯1 π π¦2 /π π₯2 1 |=| π π¦2 /π π₯2 1 0 |=1 1 Use to find π(ππ , ππ ) the joint density when we Substitute π¦1 = π₯1 and π¦2 = π₯1 + π₯2 into π(π₯1 , π₯2 ) = 1 1 exp [− {π₯1 2 + π₯2 2 }] 2π 2 so that π(π¦1 , π¦2 ) = 1 1 exp [− {π¦1 2 + (π¦2 − π¦1 )2 }] × |π½| β 2π 2 =1 Simplify 1 [− {π¦1 2 + (π¦2 − π¦1 )2 }] 2 1 = [− {π¦1 2 + π¦22 − 2π¦1 π¦2 + π¦1 2 }] 2 Hence the joint density of π1 πππ π2 is π(π¦1 , π¦2 ) = 1 1 exp [− {2π¦1 2 + π¦22 − 2 π¦1 π¦2 }] 2π 2 How do we recognise this as bivariate standard normal distribution? We have to recognize all the parameters of a bivariate normal distribution. We need to find all five parameters of the joint density of the two variables. π1 , Where π = π2 , π12 , πΆππ£(π1 ,π2 ) π1 ,π2 Given: 7 π22 πππ π If π1 = π1 and π2 = π2 − π1 then π1 = π1 and π2 = π1 + π2 πΈ(π1 ) = πΈ( π1 ) = 0 = π1 πΈ(π2 ) = πΈ(π1 + π2 ) = πΈ(π1 ) + πΈ(π2 ) = 0 = π2 πππ(π1 ) = πππ( π1 ) = 1 = π12 , πππ(π2 ) = πππ(π1 + π2 ) = πππ(π1 ) + πππ(π2 ) = 1 + 1 = 2 = π22 Then π1 = 1 πππ π2 = √2 We also want πͺππ(ππ , ππ ) that is in order to find π. In (Chapter 5 Wackerly) we have πππ(π2 − π1 ) = πππ(π2 ) + πππ(π1 ) − 2πΆππ£(π1 , π2 ) 2πΆππ£(π1 , π2 ) = πππ(π2 ) + πππ(π1 ) − πππ(π2 − π1 ) = πππ(π1 + π2 ) + πππ(π1 ) − πππ(π1 + π2 − π1 ) = πππ(π1 + π2 ) + πππ(π1 ) − πππ(π2 ) 2πΆππ£(π1 , π2 ) = 2 + 1 − 1 πΆππ£(π1 , π2 ) = 1 The correlation coefficient π π= 1 1×√2 = 1 √2 so that we have 1 − π2 = 1 − √1 − π2 = √1 − ( 1 1 = 2 2 2 1 √2 1 2 ) =√ Hence, the density function of a 5 parameter bivariate standard normal distribution π(π¦1 , π¦2 ) = 1 π¦1 − π1 2 π¦1 − π1 π¦2 − π2 exp [− {( − 2π ) ( )( ) 2(1 − π2 ) π1 π1 π2 2ππ1 π2 √1 − π2 π¦2 − π2 2 + ( ) }] π2 1 can be changed into the determined π(π¦1 , π¦2 ) with the determined parameters π1 = 0, π(π¦1 , π¦2 ) = π12 = 1, π2 = 0, 1 1 2π(1)√2(√2) exp [− 1 1 2(2) π22 = 2 πππ π = 1 π¦2 √2 √2 {(π¦1 )2 − 2 ( ) ( π¦1 ) ( 8 1 √2 π¦ 2 ) + ( 2 ) }] √2 1 = 2π = 1 π¦2 √2 √2 exp [− {(π¦1 )2 − 2 ( ) ( π¦1 ) ( 1 2π exp [− {π¦1 2 − ( π¦1 )( π¦2 ) + π¦2 2 2 π¦ 2 ) + ( 2 ) }] √2 }] Thus, we have our joint pdf of π1 πππ π2 as before π(π¦1 , π¦2 ) = Hence, π1 π2 ~π(0,0,1,2, 1 √2 1 1 exp [− {2π¦1 2 + π¦22 − 2 π¦1 π¦2 }] 2π 2 ) or we say that the pdf of π(π¦1 , π¦2 ) is that of a standard normal probability distribution with parameter values π1 = 0, π2 = 0, π12 = 1, π22 = 2 πππ π = 1 √2 . Another example: Let ππ and ππ be independent exponentially distributed random variables with parameter π = π. Consider the transformations ππ = πΏπ − πΏπ and ππ = πΏπ + πΏπ Find the marginal density of π2 . I have typed the solution using π1 πππ π2 but for writing and typing I would from now on rather use π πππ π. Solution: π(π¦1 ) = π −π¦1 π¦1 > 0 and π(π¦2 ) = π −π¦2 π¦2 > 0 By independence there joint pdf π(π¦1, , π¦2 ) = π −π¦1 × π −π¦2 = π −(π¦1 +π¦2 ) π¦1 , π¦2 > 0 (due to independence) Let π¦1 = π₯1 − π₯2 and π¦2 = π₯1 + π₯2 . Then π½= ππ¦1 ππ¦1 ππ₯ |ππ¦21 ππ₯2 ππ¦2 | ππ₯1 ππ₯2 =| 1 −1 |=2 1 1 π(π₯1, , π₯2 ) = ππ¦1 ,π¦2 (π₯1 − π₯2 , π₯1 + π₯2 ) × 2 = π −(π₯1 −π₯2 +π₯1 +π₯2 ) × 2 = π −(2π₯1 ) × 2 = 2 π −2π₯1 π₯1 − π₯2 > 0 and π₯1 + π₯2 > 0 Intervals: π₯2 < π₯1 and π₯1 + π₯2 > 0 Looking at the bounds we see that both π₯2 πππ π₯1 are always larger than zero but π₯1 is always larger than π₯2 , then this bound can be stated as 0 < π₯2 < π₯1 < ∞ π(π₯1, , π₯2 ) = 2 π −2π₯1 is an exponential distribution with parameter π = 2 or π½ = 1/2, π(π₯1, , π₯2 ) = 1 1/2 π − 1 π₯ 1/2 1 . Find the marginal distribution if π₯2 . 9 ∞ π(π₯2 ) = ∫π₯ 2 π −2π₯1 ππ₯1 2 π(π₯2 ) = π−2π₯2 0 < π₯2 < π₯1 < ∞. ________________________________________________________________________ End of Lecture 10