For more information, please see full course syllabus of Probability

For more information, please see full course syllabus of Probability

### Transformations

Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.

- Intro
- Premise
- Goal
- Goal Number 1: Find the Full Distribution Function
- Goal Number 2: Find the Density Function
- Goal Number 3: Calculate Probabilities
- Three Methods
- Requirements for Transformation Method
- The Transformation Method Only Works for Single-variable Situations
- Must be a Strictly Monotonic Function
- Example: Strictly Monotonic Function
- If the Function is Monotonic, Then It is Invertible
- Formula for Transformations
- Example I: Determine whether the Function is Monotonic, and if so, Find Its Inverse
- Example II: Find the Density Function
- Example III: Determine whether the Function is Monotonic, and if so, Find Its Inverse
- Example IV: Find the Density Function for the Magnitude of the Next Earthquake
- Example V: Find the Expected Magnitude of the Next Earthquake
- Example VI: Find the Density Function, Including the Range of Possible Values for u

- Intro 0:00
- Premise 0:32
- Premise
- Goal 1:37
- Goal Number 1: Find the Full Distribution Function
- Goal Number 2: Find the Density Function
- Goal Number 3: Calculate Probabilities
- Three Methods 2:34
- Method 1: Distribution Functions
- Method 2: Transformations
- Method 3: Moment-generating Functions
- Requirements for Transformation Method 3:22
- The Transformation Method Only Works for Single-variable Situations
- Must be a Strictly Monotonic Function
- Example: Strictly Monotonic Function
- If the Function is Monotonic, Then It is Invertible
- Formula for Transformations 7:09
- Formula for Transformations
- Example I: Determine whether the Function is Monotonic, and if so, Find Its Inverse 8:26
- Example II: Find the Density Function 12:07
- Example III: Determine whether the Function is Monotonic, and if so, Find Its Inverse 17:12
- Example IV: Find the Density Function for the Magnitude of the Next Earthquake 21:30
- Example V: Find the Expected Magnitude of the Next Earthquake 33:20
- Example VI: Find the Density Function, Including the Range of Possible Values for u 47:42

### Introduction to Probability Online Course

### Transcription: Transformations

*Hi, welcome back to the probability lectures here on www.educator.com, my name is Will Murray.*0000

*Today, we are going to be talking about the method of transformations.*0006

*That is one of 3 methods that we are studying to find the distributions of functions of random variables.*0009

*This is actually the second of the 3 part lecture series.*0016

*You have already learned the method of distribution functions.*0022

*Today, we are going to talk about transformations.*0026

*In the next lecture, we will talk about the method of moment generating functions.*0028

*The premise is the same as in the previous lecture.*0033

*If you just watched the previous lecture or maybe, if you just watch the next one for moment generating functions,*0037

*the first couple slides here are going to be exactly the same.*0042

*If you are up to speed on them, you can really skip over the first couple of slides here.*0045

*It is nothing new, I’m just kind of introducing the same premise.*0049

*The idea is that we have several random variables Y1, Y2, and so on.*0052

*We want to study functions of them.*0058

*The function variable that I’m going to use is U of Y1 Y2 up through YN.*0061

*What we calculated in previous lectures, several lectures ago was methods to find the mean of U, *0068

*and also the variance of U.*0077

*But, I did not find the entire distribution of U.*0079

*The purpose of this lecture, the one before it and the one after it, *0083

*is to find several methods to calculate the formal distribution and density functions of this new variable U.*0087

*That is the idea, we want to find the full distribution function.*0096

*I’m calling it F sub U of u which represents the probability that U will be less than any cut off value, which I’m calling u.*0101

*If we have the distribution function, you can always find the density function as the derivative of the distribution function.*0110

*The density function is f, f is just the derivative of F.*0118

*Assuming, we can figure out F and f, we can actually calculate the probability that U will be in any given range, *0126

*because the probability that U will be from between A and B, one way to calculate it is to just integrate the density function.*0134

*But of course, if you already know the distribution function that is just F of B - F of A.*0141

*We would be able to calculate probabilities, if we know the density and distribution function.*0148

*As I mentioned in the introductory text here, we have 3 methods to study the distribution of functions of random variables.*0155

*The first method was called distribution functions, and that is what we studied in the previous lecture.*0169

*If you are looking for the method distribution functions, just check out the previous lecture.*0174

*In this lecture, we are going to study what is called the method of transformations.*0178

*I will show you what that is all about, starting on the next slide.*0182

*In the next lecture, we will talk about moment generating functions.*0185

*We got three different methods to calculate the same general goal, *0190

*but each method works better on different kinds of problems.*0196

*That is why we have to learn all three here.*0200

*The transformation method, that is the one we are studying this method.*0204

*First of all, it only works for single variable situation.*0207

*You cannot have a Y1, Y2, or YN.*0210

*You can only have U as a function of a single variable Y.*0214

*If you see Y1 and Y2, forget the transformation method, you are going to have to use one of the other two methods.*0218

*Maybe the method of distribution functions or maybe the method of moment generating functions.*0225

*The second requirement for the transformation method is that, the function U is a function of Y.*0230

*We are going to call our function H, that must be a strictly monotonic function.*0237

*A monotonic function means that it is always increasing or always decreasing.*0241

*For example, here is a function that is always increasing and here is a function that is always decreasing.*0248

*Either one of those kinds of functions for H, would be fair game for the transformation method.*0258

*Here is a function that is not always increasing.*0264

*That function is decreasing for Y, and then increasing, that is not monotonic.*0268

*It will not be available for the transformation function method.*0274

*Similarly, if you have a function like this, where it is increasing for a while and then decreasing, *0280

*that is not something that you can use the transformation function method on.*0285

*An example of the function that is always going to be monotonic is linear functions.*0291

*U = AY + B, the special case there is that, if a 0 then you get a horizontal line, that does not count.*0298

*But, the any kind of linear function, except for a horizontal line is monotonic*0313

*because it will always be increasing like that or it will always be decreasing like that.*0320

*Any linear function is fair game for the transformation method.*0326

*Assuming that you do have a monotonic function, here is how you use it.*0331

*What you do is, you try to solve for Y in terms of U.*0336

*You have been given U, in terms of Y, U = H of Y.*0339

*What you want to do is try to find Y, in terms of U.*0344

*Let me write that down, you are trying to solve for Y in terms of U.*0349

*You are reverse engineering the Y, in terms of U.*0360

*You got Y to be a function of U, that function will be H inverse.*0363

*I want to now clarify here that, this notation is not an exponent.*0369

*This is not the same, let me write this in red so it will really look clear that, that is not what we are talking about.*0373

*This is not the same as 1/H of U.*0381

*That exponent there is little misleading, it does not mean H of U⁻¹.*0385

*What it really means is the inverse function.*0390

*That H inverse is an inverse function not 1/H of U.*0397

*We will get some practice with that, the first couple of examples are just practice finding inverse functions.*0404

*Make sure that you know the difference between an inverse function and just taking the reciprocal.*0410

*I still have not shown you how the formula for transformations works.*0418

*These were all sort of the requirements that you have to check, before you can even use the transformation method.*0422

*Let me show you how to use the transformation method.*0429

*Remember that we said, we get H inverse of U by solving, you have U = H of Y.*0433

*You solve that for Y, in terms of U.*0449

*You solve that to get Y is equal to some function H inverse of U.*0453

*Now, you have this H inverse and here is how you use it.*0458

*You get the density function for U, by taking the density function for Y.*0462

*Plugging in H inverse of U which is what you got here, when you solve for Y in terms of U.*0467

*This is really Y, in terms of U.*0474

*You also have to multiply on this correction term which is the absolute value of the derivative of H inverse of U.*0482

*That is quite a complicated formula, I think it will make sense after we do some examples.*0492

*I would say just hang onto the formula for now, let us practice some examples and I think it will start to be more clear.*0497

*Let us jump into the examples and practice it.*0504

*The first example, this is actually the same example that we studied in the previous lecture, *0507

*using distribution functions.*0514

*We are going to have a different solution for this one.*0516

*If you want, you can compare this example to the solution we found using distribution functions.*0518

*Of course, we are going to get the same answer but we are going to use very different methods to find it.*0525

*We are given that Y has density function F sub Y is 3/2Y².*0530

*And then, the range for Y is -1 to 1.*0536

*We want to determine whether the function U = 3 -2Y is monotonic.*0540

*If so, we want to find its inverse.*0545

*Monotonic means increasing or decreasing.*0549

*If you graph U = 3 -2Y, it is a line and it is got slope -2 and it is got a Y vertical intercept 3.*0552

*It would look like that, and that is certainly a monotonic function, it is decreasing the entire way.*0564

*Another way to notice it is that, H of Y, U is H of Y is 3 -2Y is linear.*0572

*Any linear function is monotonic, as long as it is not a horizontal line.*0585

*It is linear, hence, monotonic, which means we can find its inverse and*0591

*we can use the method of transformations on this problem.*0595

*We are going to actually finish the problem in example 2.*0600

*But right now, we are just going to find the inverse function of H inverse of U.*0603

*If U = 3 -2Y, I’m going to use the lowercase letters now.*0608

*Then, I’m going to solve for Y, I will use the uppercase letters for this.*0614

*U = 3 -2Y, I’m going to solve for Y.*0626

*U + 2Y is equal to 3 and so 2Y is equal to 3 – U.*0631

*Y is equal to 3 – U/2, what that means is that this is H inverse of U.*0642

*It is the function you would use to get back from U to Y.*0652

*What we have done here is found the inverse function.*0658

*We have not found the density and distribution functions for U, we will do that over example 2.*0661

*I just wanted to make sure that you are comfortable with finding an inverse function, *0668

*before we use it for anything more complicated.*0672

*Let me recap the steps here.*0675

*We had to determine whether the function U = 3 - 2Y is monotonic.*0677

*One way to do that is to graph it, and notice that it is decreasing the entire way.*0681

*That is what I did here, I graphed U = 3 -2Y.*0687

*Another way to notice that is to just observe that it is a linear function.*0692

*Linear functions are always monotonic, as long as they are horizontal lines.*0697

*This is monotonic and then to find its inverse, we take that equation U = 3 - 2Y, and try to solve it for Y in terms of U.*0702

*That is what I was doing here, just a little algebra to get Y in terms of U.*0713

*And then, the answer I got 3 –U/2 is H inverse of U.*0717

*Hang onto this result, we are going to use it again, in example 2.*0723

*In example 2, this is a follow-up to example 1.*0729

*It is the exact same setting from example 1.*0733

*We have Y has density function F sub Y is 3/2Y², Y goes from -1 to 1.*0737

*We want to find the density function for U = 3 -2Y.*0744

*We did start out studying this problem in example 1.*0748

*Let me remind you what we figure out there, in example 1.*0751

*We found the inverse function, H inverse of U, example 1.*0757

*We solved that equation for Y, in terms of U.*0762

*We got Y is equal to H inverse of U which was 3 – U/2.*0766

*I’m going to try to find the density function for U.*0775

*I’m going to use my generic formula for the transformation method.*0778

*Let me remind you what that formula is for the transformation method.*0783

*Just checking it here and make sure I do not write it down wrong.*0790

*F sub U is F sub Y of H inverse of U × the absolute value of the derivative DY DU of H inverse of U.*0793

*That should have been a closing absolute value sign there.*0810

*In this case, my H inverse of U is what we found out above, that was from example 1, that is 3 –U/2.*0813

*What I’m going to do is I’m going to plug that in to F sub Y.*0830

*This is F sub Y, here is 3/2Y².*0835

*It is 3/2 × 3 –U/2².*0840

*Now, I need to find the derivative of that.*0846

*The derivative of that DY DU of H inverse of U is, 3/2 goes nowhere.*0848

*-U/2 has derivative - ½.*0856

*The absolute value of that is + ½, that term gives me a +½.*0861

*I can simplify this down to ¾, if I move that ½ to the front.*0867

*3 – (U/2)², that is my density function.*0873

*Let me figure out the range for U, really quick.*0880

*If Y is equal to -1 then U is 3 -2Y, that is 3 + 2 which would be 5.*0882

*If Y is equal to 1 and U is 3 - 2Y would be 1.*0892

*This is my U goes from 1 to 5, that is my density function, the f of U.*0899

*I have done the problem now.*0910

*This problem is one we did in the previous lecture, the lecture on distribution functions.*0912

*We used a very different method to solve it, involved doing an integral.*0918

*This one requires doing derivatives, the method we used using distribution functions involved taking an integral.*0922

*You might go back and check the example from the previous lecture, when we used the distribution functions.*0931

*We do get the same answer at the end of it, but using very different methods.*0937

*I think this method is a little bit quicker, for this particular problem.*0942

*Let me remind you how we got this answer.*0945

*First, I was invoking what I learned from example 1, the one just previous to this one,*0949

*where we solve for H inverse of U to be 3 – U/2.*0954

*That is just solving this equation for Y, in terms of U, nothing difficult there.*0959

*Then, I used my generic formula for the transformation method,*0966

*F sub U of U is FY of H inverse of U × the derivative of H inverse of U.*0969

*I took my H inverse of U and I just plug it in into F sub Y.*0975

*There is my F sub Y right there.*0980

*I plugged H inverse of U in for Y there, that is why I got 3 – U/2².*0983

*My derivative, I worked that out over here.*0990

*The derivative of 3 – U/2 is - ½, then I take the absolute value so I got a +½ here, and then the 3/2, and ½ gave me that ¾.*0992

*I also want to give a range for U and I got that by plugging in the boundaries of the range for Y,*1005

*back into that function and then that gave me the boundaries for U, going from 1 to 5.*1011

*I end up in the same answer that I got in the previous lecture for this problem, using completely different method.*1017

*It is really worth comparing one method to the other and seeing which one think is more efficient, *1023

*and making sure that both methods give you the same answer.*1028

*In example 3, Y has density function FY is 3/2Y².*1035

*This is actually the same density function that we had back in examples 1 and 2.*1040

*Y goes from -1 and 1, we want to determine whether the function U = Y² is monotonic.*1046

*If so, we want to find its inverse.*1052

*Remember, the whole point of checking whether a function is monotonic is that *1054

*we can only use the transformation method, when this function, in terms of Y is monotonic.*1059

*Let me go ahead and graph U = Y².*1067

*Let me set up YU axis, here is Y on the horizontal axis, and here is U on the vertical axis.*1071

*Y goes from -1 to 1, there is -1 and 1.*1080

*U = Y², of course that is the familiar parabola.*1084

*We are looking at just that part of it.*1089

*But eve though just that part of it, I can see that it is decreasing on the first segment and*1092

*increasing on the second segment, it is not monotonic.*1098

*A monotonic function has to be consistently decreasing or consistently increasing.*1102

*U = Y² is decreasing on the interval from -1 to 0 and increasing on the interval from 0 to 1.*1112

*It is not monotonic.*1138

*Because it is not monotonic, we cannot find an inverse function.*1148

*No inverse function and that also means, we cannot use the method of transformations to solve this problem.*1156

*We cannot use transformations to solve this problem.*1173

*That is kind of the end of the road, as far as this lecture is concerned on this problem.*1180

*Because the method that I'm trying to teach you right now, does not work on this problem.*1185

*We checked the requirements and it just does not work.*1189

*We cannot solve this problem using the method of transformations.*1193

*We did solve this exact problem in the previous lecture, using distribution functions.*1197

*See previous lecture for distribution function solution.*1205

*We still can solve this problem, if you are willing to watch the video for the previous lecture.*1225

*You will see that we solved this problem using distribution functions.*1230

*But in this one, the method of transformations does not work because we are not working with a monotonic function.*1233

*Just to remind you how I realize that, I graphed U = Y², this is the graph of U = Y².*1240

*In particular, I looked to the interval from -1 to 1.*1246

*I looked at this interval right here which is this part of the curve, *1250

*and I noticed that it was decreasing for the first half of the interval, increasing on the second half.*1254

*Monotonic means it is always increasing or always decreasing.*1260

*Since, it is sometimes decreasing and sometimes increasing, *1264

*It is not monotonic meaning there is no inverse function, meaning we cannot use the method of transformations here.*1267

*That is sort of the end of the line for method of transformations, if you want solve this problem,*1275

*go look at the previous lecture, we actually did this exact example in the previous lecture*1280

*using distribution functions, it did work but you cannot use transformations.*1284

*In example 4, we have got a word problem here.*1292

*Major earthquakes in California occur once every 2 decades on average, according to an exponential distribution.*1295

*The magnitude of an earthquake is 1 + Y² where Y is the time since the last earthquake.*1303

*We want to find density function for the magnitude of the next earthquake.*1308

*This is quite complicated.*1313

*First, we need some equations to get started and I see the words exponential distribution.*1315

*That is where I'm going to get started here.*1321

*I’m going to write down my density function for an exponential distribution.*1323

*The exponential distribution, that is one we studied back in an earlier lecture here in the probability lectures.*1328

*If you scroll back, I think the lecture was actually on the γ distribution.*1338

*And then, the exponential distribution came in as a special case of the γ distribution.*1342

*Scroll back, look for the lecture on the γ distribution, and you will see as part of that, something on the exponential distribution.*1348

*I will remind you now what the density function for the exponential distribution was.*1356

*It was F of Y is equal to 1/β E ⁻Y/β.*1362

*And then, the range on Y was from 0 to infinity.*1372

*One other thing that was really useful for the exponential distribution was to know the mean.*1378

*The mean of the exponential distribution is that parameter β.*1383

*Every exponential distribution has a parameter β, that is a fixed constant.*1388

*You plug in that β and then you get the density function here, and the mean is exactly that β.*1393

*In this case, we have an exponential distribution and it says that the mean is every 2 decades.*1399

*That means that on average, you wait 2 decades to see a major earthquake in California.*1408

*It is actually have been about 2 decades, since the last major earthquake in California.*1413

*The Northridge quake in 1994, that is 20 years since then.*1418

*This is perhaps, we are overdue for another earthquake.*1425

*What that means is the β is equal to 2, because we are going to measure time in decades here.*1429

*Our density function for Y, I will write FY of Y.*1435

*I'm just going to plug in β = 2 to my exponential distribution here.*1441

*1/2 × E ⁻Y/2, and that range on Y goes from 0 to infinity.*1445

*We are going to take a function, I will call it U.*1457

*U is going to be 1 + Y², I will write this as Y² + 1.*1460

*Notice that, if Y goes from 0 to infinity then U, if Y is 0, Y² + 1 will be 1.*1466

*As Y goes to infinity, U will also go to infinity.*1474

*The range for U is from 1 to infinity.*1477

*What I notice if I graph that, if Y goes from 0 to infinity, here is Y and here is U, Y² + 1 looks like that.*1482

*It is symmetric, Y² + 1 looks like that, U = Y² + 1.*1500

*On the range from 0 to infinity, it is increasing the entire way.*1505

*The fact that it is decreasing on the range below 0, it does not matter because we are only interested in the range above 0.*1511

*U is increasing on the range where Y goes from 0 to infinity.*1518

*Increasing means that it is monotonic.*1530

*Monotonic which means it does have an inverse, we can use the method of transformations here.*1534

*That means, I can solve for Y in terms of U and get an H inverse, this was H of Y. *1543

*Now, I’m going to solve for Y in terms of U.*1553

*What I get is Y² is equal to U -1.*1556

*Y is equal to √U -1 and that is my inverse function, H inverse of U.*1562

*I’m going to use that in my generic formula for the method of transformations.*1575

*My generic formula for the method of transformations is the density function for U is equal to the density function for Y.*1581

*But then, you plug in H inverse of U.*1592

*You plug in that expression that we just figured out.*1596

*You also have to multiply by the absolute value of the derivative of H inverse of U.*1598

*Maybe, I keep trying to twist my last absolute value sign, I noticed.*1606

*It might be helpful to find the derivative separately.*1613

*The derivative D by DU of H inverse U is the derivative of √U -1.*1616

*That is like U-1 ^ ½, its derivative is U -1 ^- ½.*1626

*That is 1/√U -1, ½ of that because of the power rule.*1632

*This is U -1 ^ ½, the derivative is ½ U -1 ^- ½ × the derivative of U -1, by the chain rule.*1640

*The derivative of U -1 is just 1, that is all I get there.*1651

*That is positive, I do not have to worry about my absolute values in the next step.*1656

*Let me go ahead and say, F sub Y of H inverse of U.*1660

*F sub Y is given right here, I'm going to go ½ E ^-, in place of Y, I’m going to put H inverse of U which is this √U -1.*1665

*E ^- √U -1/2, and then I have to multiply on by D by DU of H inverse of U, which I calculated over here.*1679

*That is 1/2 × √U -1.*1693

*And I'm really done there except I'm going to combine some terms and simplify a little bit.*1698

*I'm going to bring all these terms out to the front, 1/½ × ½ is ¼.*1704

*I will put √U -1 over here and now I’m going to multiply my E term.*1710

*E ^-√U -1/2, and that is as simple as it is going to get, that is my density function for U.*1716

*The range of possible values for U, I already figured that out, that goes from 1 to infinity.*1728

*That is my density function for U.*1736

*We are going to use this again in the next example, in example 5.*1738

*I want to make sure that you understand this and I want to make sure that you remember this,*1742

*because I do not want to figure it out again from scratch in example 5.*1746

*Let me go over that and make sure that all the steps are clear.*1752

*First of all, it said that major earthquakes in California occur, according to an exponential distribution.*1755

*I went back and found my formula for exponential distribution.*1762

*That was in the earlier lecture on the γ distributions, just go back and watch that,*1766

*if you have completely forgotten what the exponential distribution is.*1770

*Watch the γ distribution because the exponential distribution is a special case of it.*1773

*What I learned in that from that earlier lecture is that the density function*1779

*for the exponential distribution is 1/β E ⁺Y/β, where β is the mean of the distribution.*1784

*In this case, the mean is 2 that comes from the fact that earthquakes occur every 2 decades, on average.*1793

*My β is 2, I plug that in here E ⁻Y/2 and ½.*1800

*Y runs from 0 to infinity that also comes from the definition of the exponential distribution.*1807

*And then, I defined the variable U to be the magnitude of the quake which is this Y² + 1.*1813

*I got the Y² + 1 from the stem of the problem.*1820

*If Y goes from 0 to infinity then Y² + 1 will go from 1 to infinity.*1824

*That is just plugging those values in for Y.*1830

*I wanted to graph that, this is the graph here of Y² + 1.*1834

*I want to check that it was monotonic.*1840

*It does not look monotonic because it is decreasing on the negative values and then increasing on the positive values.*1843

*What is going on there?*1850

*What is going on is that the range we are interested in, is just the range from 0 to infinity.*1851

*We are only really looking at this part of the graph.*1857

*That part of the graph, U is increasing.*1864

*It is increasing all the way, it is monotonic.*1868

*We can use the method of transformations.*1871

*The first part of the method of transformations is to find the inverse function.*1875

*You take your equation and you try to solve it for Y, in terms of U.*1879

*That is what I did here, I solved that to Y is equal to U -1 ^½.*1884

*That was not very clear, the way I wrote that.*1889

*Let me see if I can write that a little more clearly.*1892

*That is ½, much better.*1895

*I got the inverse function U -1 ^½.*1898

*I also found its derivative because I know that I’m going to need it in the formula coming up.*1902

*½ U ⁺E -1/2, there is no need to invoke the chain rule there, because the derivative of U -1 is just 1.*1906

*Then, I use my generic formula for transformations.*1917

*I got this off one of the early slides for this lecture, one of the intro slides for this lecture.*1920

*That is just the formula for transformations that we are using through out these exercises.*1926

*It is the same every time.*1930

*I plugged in H inverse of U in place of Y, into the density function for Y.*1932

*That was plugging in √U-1, I plugged that in as H inverse of U.*1940

*I plug that in for Y, there is also this ½, that is where that ½ came from.*1948

*And then, this term comes from the derivative here.*1958

*That is where that term comes from.*1962

*I just collected terms, ½ and ½ give me ¼.*1964

*I still have √U -1 in the denominator and we still have that exponential expression.*1967

*We already figure out the range for U was right here, that is where that came from.*1974

*I want to make sure you are very comfortable with this because in the next example, example 5.*1979

*We are going to use this density function to calculate the mean of the magnitude.*1984

*I want to make sure that this density function is okay with you, *1989

*and you feel comfortable with it before you move on to example 5.*1992

*Example 5 here is a follow-up to example 4.*2000

*If you have not just watched example 4, go back and watch that first.*2004

*We are going to use the density function that we found in example 4, to find the expected magnitude of the next earthquake.*2008

*We want to check our answer using the properties of the exponential distribution.*2016

*Let me just remind you the short summary of example 4.*2020

*We had U is equal to Y² + 1.*2026

*Y followed an exponential distribution.*2030

*The density function for Y FY of Y was 1/β but β was 2 so E ^- Y/β.*2036

*Y ranges from 0 to infinity and U ranges from 1 to infinity.*2051

*We figured out the density function for U, we did this in example 4.*2059

*F sub U of U was 1/4 √U -1 × E ^ -√U -1/2.*2063

*That is as far as we got in example 4, but in this problem we have to find the mean of U *2078

*because we want to find the expected magnitude.*2084

*That is the same as expected value, and expected value is the same as the mean.*2086

*Let me show you how that works out.*2093

*E of U, by definition of expected value, we know this way back into the early lectures.*2095

*It is just the integral on U × F of U DU.*2101

*Let me plug in everything I can do here.*2108

*The F sub U of U, that is this function we figure out in example 4, that came from example 4.*2112

*The FS sub U of U is 1/4 √U -1 E ^-√U -1/2.*2122

*But there is one more power of U, that U right there.*2133

*I’m going to stick in a U right there and DU.*2136

*What is my range on U, there it is right there.*2142

*I want U to go from 1 to infinity.*2144

*And now, I have an integral that I need to solve.*2150

*You can solve this on your favorite software, if you like.*2154

*I do want to show you that it is possible to solve this by hand, using just what you learned in calculus 1 and 2.*2157

*I work it out using calculus 1 and 2, if you want to go ahead and cheat, *2164

*throw it into your favorite software, that is totally okay with me.*2168

*Here is my method, I’m going to use a new variable S.*2171

*I will define my S to be that thing in the exponent of the E.*2180

*The √U -1/2 and then, if I make that substitution, I also have to find my DS, which will be ½ ×,*2185

*The derivative of √U -1 is ½ × U -1⁻¹/2, U -1.*2198

*That looks a little awkward the way I written it.*2209

*Let me write it as DU/4 √U-1.*2211

*That is actually quite encouraging, because we have something very close to that inside the integral.*2220

*I’m a little encouraged by that.*2224

*I’m also going to want to solve for U, in terms of S.*2226

*I got 2S is √U -1 and, if I square both sides there, I get 4S² is equal to U -1.*2230

*4s² + 1 is equal to U.*2245

*Am I finished here, No, I still I also have to convert my limits.*2251

*When U is equal 1, S is equal to, if I plug in U = 1 into S, it looks like S is going to be 0.*2257

*When U goes to infinity, √U-1/2 will also go to infinity.*2267

*If I convert this integral into terms of S, I got the integral of S goes from 0 to infinity.*2274

*This U right here converts into 4S² + 1.*2284

*Everything else there that 4 √U-1 in the denominator, I can use that as part of the DS here.*2291

*I'm just going to build that into the DS and then I have E ⁻S as E ^-√U-1/2.*2302

*That was rigged up to work, I defined S in order to make that work.*2310

*I got an integral which I can solve using calculus 2 methods.*2315

*In particular, I’m going to use parts here and integration by parts.*2320

*I’m going to use the kind of cheaters trick for integration by parts, this tabular integration trick and get it done quickly.*2324

*4S square + 1, if you do not remember this, check out the section on integration by parts in my calculus 2 lectures, *2330

*here on www.educator.com because I showed you this trick there.*2338

*I got E ⁻S here, I’m going to take derivatives on the left.*2342

*The derivative of 4S² + 1 is 8S, the 1 goes away.*2346

*The derivative of that is 8 and then 0.*2351

*The integrals on the right, the integral of E ⁻S is –E ⁻S.*2356

*The integral of that is E ⁻S and the integral of that is –E ⁻S.*2361

*I will connect them up and go + - +, it got a little sloppy there, that was supposed to be a + there.*2369

*What I get for my integral is, it is like everything is going to be negative.*2378

*4S² + 1 × –E ⁻S -8S E ⁻S, + × -, -8 E ^- S.*2385

*I'm evaluating this from S =0 to S goes to infinity.*2402

*If I plug in my S going to infinity, this E ⁻S term dominates everything else possible.*2412

*An exponential term always beats a polynomial term.*2421

*E ⁻S is going to drag all of those terms to 0 because it is like saying 1/E ⁺infinity.*2425

*That 0 -0 -0 for the S going to infinity.*2434

*I plug in S =0, in the first term I have - and - so + E⁰ + E⁰, for the first term.*2438

*+ 0 and then + 8 E⁰.*2449

*E⁰ is exactly 1, E⁰ + 8E⁰ is 9 × 1 is just 9.*2454

*That is the expected magnitude of the next earthquake.*2463

*That is rather unsettling because that tells me that I’m looking forward to a magnitude 9 earthquake*2467

*on the Richter scale in California, that would be absolutely devastating.*2475

*I certainly hope that this example is wrong.*2479

*The math is correct but the geological premises are probably a little bit faulty there.*2483

*Let me check my answer using the properties of the exponential distribution, *2490

*because that is what it asked me to do in the example.*2495

*What I know about the exponential distribution is that the mean is β and the σ², *2499

*the variance of the exponential distribution is β².*2510

*Let me see how I can use that to find the expected value of U.*2516

*The expected value of U is the expected value of Y² + 1.*2522

*Let me split that up using linearity of expectation.*2530

*The expected value of Y² + the expected value of 1 which is just 1.*2532

*The expected value of Y², you can find that as σ² - the expected value of (Y)².*2538

*That is because you can find the variance as the expected value of Y².*2551

*There is a + there, the σ² is the expected value of Y² - the expected value of Y².*2560

*If you just move this term over to the other side then the expected value of Y² is just σ² + E of (Y)², I still have + 1 there.*2572

*If I plug in my variance for the exponential distribution, that is β² + E of Y is β is the mean, *2586

*another β² + 1 which is 2 β² + 1.*2598

*I was told that the mean was 2, β is equal to 2.*2603

*That is 2 × 4 + 1, we get 9.*2608

*That is very reassuring in the mathematical sense, because it does agree with my previous answer.*2614

*It is a little worrying geologically because I happen to live in Southern California and*2621

*I certainly do not want to experience a magnitude 9 earthquake.*2626

*Let me go ahead and check the steps here.*2631

*What we did was, we took the density function that we found in example 4.*2633

*Here is the density function that we found in example 4.*2638

*It wants us to find the expected value of U.*2641

*I'm going to integrate that, multiplying it by U.*2645

*That is because we are trying to find the expected value of U.*2648

*That is where that extra factor of U came in.*2651

*To solve the integral, it was a bit of tedious calculus.*2654

*You can just drop it into some kind of integration program or calculator, or something online.*2658

*What I did was I need a little substitution, S is √U -1.*2666

*I solve for U in terms of S, when I plug in that U, that turned into the 4S² + 1.*2671

*I also had to calculate my DS, that is me calculating the DS in terms of U.*2681

*All of that part became the DS, that part became the 4S² + 1 and that part right there converted into S.*2689

*That is how I got this integral E ⁻S DS.*2703

*And then, I also had to convert my limit.*2707

*I converted U = 1 and infinity into S = 0 to infinity.*2710

*That sets up an integration by parts problem.*2717

*Since, I'm too lazy to do the full integration by parts formula, I used tabular integration right here,*2719

*in order to work out the integral of 4S² + 1 × E ⁺S.*2726

*The derivatives on the left, integrals on the right.*2731

*I get this large expression, it is not that bad though because when you plug in infinity for S, *2733

*all of these terms disappear because E ⁻S goes to 0 faster than any polynomial can go.*2741

*That is why we get 0 for all the infinity terms.*2749

*And then, when I plugged in S =0 then, not all the terms disappeared, I got a couple of E⁰ terms which of course E⁰ is 1.*2753

*It simplified down to 9, that represents the expected magnitude of the next earthquake in California.*2766

*I can also check this using the properties of the exponential distribution.*2773

*What I know is that U was defined to be Y² + 1, there was my definition of U.*2780

*Since, it is expected value it is just the expected value of Y² + 1, that is linearity of expectation.*2786

*The expected value of Y², I can get this using the original formula for variance, *2792

*that we learned long ago in a lecture from way back at the top of the list.*2799

*The formula for variance was E of Y² – E (Y)².*2805

*I can solve that for E of Y² to be σ² + E of (Y)².*2811

*I know what σ² is, for the exponential distribution.*2818

*These came from properties of the exponential distribution which is something we learned about, *2822

*in the lecture on the γ distribution.*2830

*Scroll way back and you will see these properties for the exponential distribution.*2833

*I plugged in σ² is β², E of Y is β, and I know the β is 2, that something I got from example 4,*2838

*because we said that the major earthquakes occur every 2 years on average.*2846

*I plug that in, do a little arithmetic, and I come up with 9.*2852

*Since those two answers agree with each other, I'm pretty confident that I did everything right there.*2857

*In example 6, Y has a β distribution with α and β equal to 2.*2864

*U is Y² + 2Y + 1.*2869

*We want to find the density function for U.*2873

*The first thing here is to recognize what is a β distribution.*2878

*We had a lecture on β distributions, it is part of the series on continuous distributions.*2882

*If you scroll up, you will see a lecture on β distributions.*2886

*Let me remind you of the generic formula for density function for β distribution.*2891

*F of Y is equal to Y ⁺α -1, 1 – Y ⁺β – 1.*2898

*And then, we divide that by B of α β.*2909

*B of α β, in turn is Γ of α, Γ of β/Γ of α + β.*2917

*What we have to do is interpret this with α and β equal to 2.*2932

*Our F sub Y of Y is equal to, if I flip that denominator, I will have γ of 2 + 2 = γ 4 divided by γ of 2 × γ of 2.*2938

*Y ⁺α – 1 is Y¹ and 1- Y ⁺β – 1 is, β is 2, β -1 is 1.*2954

*What is γ of 4, remember there is this relationship between the γ function and factorials, at least for whole numbers.*2967

*Γ of N is equal to N -1!.*2977

*Γ of 4 is 3! which is 6, γ of 2 is 1! which is just 1.*2980

*The denominators cancel, we get 6 × Y × 1 – Y.*2993

*6 × Y - Y², that is my F sub Y of Y.*2999

*It actually let me now solve for, U is a function of Y.*3009

*I think I need to solve for my inverse function there.*3019

*U is H of Y which is Y² + 2Y + 1.*3023

*An easy way to think about that would be as Y + 1².*3030

*I think that is going to make it easier to deal with.*3034

*I want to solve for Y, in terms of U, that is how I get the inverse function.*3037

*I’m going to solve for Y, √U is equal to Y + 1.*3044

*Y is equal to √U -1, that right there is my H inverse of U.*3057

*Let me remind you of the generic formula for the density function, when you use the method of transformations.*3071

*It says that F sub U of variable U is equal to, we started with a density function for Y F sub Y.*3078

*Then, you plug in H inverse of U and then multiply on the derivative D by DU of H inverse of U.*3087

*In case that is negative, you want to take its absolute value.*3098

*We are going to need to know H inverse of U.*3101

*I already found it, √U -1.*3104

*We are also going to need to know H inverse of U, its derivative.*3108

*The derivative there, let us see.*3115

*I will go ahead and plug everything in here.*3118

*F sub Y, there is my F sub Y there.*3121

*This is 6 ×, it says Y but I have to convert that into U, convert that into H inverse of U.*3123

*√U -1, I'm looking at this Y - Y² but I'm plug in √U-1 for Y.*3132

*-√U – 1², it is going to get a little messy, is not it.*3144

*The derivative of H inverse of U is the derivative of √U-1.*3151

*That is 1/2 √U, that is because you can think of that as U¹/2.*3157

*The derivative is ½ U ^½, that -1 there that just goes away when we take the derivative.*3165

*We are supposed to take the absolute value of that, but that is already positive, 1/2 √U.*3171

*I'm just going to do some algebra to work this out.*3177

*Hopefully, I will simplify a bit, I do not think it is going to get great.*3180

*But, let us go ahead and see what we can do with this.*3183

*The 6/2 simplifies a little bit, right away.*3185

*We get 3/√U, inside the parenthesis I have √U -1.*3189

*If I square out √U - 1², I will get U -2 √U + 1 there.*3199

*Maybe, I can simplify that a little bit more, 3 √U -1- U + 2 √U – 1 there.*3213

*I guess this will simplify a bit, = 3/√U, √U + 2 √U is 3 √U -1- 1 – 2 – √U.*3231

*I can distribute that √U from the outside into the inside, 3 × 3 – 2/√U.*3250

*√U divided by √U is √U.*3264

*That is what I get, I do not think it is going to get any simpler than that.*3270

*I think we found the density function, that is F sub U/U.*3276

*The problem reminds us that we should also find the range of possible values for U.*3282

*If Y, for β distribution function, Y will go from 0 to 1, that is always the range for β distribution function, *3287

*whereas U in terms of Y, Y is √U -1.*3303

*U is Y + 1², U if it is Y + 1², 0 + 1² is 1.*3311

*1 + 1² is 4, my range of values for U is from 1 to 4.*3321

*That is my density function for U, kind of ugly there but I did not see any way in making it any nicer.*3330

*I think we are stuck with that.*3338

*In the end, it did simplify a little bit.*3340

* I guess we have to be happy with that.*3342

*Let me recap the steps there.*3345

*First of all, I saw that we had a β distribution.*3346

*I went back and looked at my formula for β distribution which we learned in a lecture on β distributions.*3349

*It is quite a long time ago in the chapter on continuous distributions.*3355

*Just go back and look, you will see a lecture on β distributions and you will see this formula Y ⁺α – 1 1- Y the β -1/B of AB.*3359

*You will also see an expansion for B of α β, I said B of AB, I mean B of α β, in terms of γ functions.*3370

* That is the expansion of B, since that is in the denominator, I flip that over when I pull it outside in the denominator here.*3380

*Here, my α and β were 2, I was given that in the problem.*3391

*I plug those in, I got exponents 1 on both of those.*3394

*To find those values of Γ, I just remembered that γ of a whole number N is equal to N -1!.*3399

*Γ of 4 is 3!, that is where that 6 came from.*3409

*Γ of 2 is just 1!, both of those dropped out.*3413

*If I multiply the Y through, get 1 - Y².*3418

*Now, I try to solve U = H of Y to find the inverse function.*3426

*The convenient way to write that was Y + 1².*3431

*And then, I want to solve it for Y, I took the square root of both sides.*3434

*√U = Y + 1, Y = √U -1.*3438

*I solved for Y in terms of U, that right there, let me see if I can write down a little more cleanly,*3443

*Is H inverse of U, and that is kind of the key ingredient to our transformation formula.*3450

*This is the generic transformation formula that I gave you on the introductory slides to this lecture.*3458

*That is the generic transformation formula.*3465

*I dropped the H inverse of U in here but that was in F of Y.*3467

*I plugged it in here, that is why I got my 6.*3472

*This right here is Y, that is coming from that Y.*3477

*This right here is Y² but I’m plugging in Y = H inverse of U to both of those.*3482

*And then, my derive of H inverse of U is how I got the 1/2 √U.*3491

*I got that by taking the derivative of this right here.*3498

*Remember, we take the derivative, the 1 drops out, we just get 1/2 √U.*3503

*This got a little messy but it was just algebra from here.*3509

*I expanded out my perfect square, A² + 2 AB + B².*3513

*I combine terms as best I could, I distributed the 3/√U.*3518

*I did distribute the 3, but I distributed the √U into the parentheses.*3524

*I got something a little bit nicer but still not that nice.*3530

*The way I got the range for U was, I remembered that the range for β distribution is always Y goes from 0 to 1.*3534

*I took those values of Y and I plugged those into my function for U.*3545

*U is Y + 1², that is how I got U goes from 1 to 4, when Y goes from 0 to 1.*3553

*That is where my range of values for U comes from.*3560

*That wraps up example 6, and that is the last example for this lecture on the method of transformations.*3565

*Remember, this is part of the three lectures series, these are all different methods *3571

*for how to find the density and distribution functions for a function of random variables.*3577

*This was the middle one, this is a method of transformations.*3586

*In the previous lecture, we covered the method of distribution functions.*3588

*I hope you will stick around for the next lecture which is the method of moment generating functions.*3592

*It might be worthwhile to review moment generating functions, before you jump in to the next lecture.*3598

*This is all part of a larger chapter on functions of random variables.*3604

*In turn, that is part of the probability lectures here on www.educator.com, with your host Will Murray.*3608

*Thank you very much for joining me today, bye.*3615

1 answer

Last reply by: Dr. William Murray

Thu Mar 5, 2015 5:43 PM

Post by Shant Suvalian on March 3, 2015

The transformation method doesn't only work for single variable situations. Least according to my teacher it doesn't. For example, the following question:

Let Y1 and Y2 be independent and uniformly distributed over the interval (0; 1) Find

the probability density function of U1 = Y1/Y2 by the following methods

(a) The method of Transformation

(b) The Multivariable Transformations Using the Jacobians.

Food for thought. It would come in handy to have an example like that. Or better yet, a full lecture on multivariable transformations using the Jacobians.

But otherwise? The following 3 series lectures saved me. My textbook isn't exactly the best. To say the least.

Thanks.