WEBVTT mathematics/probability/murray
00:00:00.000 --> 00:00:05.800
Hi, welcome back to the probability lectures here on www.educator.com, my name is Will Murray.
00:00:05.800 --> 00:00:09.400
Today, we are going to be talking about the method of transformations.
00:00:09.400 --> 00:00:16.600
That is one of 3 methods that we are studying to find the distributions of functions of random variables.
00:00:16.600 --> 00:00:22.000
This is actually the second of the 3 part lecture series.
00:00:22.000 --> 00:00:26.300
You have already learned the method of distribution functions.
00:00:26.300 --> 00:00:28.500
Today, we are going to talk about transformations.
00:00:28.500 --> 00:00:33.500
In the next lecture, we will talk about the method of moment generating functions.
00:00:33.500 --> 00:00:36.800
The premise is the same as in the previous lecture.
00:00:36.800 --> 00:00:42.400
If you just watched the previous lecture or maybe, if you just watch the next one for moment generating functions,
00:00:42.400 --> 00:00:45.100
the first couple slides here are going to be exactly the same.
00:00:45.100 --> 00:00:48.900
If you are up to speed on them, you can really skip over the first couple of slides here.
00:00:48.900 --> 00:00:52.500
It is nothing new, I’m just kind of introducing the same premise.
00:00:52.500 --> 00:00:58.400
The idea is that we have several random variables Y1, Y2, and so on.
00:00:58.400 --> 00:01:01.500
We want to study functions of them.
00:01:01.500 --> 00:01:07.800
The function variable that I’m going to use is U of Y1 Y2 up through YN.
00:01:07.800 --> 00:01:17.000
What we calculated in previous lectures, several lectures ago was methods to find the mean of U,
00:01:17.000 --> 00:01:19.100
and also the variance of U.
00:01:19.100 --> 00:01:22.900
But, I did not find the entire distribution of U.
00:01:22.900 --> 00:01:26.700
The purpose of this lecture, the one before it and the one after it,
00:01:26.700 --> 00:01:36.600
is to find several methods to calculate the formal distribution and density functions of this new variable U.
00:01:36.600 --> 00:01:41.400
That is the idea, we want to find the full distribution function.
00:01:41.400 --> 00:01:49.900
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.
00:01:49.900 --> 00:01:58.000
If we have the distribution function, you can always find the density function as the derivative of the distribution function.
00:01:58.000 --> 00:02:05.700
The density function is f, f is just the derivative of F.
00:02:05.700 --> 00:02:14.000
Assuming, we can figure out F and f, we can actually calculate the probability that U will be in any given range,
00:02:14.000 --> 00:02:20.700
because the probability that U will be from between A and B, one way to calculate it is to just integrate the density function.
00:02:20.700 --> 00:02:28.200
But of course, if you already know the distribution function that is just F of B - F of A.
00:02:28.200 --> 00:02:35.100
We would be able to calculate probabilities, if we know the density and distribution function.
00:02:35.100 --> 00:02:49.100
As I mentioned in the introductory text here, we have 3 methods to study the distribution of functions of random variables.
00:02:49.100 --> 00:02:53.800
The first method was called distribution functions, and that is what we studied in the previous lecture.
00:02:53.800 --> 00:02:57.900
If you are looking for the method distribution functions, just check out the previous lecture.
00:02:57.900 --> 00:03:01.700
In this lecture, we are going to study what is called the method of transformations.
00:03:01.700 --> 00:03:05.500
I will show you what that is all about, starting on the next slide.
00:03:05.500 --> 00:03:10.000
In the next lecture, we will talk about moment generating functions.
00:03:10.000 --> 00:03:16.300
We got three different methods to calculate the same general goal,
00:03:16.300 --> 00:03:20.600
but each method works better on different kinds of problems.
00:03:20.600 --> 00:03:23.800
That is why we have to learn all three here.
00:03:23.800 --> 00:03:27.100
The transformation method, that is the one we are studying this method.
00:03:27.100 --> 00:03:30.300
First of all, it only works for single variable situation.
00:03:30.300 --> 00:03:34.100
You cannot have a Y1, Y2, or YN.
00:03:34.100 --> 00:03:38.400
You can only have U as a function of a single variable Y.
00:03:38.400 --> 00:03:44.700
If you see Y1 and Y2, forget the transformation method, you are going to have to use one of the other two methods.
00:03:44.700 --> 00:03:50.600
Maybe the method of distribution functions or maybe the method of moment generating functions.
00:03:50.600 --> 00:03:57.100
The second requirement for the transformation method is that, the function U is a function of Y.
00:03:57.100 --> 00:04:01.600
We are going to call our function H, that must be a strictly monotonic function.
00:04:01.600 --> 00:04:08.600
A monotonic function means that it is always increasing or always decreasing.
00:04:08.600 --> 00:04:18.300
For example, here is a function that is always increasing and here is a function that is always decreasing.
00:04:18.300 --> 00:04:24.300
Either one of those kinds of functions for H, would be fair game for the transformation method.
00:04:24.300 --> 00:04:28.600
Here is a function that is not always increasing.
00:04:28.600 --> 00:04:33.800
That function is decreasing for Y, and then increasing, that is not monotonic.
00:04:33.800 --> 00:04:39.900
It will not be available for the transformation function method.
00:04:39.900 --> 00:04:44.800
Similarly, if you have a function like this, where it is increasing for a while and then decreasing,
00:04:44.800 --> 00:04:51.600
that is not something that you can use the transformation function method on.
00:04:51.600 --> 00:04:58.100
An example of the function that is always going to be monotonic is linear functions.
00:04:58.100 --> 00:05:13.200
U = AY + B, the special case there is that, if a 0 then you get a horizontal line, that does not count.
00:05:13.200 --> 00:05:20.600
But, the any kind of linear function, except for a horizontal line is monotonic
00:05:20.600 --> 00:05:26.500
because it will always be increasing like that or it will always be decreasing like that.
00:05:26.500 --> 00:05:31.200
Any linear function is fair game for the transformation method.
00:05:31.200 --> 00:05:35.700
Assuming that you do have a monotonic function, here is how you use it.
00:05:35.700 --> 00:05:39.500
What you do is, you try to solve for Y in terms of U.
00:05:39.500 --> 00:05:44.500
You have been given U, in terms of Y, U = H of Y.
00:05:44.500 --> 00:05:49.000
What you want to do is try to find Y, in terms of U.
00:05:49.000 --> 00:06:00.300
Let me write that down, you are trying to solve for Y in terms of U.
00:06:00.300 --> 00:06:03.600
You are reverse engineering the Y, in terms of U.
00:06:03.600 --> 00:06:08.800
You got Y to be a function of U, that function will be H inverse.
00:06:08.800 --> 00:06:13.500
I want to now clarify here that, this notation is not an exponent.
00:06:13.500 --> 00:06:21.000
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.
00:06:21.000 --> 00:06:25.000
This is not the same as 1/H of U.
00:06:25.000 --> 00:06:30.600
That exponent there is little misleading, it does not mean H of U⁻¹.
00:06:30.600 --> 00:06:36.700
What it really means is the inverse function.
00:06:36.700 --> 00:06:44.200
That H inverse is an inverse function not 1/H of U.
00:06:44.200 --> 00:06:50.400
We will get some practice with that, the first couple of examples are just practice finding inverse functions.
00:06:50.400 --> 00:06:58.300
Make sure that you know the difference between an inverse function and just taking the reciprocal.
00:06:58.300 --> 00:07:02.400
I still have not shown you how the formula for transformations works.
00:07:02.400 --> 00:07:08.700
These were all sort of the requirements that you have to check, before you can even use the transformation method.
00:07:08.700 --> 00:07:12.700
Let me show you how to use the transformation method.
00:07:12.700 --> 00:07:28.900
Remember that we said, we get H inverse of U by solving, you have U = H of Y.
00:07:28.900 --> 00:07:33.000
You solve that for Y, in terms of U.
00:07:33.000 --> 00:07:38.600
You solve that to get Y is equal to some function H inverse of U.
00:07:38.600 --> 00:07:42.200
Now, you have this H inverse and here is how you use it.
00:07:42.200 --> 00:07:47.600
You get the density function for U, by taking the density function for Y.
00:07:47.600 --> 00:07:54.100
Plugging in H inverse of U which is what you got here, when you solve for Y in terms of U.
00:07:54.100 --> 00:08:01.800
This is really Y, in terms of U.
00:08:01.800 --> 00:08:11.700
You also have to multiply on this correction term which is the absolute value of the derivative of H inverse of U.
00:08:11.700 --> 00:08:17.300
That is quite a complicated formula, I think it will make sense after we do some examples.
00:08:17.300 --> 00:08:24.500
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.
00:08:24.500 --> 00:08:27.600
Let us jump into the examples and practice it.
00:08:27.600 --> 00:08:34.000
The first example, this is actually the same example that we studied in the previous lecture,
00:08:34.000 --> 00:08:35.800
using distribution functions.
00:08:35.800 --> 00:08:37.700
We are going to have a different solution for this one.
00:08:37.700 --> 00:08:45.400
If you want, you can compare this example to the solution we found using distribution functions.
00:08:45.400 --> 00:08:50.300
Of course, we are going to get the same answer but we are going to use very different methods to find it.
00:08:50.300 --> 00:08:56.200
We are given that Y has density function F sub Y is 3/2Y².
00:08:56.200 --> 00:08:59.800
And then, the range for Y is -1 to 1.
00:08:59.800 --> 00:09:04.900
We want to determine whether the function U = 3 -2Y is monotonic.
00:09:04.900 --> 00:09:09.200
If so, we want to find its inverse.
00:09:09.200 --> 00:09:11.900
Monotonic means increasing or decreasing.
00:09:11.900 --> 00:09:24.500
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.
00:09:24.500 --> 00:09:32.600
It would look like that, and that is certainly a monotonic function, it is decreasing the entire way.
00:09:32.600 --> 00:09:45.400
Another way to notice it is that, H of Y, U is H of Y is 3 -2Y is linear.
00:09:45.400 --> 00:09:51.100
Any linear function is monotonic, as long as it is not a horizontal line.
00:09:51.100 --> 00:09:55.100
It is linear, hence, monotonic, which means we can find its inverse and
00:09:55.100 --> 00:10:00.500
we can use the method of transformations on this problem.
00:10:00.500 --> 00:10:03.000
We are going to actually finish the problem in example 2.
00:10:03.000 --> 00:10:08.400
But right now, we are just going to find the inverse function of H inverse of U.
00:10:08.400 --> 00:10:14.500
If U = 3 -2Y, I’m going to use the lowercase letters now.
00:10:14.500 --> 00:10:25.900
Then, I’m going to solve for Y, I will use the uppercase letters for this.
00:10:25.900 --> 00:10:31.600
U = 3 -2Y, I’m going to solve for Y.
00:10:31.600 --> 00:10:41.900
U + 2Y is equal to 3 and so 2Y is equal to 3 – U.
00:10:41.900 --> 00:10:52.500
Y is equal to 3 – U/2, what that means is that this is H inverse of U.
00:10:52.500 --> 00:10:57.900
It is the function you would use to get back from U to Y.
00:10:57.900 --> 00:11:01.100
What we have done here is found the inverse function.
00:11:01.100 --> 00:11:07.800
We have not found the density and distribution functions for U, we will do that over example 2.
00:11:07.800 --> 00:11:12.300
I just wanted to make sure that you are comfortable with finding an inverse function,
00:11:12.300 --> 00:11:15.000
before we use it for anything more complicated.
00:11:15.000 --> 00:11:17.300
Let me recap the steps here.
00:11:17.300 --> 00:11:21.600
We had to determine whether the function U = 3 - 2Y is monotonic.
00:11:21.600 --> 00:11:27.000
One way to do that is to graph it, and notice that it is decreasing the entire way.
00:11:27.000 --> 00:11:32.100
That is what I did here, I graphed U = 3 -2Y.
00:11:32.100 --> 00:11:37.100
Another way to notice that is to just observe that it is a linear function.
00:11:37.100 --> 00:11:41.800
Linear functions are always monotonic, as long as they are horizontal lines.
00:11:41.800 --> 00:11:53.100
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.
00:11:53.100 --> 00:11:57.100
That is what I was doing here, just a little algebra to get Y in terms of U.
00:11:57.100 --> 00:12:02.800
And then, the answer I got 3 –U/2 is H inverse of U.
00:12:02.800 --> 00:12:09.300
Hang onto this result, we are going to use it again, in example 2.
00:12:09.300 --> 00:12:13.600
In example 2, this is a follow-up to example 1.
00:12:13.600 --> 00:12:16.900
It is the exact same setting from example 1.
00:12:16.900 --> 00:12:24.100
We have Y has density function F sub Y is 3/2Y², Y goes from -1 to 1.
00:12:24.100 --> 00:12:28.400
We want to find the density function for U = 3 -2Y.
00:12:28.400 --> 00:12:31.600
We did start out studying this problem in example 1.
00:12:31.600 --> 00:12:36.900
Let me remind you what we figure out there, in example 1.
00:12:36.900 --> 00:12:42.600
We found the inverse function, H inverse of U, example 1.
00:12:42.600 --> 00:12:45.700
We solved that equation for Y, in terms of U.
00:12:45.700 --> 00:12:55.400
We got Y is equal to H inverse of U which was 3 – U/2.
00:12:55.400 --> 00:12:58.300
I’m going to try to find the density function for U.
00:12:58.300 --> 00:13:02.800
I’m going to use my generic formula for the transformation method.
00:13:02.800 --> 00:13:09.800
Let me remind you what that formula is for the transformation method.
00:13:09.800 --> 00:13:13.400
Just checking it here and make sure I do not write it down wrong.
00:13:13.400 --> 00:13:30.000
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.
00:13:30.000 --> 00:13:33.600
That should have been a closing absolute value sign there.
00:13:33.600 --> 00:13:49.800
In this case, my H inverse of U is what we found out above, that was from example 1, that is 3 –U/2.
00:13:49.800 --> 00:13:54.800
What I’m going to do is I’m going to plug that in to F sub Y.
00:13:54.800 --> 00:13:59.700
This is F sub Y, here is 3/2Y².
00:13:59.700 --> 00:14:06.300
It is 3/2 × 3 –U/2².
00:14:06.300 --> 00:14:08.100
Now, I need to find the derivative of that.
00:14:08.100 --> 00:14:16.600
The derivative of that DY DU of H inverse of U is, 3/2 goes nowhere.
00:14:16.600 --> 00:14:20.700
-U/2 has derivative - ½.
00:14:20.700 --> 00:14:27.200
The absolute value of that is + ½, that term gives me a +½.
00:14:27.200 --> 00:14:33.200
I can simplify this down to ¾, if I move that ½ to the front.
00:14:33.200 --> 00:14:40.000
3 – (U/2)², that is my density function.
00:14:40.000 --> 00:14:42.300
Let me figure out the range for U, really quick.
00:14:42.300 --> 00:14:52.600
If Y is equal to -1 then U is 3 -2Y, that is 3 + 2 which would be 5.
00:14:52.600 --> 00:14:59.400
If Y is equal to 1 and U is 3 - 2Y would be 1.
00:14:59.400 --> 00:15:10.400
This is my U goes from 1 to 5, that is my density function, the f of U.
00:15:10.400 --> 00:15:12.600
I have done the problem now.
00:15:12.600 --> 00:15:17.800
This problem is one we did in the previous lecture, the lecture on distribution functions.
00:15:17.800 --> 00:15:21.900
We used a very different method to solve it, involved doing an integral.
00:15:21.900 --> 00:15:31.100
This one requires doing derivatives, the method we used using distribution functions involved taking an integral.
00:15:31.100 --> 00:15:37.000
You might go back and check the example from the previous lecture, when we used the distribution functions.
00:15:37.000 --> 00:15:41.700
We do get the same answer at the end of it, but using very different methods.
00:15:41.700 --> 00:15:45.100
I think this method is a little bit quicker, for this particular problem.
00:15:45.100 --> 00:15:48.700
Let me remind you how we got this answer.
00:15:48.700 --> 00:15:54.300
First, I was invoking what I learned from example 1, the one just previous to this one,
00:15:54.300 --> 00:15:58.800
where we solve for H inverse of U to be 3 – U/2.
00:15:58.800 --> 00:16:05.800
That is just solving this equation for Y, in terms of U, nothing difficult there.
00:16:05.800 --> 00:16:09.400
Then, I used my generic formula for the transformation method,
00:16:09.400 --> 00:16:15.500
F sub U of U is FY of H inverse of U × the derivative of H inverse of U.
00:16:15.500 --> 00:16:20.200
I took my H inverse of U and I just plug it in into F sub Y.
00:16:20.200 --> 00:16:22.700
There is my F sub Y right there.
00:16:22.700 --> 00:16:30.300
I plugged H inverse of U in for Y there, that is why I got 3 – U/2².
00:16:30.300 --> 00:16:32.300
My derivative, I worked that out over here.
00:16:32.300 --> 00:16:45.200
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 ¾.
00:16:45.200 --> 00:16:51.500
I also want to give a range for U and I got that by plugging in the boundaries of the range for Y,
00:16:51.500 --> 00:16:57.500
back into that function and then that gave me the boundaries for U, going from 1 to 5.
00:16:57.500 --> 00:17:03.600
I end up in the same answer that I got in the previous lecture for this problem, using completely different method.
00:17:03.600 --> 00:17:08.400
It is really worth comparing one method to the other and seeing which one think is more efficient,
00:17:08.400 --> 00:17:14.900
and making sure that both methods give you the same answer.
00:17:14.900 --> 00:17:19.800
In example 3, Y has density function FY is 3/2Y².
00:17:19.800 --> 00:17:26.600
This is actually the same density function that we had back in examples 1 and 2.
00:17:26.600 --> 00:17:32.400
Y goes from -1 and 1, we want to determine whether the function U = Y² is monotonic.
00:17:32.400 --> 00:17:34.500
If so, we want to find its inverse.
00:17:34.500 --> 00:17:39.600
Remember, the whole point of checking whether a function is monotonic is that
00:17:39.600 --> 00:17:47.100
we can only use the transformation method, when this function, in terms of Y is monotonic.
00:17:47.100 --> 00:17:51.600
Let me go ahead and graph U = Y².
00:17:51.600 --> 00:18:00.100
Let me set up YU axis, here is Y on the horizontal axis, and here is U on the vertical axis.
00:18:00.100 --> 00:18:04.400
Y goes from -1 to 1, there is -1 and 1.
00:18:04.400 --> 00:18:09.100
U = Y², of course that is the familiar parabola.
00:18:09.100 --> 00:18:12.100
We are looking at just that part of it.
00:18:12.100 --> 00:18:18.100
But eve though just that part of it, I can see that it is decreasing on the first segment and
00:18:18.100 --> 00:18:22.000
increasing on the second segment, it is not monotonic.
00:18:22.000 --> 00:18:31.700
A monotonic function has to be consistently decreasing or consistently increasing.
00:18:31.700 --> 00:18:58.000
U = Y² is decreasing on the interval from -1 to 0 and increasing on the interval from 0 to 1.
00:18:58.000 --> 00:19:08.100
It is not monotonic.
00:19:08.100 --> 00:19:16.400
Because it is not monotonic, we cannot find an inverse function.
00:19:16.400 --> 00:19:32.800
No inverse function and that also means, we cannot use the method of transformations to solve this problem.
00:19:32.800 --> 00:19:40.300
We cannot use transformations to solve this problem.
00:19:40.300 --> 00:19:45.200
That is kind of the end of the road, as far as this lecture is concerned on this problem.
00:19:45.200 --> 00:19:49.300
Because the method that I'm trying to teach you right now, does not work on this problem.
00:19:49.300 --> 00:19:52.900
We checked the requirements and it just does not work.
00:19:52.900 --> 00:19:57.400
We cannot solve this problem using the method of transformations.
00:19:57.400 --> 00:20:05.500
We did solve this exact problem in the previous lecture, using distribution functions.
00:20:05.500 --> 00:20:25.300
See previous lecture for distribution function solution.
00:20:25.300 --> 00:20:30.200
We still can solve this problem, if you are willing to watch the video for the previous lecture.
00:20:30.200 --> 00:20:33.600
You will see that we solved this problem using distribution functions.
00:20:33.600 --> 00:20:39.700
But in this one, the method of transformations does not work because we are not working with a monotonic function.
00:20:39.700 --> 00:20:46.400
Just to remind you how I realize that, I graphed U = Y², this is the graph of U = Y².
00:20:46.400 --> 00:20:50.500
In particular, I looked to the interval from -1 to 1.
00:20:50.500 --> 00:20:53.900
I looked at this interval right here which is this part of the curve,
00:20:53.900 --> 00:20:59.900
and I noticed that it was decreasing for the first half of the interval, increasing on the second half.
00:20:59.900 --> 00:21:04.200
Monotonic means it is always increasing or always decreasing.
00:21:04.200 --> 00:21:07.400
Since, it is sometimes decreasing and sometimes increasing,
00:21:07.400 --> 00:21:15.500
It is not monotonic meaning there is no inverse function, meaning we cannot use the method of transformations here.
00:21:15.500 --> 00:21:20.000
That is sort of the end of the line for method of transformations, if you want solve this problem,
00:21:20.000 --> 00:21:24.500
go look at the previous lecture, we actually did this exact example in the previous lecture
00:21:24.500 --> 00:21:32.400
using distribution functions, it did work but you cannot use transformations.
00:21:32.400 --> 00:21:35.500
In example 4, we have got a word problem here.
00:21:35.500 --> 00:21:42.900
Major earthquakes in California occur once every 2 decades on average, according to an exponential distribution.
00:21:42.900 --> 00:21:47.900
The magnitude of an earthquake is 1 + Y² where Y is the time since the last earthquake.
00:21:47.900 --> 00:21:53.100
We want to find density function for the magnitude of the next earthquake.
00:21:53.100 --> 00:21:55.300
This is quite complicated.
00:21:55.300 --> 00:22:01.000
First, we need some equations to get started and I see the words exponential distribution.
00:22:01.000 --> 00:22:02.700
That is where I'm going to get started here.
00:22:02.700 --> 00:22:08.300
I’m going to write down my density function for an exponential distribution.
00:22:08.300 --> 00:22:18.500
The exponential distribution, that is one we studied back in an earlier lecture here in the probability lectures.
00:22:18.500 --> 00:22:22.100
If you scroll back, I think the lecture was actually on the γ distribution.
00:22:22.100 --> 00:22:27.700
And then, the exponential distribution came in as a special case of the γ distribution.
00:22:27.700 --> 00:22:36.500
Scroll back, look for the lecture on the γ distribution, and you will see as part of that, something on the exponential distribution.
00:22:36.500 --> 00:22:42.300
I will remind you now what the density function for the exponential distribution was.
00:22:42.300 --> 00:22:52.200
It was F of Y is equal to 1/β E ⁻Y/β.
00:22:52.200 --> 00:22:58.500
And then, the range on Y was from 0 to infinity.
00:22:58.500 --> 00:23:03.200
One other thing that was really useful for the exponential distribution was to know the mean.
00:23:03.200 --> 00:23:07.700
The mean of the exponential distribution is that parameter β.
00:23:07.700 --> 00:23:12.900
Every exponential distribution has a parameter β, that is a fixed constant.
00:23:12.900 --> 00:23:18.700
You plug in that β and then you get the density function here, and the mean is exactly that β.
00:23:18.700 --> 00:23:27.700
In this case, we have an exponential distribution and it says that the mean is every 2 decades.
00:23:27.700 --> 00:23:33.600
That means that on average, you wait 2 decades to see a major earthquake in California.
00:23:33.600 --> 00:23:38.300
It is actually have been about 2 decades, since the last major earthquake in California.
00:23:38.300 --> 00:23:45.100
The Northridge quake in 1994, that is 20 years since then.
00:23:45.100 --> 00:23:49.300
This is perhaps, we are overdue for another earthquake.
00:23:49.300 --> 00:23:55.400
What that means is the β is equal to 2, because we are going to measure time in decades here.
00:23:55.400 --> 00:24:01.000
Our density function for Y, I will write FY of Y.
00:24:01.000 --> 00:24:04.900
I'm just going to plug in β = 2 to my exponential distribution here.
00:24:04.900 --> 00:24:17.500
1/2 × E ⁻Y/2, and that range on Y goes from 0 to infinity.
00:24:17.500 --> 00:24:20.600
We are going to take a function, I will call it U.
00:24:20.600 --> 00:24:26.000
U is going to be 1 + Y², I will write this as Y² + 1.
00:24:26.000 --> 00:24:34.400
Notice that, if Y goes from 0 to infinity then U, if Y is 0, Y² + 1 will be 1.
00:24:34.400 --> 00:24:37.100
As Y goes to infinity, U will also go to infinity.
00:24:37.100 --> 00:24:42.300
The range for U is from 1 to infinity.
00:24:42.300 --> 00:24:59.800
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.
00:24:59.800 --> 00:25:04.800
It is symmetric, Y² + 1 looks like that, U = Y² + 1.
00:25:04.800 --> 00:25:10.900
On the range from 0 to infinity, it is increasing the entire way.
00:25:10.900 --> 00:25:18.100
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.
00:25:18.100 --> 00:25:30.000
U is increasing on the range where Y goes from 0 to infinity.
00:25:30.000 --> 00:25:34.000
Increasing means that it is monotonic.
00:25:34.000 --> 00:25:43.500
Monotonic which means it does have an inverse, we can use the method of transformations here.
00:25:43.500 --> 00:25:53.400
That means, I can solve for Y in terms of U and get an H inverse, this was H of Y.
00:25:53.400 --> 00:25:56.300
Now, I’m going to solve for Y in terms of U.
00:25:56.300 --> 00:26:02.600
What I get is Y² is equal to U -1.
00:26:02.600 --> 00:26:14.800
Y is equal to √U -1 and that is my inverse function, H inverse of U.
00:26:14.800 --> 00:26:21.500
I’m going to use that in my generic formula for the method of transformations.
00:26:21.500 --> 00:26:32.100
My generic formula for the method of transformations is the density function for U is equal to the density function for Y.
00:26:32.100 --> 00:26:36.200
But then, you plug in H inverse of U.
00:26:36.200 --> 00:26:38.600
You plug in that expression that we just figured out.
00:26:38.600 --> 00:26:46.100
You also have to multiply by the absolute value of the derivative of H inverse of U.
00:26:46.100 --> 00:26:53.300
Maybe, I keep trying to twist my last absolute value sign, I noticed.
00:26:53.300 --> 00:26:56.200
It might be helpful to find the derivative separately.
00:26:56.200 --> 00:27:05.900
The derivative D by DU of H inverse U is the derivative of √U -1.
00:27:05.900 --> 00:27:12.600
That is like U-1 ^ ½, its derivative is U -1 ^- ½.
00:27:12.600 --> 00:27:20.100
That is 1/√U -1, ½ of that because of the power rule.
00:27:20.100 --> 00:27:31.300
This is U -1 ^ ½, the derivative is ½ U -1 ^- ½ × the derivative of U -1, by the chain rule.
00:27:31.300 --> 00:27:35.800
The derivative of U -1 is just 1, that is all I get there.
00:27:35.800 --> 00:27:39.700
That is positive, I do not have to worry about my absolute values in the next step.
00:27:39.700 --> 00:27:44.800
Let me go ahead and say, F sub Y of H inverse of U.
00:27:44.800 --> 00:27:59.500
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.
00:27:59.500 --> 00:28:12.700
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.
00:28:12.700 --> 00:28:18.300
That is 1/2 × √U -1.
00:28:18.300 --> 00:28:24.200
And I'm really done there except I'm going to combine some terms and simplify a little bit.
00:28:24.200 --> 00:28:30.300
I'm going to bring all these terms out to the front, 1/½ × ½ is ¼.
00:28:30.300 --> 00:28:35.700
I will put √U -1 over here and now I’m going to multiply my E term.
00:28:35.700 --> 00:28:48.300
E ^-√U -1/2, and that is as simple as it is going to get, that is my density function for U.
00:28:48.300 --> 00:28:55.700
The range of possible values for U, I already figured that out, that goes from 1 to infinity.
00:28:55.700 --> 00:28:58.000
That is my density function for U.
00:28:58.000 --> 00:29:02.000
We are going to use this again in the next example, in example 5.
00:29:02.000 --> 00:29:06.200
I want to make sure that you understand this and I want to make sure that you remember this,
00:29:06.200 --> 00:29:12.100
because I do not want to figure it out again from scratch in example 5.
00:29:12.100 --> 00:29:15.000
Let me go over that and make sure that all the steps are clear.
00:29:15.000 --> 00:29:22.400
First of all, it said that major earthquakes in California occur, according to an exponential distribution.
00:29:22.400 --> 00:29:26.300
I went back and found my formula for exponential distribution.
00:29:26.300 --> 00:29:30.100
That was in the earlier lecture on the γ distributions, just go back and watch that,
00:29:30.100 --> 00:29:33.000
if you have completely forgotten what the exponential distribution is.
00:29:33.000 --> 00:29:39.300
Watch the γ distribution because the exponential distribution is a special case of it.
00:29:39.300 --> 00:29:44.100
What I learned in that from that earlier lecture is that the density function
00:29:44.100 --> 00:29:52.800
for the exponential distribution is 1/β E ⁺Y/β, where β is the mean of the distribution.
00:29:52.800 --> 00:30:00.500
In this case, the mean is 2 that comes from the fact that earthquakes occur every 2 decades, on average.
00:30:00.500 --> 00:30:07.000
My β is 2, I plug that in here E ⁻Y/2 and ½.
00:30:07.000 --> 00:30:13.100
Y runs from 0 to infinity that also comes from the definition of the exponential distribution.
00:30:13.100 --> 00:30:19.800
And then, I defined the variable U to be the magnitude of the quake which is this Y² + 1.
00:30:19.800 --> 00:30:24.100
I got the Y² + 1 from the stem of the problem.
00:30:24.100 --> 00:30:30.200
If Y goes from 0 to infinity then Y² + 1 will go from 1 to infinity.
00:30:30.200 --> 00:30:34.400
That is just plugging those values in for Y.
00:30:34.400 --> 00:30:40.500
I wanted to graph that, this is the graph here of Y² + 1.
00:30:40.500 --> 00:30:43.000
I want to check that it was monotonic.
00:30:43.000 --> 00:30:50.400
It does not look monotonic because it is decreasing on the negative values and then increasing on the positive values.
00:30:50.400 --> 00:30:51.500
What is going on there?
00:30:51.500 --> 00:30:57.400
What is going on is that the range we are interested in, is just the range from 0 to infinity.
00:30:57.400 --> 00:31:03.900
We are only really looking at this part of the graph.
00:31:03.900 --> 00:31:07.700
That part of the graph, U is increasing.
00:31:07.700 --> 00:31:11.300
It is increasing all the way, it is monotonic.
00:31:11.300 --> 00:31:14.700
We can use the method of transformations.
00:31:14.700 --> 00:31:18.700
The first part of the method of transformations is to find the inverse function.
00:31:18.700 --> 00:31:23.900
You take your equation and you try to solve it for Y, in terms of U.
00:31:23.900 --> 00:31:29.500
That is what I did here, I solved that to Y is equal to U -1 ^½.
00:31:29.500 --> 00:31:32.000
That was not very clear, the way I wrote that.
00:31:32.000 --> 00:31:34.700
Let me see if I can write that a little more clearly.
00:31:34.700 --> 00:31:38.500
That is ½, much better.
00:31:38.500 --> 00:31:41.900
I got the inverse function U -1 ^½.
00:31:41.900 --> 00:31:46.200
I also found its derivative because I know that I’m going to need it in the formula coming up.
00:31:46.200 --> 00:31:56.700
½ U ⁺E -1/2, there is no need to invoke the chain rule there, because the derivative of U -1 is just 1.
00:31:56.700 --> 00:32:00.600
Then, I use my generic formula for transformations.
00:32:00.600 --> 00:32:05.800
I got this off one of the early slides for this lecture, one of the intro slides for this lecture.
00:32:05.800 --> 00:32:10.000
That is just the formula for transformations that we are using through out these exercises.
00:32:10.000 --> 00:32:12.100
It is the same every time.
00:32:12.100 --> 00:32:19.900
I plugged in H inverse of U in place of Y, into the density function for Y.
00:32:19.900 --> 00:32:28.000
That was plugging in √U-1, I plugged that in as H inverse of U.
00:32:28.000 --> 00:32:38.100
I plug that in for Y, there is also this ½, that is where that ½ came from.
00:32:38.100 --> 00:32:41.700
And then, this term comes from the derivative here.
00:32:41.700 --> 00:32:44.000
That is where that term comes from.
00:32:44.000 --> 00:32:47.600
I just collected terms, ½ and ½ give me ¼.
00:32:47.600 --> 00:32:54.300
I still have √U -1 in the denominator and we still have that exponential expression.
00:32:54.300 --> 00:32:59.300
We already figure out the range for U was right here, that is where that came from.
00:32:59.300 --> 00:33:04.200
I want to make sure you are very comfortable with this because in the next example, example 5.
00:33:04.200 --> 00:33:09.100
We are going to use this density function to calculate the mean of the magnitude.
00:33:09.100 --> 00:33:12.500
I want to make sure that this density function is okay with you,
00:33:12.500 --> 00:33:20.600
and you feel comfortable with it before you move on to example 5.
00:33:20.600 --> 00:33:24.200
Example 5 here is a follow-up to example 4.
00:33:24.200 --> 00:33:28.000
If you have not just watched example 4, go back and watch that first.
00:33:28.000 --> 00:33:36.200
We are going to use the density function that we found in example 4, to find the expected magnitude of the next earthquake.
00:33:36.200 --> 00:33:40.000
We want to check our answer using the properties of the exponential distribution.
00:33:40.000 --> 00:33:45.800
Let me just remind you the short summary of example 4.
00:33:45.800 --> 00:33:49.900
We had U is equal to Y² + 1.
00:33:49.900 --> 00:33:55.700
Y followed an exponential distribution.
00:33:55.700 --> 00:34:10.800
The density function for Y FY of Y was 1/β but β was 2 so E ^- Y/β.
00:34:10.800 --> 00:34:19.600
Y ranges from 0 to infinity and U ranges from 1 to infinity.
00:34:19.600 --> 00:34:23.600
We figured out the density function for U, we did this in example 4.
00:34:23.600 --> 00:34:38.100
F sub U of U was 1/4 √U -1 × E ^ -√U -1/2.
00:34:38.100 --> 00:34:43.900
That is as far as we got in example 4, but in this problem we have to find the mean of U
00:34:43.900 --> 00:34:46.400
because we want to find the expected magnitude.
00:34:46.400 --> 00:34:53.300
That is the same as expected value, and expected value is the same as the mean.
00:34:53.300 --> 00:34:55.100
Let me show you how that works out.
00:34:55.100 --> 00:35:01.600
E of U, by definition of expected value, we know this way back into the early lectures.
00:35:01.600 --> 00:35:08.600
It is just the integral on U × F of U DU.
00:35:08.600 --> 00:35:11.800
Let me plug in everything I can do here.
00:35:11.800 --> 00:35:22.300
The F sub U of U, that is this function we figure out in example 4, that came from example 4.
00:35:22.300 --> 00:35:33.100
The FS sub U of U is 1/4 √U -1 E ^-√U -1/2.
00:35:33.100 --> 00:35:35.800
But there is one more power of U, that U right there.
00:35:35.800 --> 00:35:42.100
I’m going to stick in a U right there and DU.
00:35:42.100 --> 00:35:44.400
What is my range on U, there it is right there.
00:35:44.400 --> 00:35:49.800
I want U to go from 1 to infinity.
00:35:49.800 --> 00:35:54.300
And now, I have an integral that I need to solve.
00:35:54.300 --> 00:35:57.000
You can solve this on your favorite software, if you like.
00:35:57.000 --> 00:36:03.900
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.
00:36:03.900 --> 00:36:08.200
I work it out using calculus 1 and 2, if you want to go ahead and cheat,
00:36:08.200 --> 00:36:11.600
throw it into your favorite software, that is totally okay with me.
00:36:11.600 --> 00:36:20.300
Here is my method, I’m going to use a new variable S.
00:36:20.300 --> 00:36:24.900
I will define my S to be that thing in the exponent of the E.
00:36:24.900 --> 00:36:38.100
The √U -1/2 and then, if I make that substitution, I also have to find my DS, which will be ½ ×,
00:36:38.100 --> 00:36:49.200
The derivative of √U -1 is ½ × U -1⁻¹/2, U -1.
00:36:49.200 --> 00:36:50.700
That looks a little awkward the way I written it.
00:36:50.700 --> 00:36:59.700
Let me write it as DU/4 √U-1.
00:36:59.700 --> 00:37:04.000
That is actually quite encouraging, because we have something very close to that inside the integral.
00:37:04.000 --> 00:37:05.800
I’m a little encouraged by that.
00:37:05.800 --> 00:37:10.500
I’m also going to want to solve for U, in terms of S.
00:37:10.500 --> 00:37:25.600
I got 2S is √U -1 and, if I square both sides there, I get 4S² is equal to U -1.
00:37:25.600 --> 00:37:31.000
4s² + 1 is equal to U.
00:37:31.000 --> 00:37:36.900
Am I finished here, No, I still I also have to convert my limits.
00:37:36.900 --> 00:37:47.000
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.
00:37:47.000 --> 00:37:54.200
When U goes to infinity, √U-1/2 will also go to infinity.
00:37:54.200 --> 00:38:04.300
If I convert this integral into terms of S, I got the integral of S goes from 0 to infinity.
00:38:04.300 --> 00:38:11.300
This U right here converts into 4S² + 1.
00:38:11.300 --> 00:38:21.900
Everything else there that 4 √U-1 in the denominator, I can use that as part of the DS here.
00:38:21.900 --> 00:38:30.400
I'm just going to build that into the DS and then I have E ⁻S as E ^-√U-1/2.
00:38:30.400 --> 00:38:34.700
That was rigged up to work, I defined S in order to make that work.
00:38:34.700 --> 00:38:40.100
I got an integral which I can solve using calculus 2 methods.
00:38:40.100 --> 00:38:44.300
In particular, I’m going to use parts here and integration by parts.
00:38:44.300 --> 00:38:50.600
I’m going to use the kind of cheaters trick for integration by parts, this tabular integration trick and get it done quickly.
00:38:50.600 --> 00:38:58.300
4S square + 1, if you do not remember this, check out the section on integration by parts in my calculus 2 lectures,
00:38:58.300 --> 00:39:02.400
here on www.educator.com because I showed you this trick there.
00:39:02.400 --> 00:39:06.000
I got E ⁻S here, I’m going to take derivatives on the left.
00:39:06.000 --> 00:39:10.700
The derivative of 4S² + 1 is 8S, the 1 goes away.
00:39:10.700 --> 00:39:16.100
The derivative of that is 8 and then 0.
00:39:16.100 --> 00:39:21.500
The integrals on the right, the integral of E ⁻S is –E ⁻S.
00:39:21.500 --> 00:39:28.700
The integral of that is E ⁻S and the integral of that is –E ⁻S.
00:39:28.700 --> 00:39:37.700
I will connect them up and go + - +, it got a little sloppy there, that was supposed to be a + there.
00:39:37.700 --> 00:39:44.900
What I get for my integral is, it is like everything is going to be negative.
00:39:44.900 --> 00:40:02.200
4S² + 1 × –E ⁻S -8S E ⁻S, + × -, -8 E ^- S.
00:40:02.200 --> 00:40:12.100
I'm evaluating this from S =0 to S goes to infinity.
00:40:12.100 --> 00:40:21.600
If I plug in my S going to infinity, this E ⁻S term dominates everything else possible.
00:40:21.600 --> 00:40:24.700
An exponential term always beats a polynomial term.
00:40:24.700 --> 00:40:33.700
E ⁻S is going to drag all of those terms to 0 because it is like saying 1/E ⁺infinity.
00:40:33.700 --> 00:40:38.200
That 0 -0 -0 for the S going to infinity.
00:40:38.200 --> 00:40:49.500
I plug in S =0, in the first term I have - and - so + E⁻⁰ + E⁰, for the first term.
00:40:49.500 --> 00:40:54.000
+ 0 and then + 8 E⁰.
00:40:54.000 --> 00:41:03.000
E⁰ is exactly 1, E⁰ + 8E⁰ is 9 × 1 is just 9.
00:41:03.000 --> 00:41:07.300
That is the expected magnitude of the next earthquake.
00:41:07.300 --> 00:41:15.400
That is rather unsettling because that tells me that I’m looking forward to a magnitude 9 earthquake
00:41:15.400 --> 00:41:19.200
on the Richter scale in California, that would be absolutely devastating.
00:41:19.200 --> 00:41:23.000
I certainly hope that this example is wrong.
00:41:23.000 --> 00:41:30.500
The math is correct but the geological premises are probably a little bit faulty there.
00:41:30.500 --> 00:41:34.700
Let me check my answer using the properties of the exponential distribution,
00:41:34.700 --> 00:41:39.200
because that is what it asked me to do in the example.
00:41:39.200 --> 00:41:50.000
What I know about the exponential distribution is that the mean is β and the σ²,
00:41:50.000 --> 00:41:55.900
the variance of the exponential distribution is β².
00:41:55.900 --> 00:42:02.200
Let me see how I can use that to find the expected value of U.
00:42:02.200 --> 00:42:10.000
The expected value of U is the expected value of Y² + 1.
00:42:10.000 --> 00:42:12.400
Let me split that up using linearity of expectation.
00:42:12.400 --> 00:42:18.500
The expected value of Y² + the expected value of 1 which is just 1.
00:42:18.500 --> 00:42:30.700
The expected value of Y², you can find that as σ² - the expected value of (Y)².
00:42:30.700 --> 00:42:40.600
That is because you can find the variance as the expected value of Y².
00:42:40.600 --> 00:42:52.300
There is a + there, the σ² is the expected value of Y² - the expected value of Y².
00:42:52.300 --> 00:43:06.200
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.
00:43:06.200 --> 00:43:17.700
If I plug in my variance for the exponential distribution, that is β² + E of Y is β is the mean,
00:43:17.700 --> 00:43:23.500
another β² + 1 which is 2 β² + 1.
00:43:23.500 --> 00:43:28.500
I was told that the mean was 2, β is equal to 2.
00:43:28.500 --> 00:43:34.600
That is 2 × 4 + 1, we get 9.
00:43:34.600 --> 00:43:41.300
That is very reassuring in the mathematical sense, because it does agree with my previous answer.
00:43:41.300 --> 00:43:45.800
It is a little worrying geologically because I happen to live in Southern California and
00:43:45.800 --> 00:43:50.800
I certainly do not want to experience a magnitude 9 earthquake.
00:43:50.800 --> 00:43:53.200
Let me go ahead and check the steps here.
00:43:53.200 --> 00:43:58.200
What we did was, we took the density function that we found in example 4.
00:43:58.200 --> 00:44:01.400
Here is the density function that we found in example 4.
00:44:01.400 --> 00:44:05.200
It wants us to find the expected value of U.
00:44:05.200 --> 00:44:07.900
I'm going to integrate that, multiplying it by U.
00:44:07.900 --> 00:44:11.300
That is because we are trying to find the expected value of U.
00:44:11.300 --> 00:44:14.400
That is where that extra factor of U came in.
00:44:14.400 --> 00:44:18.500
To solve the integral, it was a bit of tedious calculus.
00:44:18.500 --> 00:44:25.900
You can just drop it into some kind of integration program or calculator, or something online.
00:44:25.900 --> 00:44:31.100
What I did was I need a little substitution, S is √U -1.
00:44:31.100 --> 00:44:40.800
I solve for U in terms of S, when I plug in that U, that turned into the 4S² + 1.
00:44:40.800 --> 00:44:49.300
I also had to calculate my DS, that is me calculating the DS in terms of U.
00:44:49.300 --> 00:45:03.000
All of that part became the DS, that part became the 4S² + 1 and that part right there converted into S.
00:45:03.000 --> 00:45:06.800
That is how I got this integral E ⁻S DS.
00:45:06.800 --> 00:45:09.700
And then, I also had to convert my limit.
00:45:09.700 --> 00:45:16.900
I converted U = 1 and infinity into S = 0 to infinity.
00:45:16.900 --> 00:45:19.600
That sets up an integration by parts problem.
00:45:19.600 --> 00:45:26.200
Since, I'm too lazy to do the full integration by parts formula, I used tabular integration right here,
00:45:26.200 --> 00:45:30.700
in order to work out the integral of 4S² + 1 × E ⁺S.
00:45:30.700 --> 00:45:33.600
The derivatives on the left, integrals on the right.
00:45:33.600 --> 00:45:40.800
I get this large expression, it is not that bad though because when you plug in infinity for S,
00:45:40.800 --> 00:45:49.100
all of these terms disappear because E ⁻S goes to 0 faster than any polynomial can go.
00:45:49.100 --> 00:45:53.400
That is why we get 0 for all the infinity terms.
00:45:53.400 --> 00:46:06.200
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.
00:46:06.200 --> 00:46:13.500
It simplified down to 9, that represents the expected magnitude of the next earthquake in California.
00:46:13.500 --> 00:46:19.800
I can also check this using the properties of the exponential distribution.
00:46:19.800 --> 00:46:25.800
What I know is that U was defined to be Y² + 1, there was my definition of U.
00:46:25.800 --> 00:46:32.600
Since, it is expected value it is just the expected value of Y² + 1, that is linearity of expectation.
00:46:32.600 --> 00:46:39.100
The expected value of Y², I can get this using the original formula for variance,
00:46:39.100 --> 00:46:45.600
that we learned long ago in a lecture from way back at the top of the list.
00:46:45.600 --> 00:46:51.500
The formula for variance was E of Y² – E (Y)².
00:46:51.500 --> 00:46:58.500
I can solve that for E of Y² to be σ² + E of (Y)².
00:46:58.500 --> 00:47:02.300
I know what σ² is, for the exponential distribution.
00:47:02.300 --> 00:47:09.700
These came from properties of the exponential distribution which is something we learned about,
00:47:09.700 --> 00:47:12.900
in the lecture on the γ distribution.
00:47:12.900 --> 00:47:17.800
Scroll way back and you will see these properties for the exponential distribution.
00:47:17.800 --> 00:47:26.600
I plugged in σ² is β², E of Y is β, and I know the β is 2, that something I got from example 4,
00:47:26.600 --> 00:47:32.000
because we said that the major earthquakes occur every 2 years on average.
00:47:32.000 --> 00:47:36.900
I plug that in, do a little arithmetic, and I come up with 9.
00:47:36.900 --> 00:47:44.100
Since those two answers agree with each other, I'm pretty confident that I did everything right there.
00:47:44.100 --> 00:47:49.600
In example 6, Y has a β distribution with α and β equal to 2.
00:47:49.600 --> 00:47:53.200
U is Y² + 2Y + 1.
00:47:53.200 --> 00:47:57.700
We want to find the density function for U.
00:47:57.700 --> 00:48:01.700
The first thing here is to recognize what is a β distribution.
00:48:01.700 --> 00:48:06.600
We had a lecture on β distributions, it is part of the series on continuous distributions.
00:48:06.600 --> 00:48:11.100
If you scroll up, you will see a lecture on β distributions.
00:48:11.100 --> 00:48:18.100
Let me remind you of the generic formula for density function for β distribution.
00:48:18.100 --> 00:48:28.900
F of Y is equal to Y ^α -1, 1 – Y ^β – 1.
00:48:28.900 --> 00:48:36.800
And then, we divide that by B of α β.
00:48:36.800 --> 00:48:51.800
B of α β, in turn is Γ of α, Γ of β/Γ of α + β.
00:48:51.800 --> 00:48:57.700
What we have to do is interpret this with α and β equal to 2.
00:48:57.700 --> 00:49:14.500
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.
00:49:14.500 --> 00:49:27.100
Y ^α – 1 is Y¹ and 1- Y ^β – 1 is, β is 2, β -1 is 1.
00:49:27.100 --> 00:49:37.500
What is γ of 4, remember there is this relationship between the γ function and factorials, at least for whole numbers.
00:49:37.500 --> 00:49:40.600
Γ of N is equal to N -1!.
00:49:40.600 --> 00:49:53.500
Γ of 4 is 3! which is 6, γ of 2 is 1! which is just 1.
00:49:53.500 --> 00:49:59.300
The denominators cancel, we get 6 × Y × 1 – Y.
00:49:59.300 --> 00:50:09.500
6 × Y - Y², that is my F sub Y of Y.
00:50:09.500 --> 00:50:18.700
It actually let me now solve for, U is a function of Y.
00:50:18.700 --> 00:50:23.000
I think I need to solve for my inverse function there.
00:50:23.000 --> 00:50:30.200
U is H of Y which is Y² + 2Y + 1.
00:50:30.200 --> 00:50:34.200
An easy way to think about that would be as Y + 1².
00:50:34.200 --> 00:50:36.700
I think that is going to make it easier to deal with.
00:50:36.700 --> 00:50:44.400
I want to solve for Y, in terms of U, that is how I get the inverse function.
00:50:44.400 --> 00:50:57.600
I’m going to solve for Y, √U is equal to Y + 1.
00:50:57.600 --> 00:51:10.900
Y is equal to √U -1, that right there is my H inverse of U.
00:51:10.900 --> 00:51:17.900
Let me remind you of the generic formula for the density function, when you use the method of transformations.
00:51:17.900 --> 00:51:27.600
It says that F sub U of variable U is equal to, we started with a density function for Y F sub Y.
00:51:27.600 --> 00:51:38.100
Then, you plug in H inverse of U and then multiply on the derivative D by DU of H inverse of U.
00:51:38.100 --> 00:51:41.500
In case that is negative, you want to take its absolute value.
00:51:41.500 --> 00:51:44.200
We are going to need to know H inverse of U.
00:51:44.200 --> 00:51:48.500
I already found it, √U -1.
00:51:48.500 --> 00:51:54.800
We are also going to need to know H inverse of U, its derivative.
00:51:54.800 --> 00:51:58.400
The derivative there, let us see.
00:51:58.400 --> 00:52:00.900
I will go ahead and plug everything in here.
00:52:00.900 --> 00:52:03.300
F sub Y, there is my F sub Y there.
00:52:03.300 --> 00:52:12.300
This is 6 ×, it says Y but I have to convert that into U, convert that into H inverse of U.
00:52:12.300 --> 00:52:24.200
√U -1, I'm looking at this Y - Y² but I'm plug in √U-1 for Y.
00:52:24.200 --> 00:52:30.800
-√U – 1², it is going to get a little messy, is not it.
00:52:30.800 --> 00:52:37.500
The derivative of H inverse of U is the derivative of √U-1.
00:52:37.500 --> 00:52:44.700
That is 1/2 √U, that is because you can think of that as U¹/2.
00:52:44.700 --> 00:52:51.000
The derivative is ½ U ^½, that -1 there that just goes away when we take the derivative.
00:52:51.000 --> 00:52:57.100
We are supposed to take the absolute value of that, but that is already positive, 1/2 √U.
00:52:57.100 --> 00:53:00.300
I'm just going to do some algebra to work this out.
00:53:00.300 --> 00:53:02.900
Hopefully, I will simplify a bit, I do not think it is going to get great.
00:53:02.900 --> 00:53:05.200
But, let us go ahead and see what we can do with this.
00:53:05.200 --> 00:53:08.800
The 6/2 simplifies a little bit, right away.
00:53:08.800 --> 00:53:19.300
We get 3/√U, inside the parenthesis I have √U -1.
00:53:19.300 --> 00:53:33.000
If I square out √U - 1², I will get U -2 √U + 1 there.
00:53:33.000 --> 00:53:51.300
Maybe, I can simplify that a little bit more, 3 √U -1- U + 2 √U – 1 there.
00:53:51.300 --> 00:54:10.400
I guess this will simplify a bit, = 3/√U, √U + 2 √U is 3 √U -1- 1 – 2 – √U.
00:54:10.400 --> 00:54:24.100
I can distribute that √U from the outside into the inside, 3 × 3 – 2/√U.
00:54:24.100 --> 00:54:30.000
√U divided by √U is √U.
00:54:30.000 --> 00:54:35.800
That is what I get, I do not think it is going to get any simpler than that.
00:54:35.800 --> 00:54:41.900
I think we found the density function, that is F sub U/U.
00:54:41.900 --> 00:54:46.900
The problem reminds us that we should also find the range of possible values for U.
00:54:46.900 --> 00:55:03.000
If Y, for β distribution function, Y will go from 0 to 1, that is always the range for β distribution function,
00:55:03.000 --> 00:55:11.100
whereas U in terms of Y, Y is √U -1.
00:55:11.100 --> 00:55:21.500
U is Y + 1², U if it is Y + 1², 0 + 1² is 1.
00:55:21.500 --> 00:55:30.000
1 + 1² is 4, my range of values for U is from 1 to 4.
00:55:30.000 --> 00:55:37.700
That is my density function for U, kind of ugly there but I did not see any way in making it any nicer.
00:55:37.700 --> 00:55:40.200
I think we are stuck with that.
00:55:40.200 --> 00:55:42.200
In the end, it did simplify a little bit.
00:55:42.200 --> 00:55:44.900
I guess we have to be happy with that.
00:55:44.900 --> 00:55:46.200
Let me recap the steps there.
00:55:46.200 --> 00:55:49.200
First of all, I saw that we had a β distribution.
00:55:49.200 --> 00:55:55.500
I went back and looked at my formula for β distribution which we learned in a lecture on β distributions.
00:55:55.500 --> 00:55:59.300
It is quite a long time ago in the chapter on continuous distributions.
00:55:59.300 --> 00:56:10.100
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.
00:56:10.100 --> 00:56:20.200
You will also see an expansion for B of α β, I said B of AB, I mean B of α β, in terms of γ functions.
00:56:20.200 --> 00:56:30.700
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.
00:56:30.700 --> 00:56:34.600
Here, my α and β were 2, I was given that in the problem.
00:56:34.600 --> 00:56:38.800
I plug those in, I got exponents 1 on both of those.
00:56:38.800 --> 00:56:49.000
To find those values of Γ, I just remembered that γ of a whole number N is equal to N -1!.
00:56:49.000 --> 00:56:53.200
Γ of 4 is 3!, that is where that 6 came from.
00:56:53.200 --> 00:56:58.200
Γ of 2 is just 1!, both of those dropped out.
00:56:58.200 --> 00:57:06.300
If I multiply the Y through, get 1 - Y².
00:57:06.300 --> 00:57:10.800
Now, I try to solve U = H of Y to find the inverse function.
00:57:10.800 --> 00:57:13.700
The convenient way to write that was Y + 1².
00:57:13.700 --> 00:57:18.200
And then, I want to solve it for Y, I took the square root of both sides.
00:57:18.200 --> 00:57:23.000
√U = Y + 1, Y = √U -1.
00:57:23.000 --> 00:57:30.400
I solved for Y in terms of U, that right there, let me see if I can write down a little more cleanly,
00:57:30.400 --> 00:57:38.300
Is H inverse of U, and that is kind of the key ingredient to our transformation formula.
00:57:38.300 --> 00:57:45.000
This is the generic transformation formula that I gave you on the introductory slides to this lecture.
00:57:45.000 --> 00:57:47.500
That is the generic transformation formula.
00:57:47.500 --> 00:57:52.500
I dropped the H inverse of U in here but that was in F of Y.
00:57:52.500 --> 00:57:57.200
I plugged it in here, that is why I got my 6.
00:57:57.200 --> 00:58:01.900
This right here is Y, that is coming from that Y.
00:58:01.900 --> 00:58:10.900
This right here is Y² but I’m plugging in Y = H inverse of U to both of those.
00:58:10.900 --> 00:58:17.900
And then, my derive of H inverse of U is how I got the 1/2 √U.
00:58:17.900 --> 00:58:22.900
I got that by taking the derivative of this right here.
00:58:22.900 --> 00:58:29.400
Remember, we take the derivative, the 1 drops out, we just get 1/2 √U.
00:58:29.400 --> 00:58:32.800
This got a little messy but it was just algebra from here.
00:58:32.800 --> 00:58:38.200
I expanded out my perfect square, A² + 2 AB + B².
00:58:38.200 --> 00:58:44.000
I combine terms as best I could, I distributed the 3/√U.
00:58:44.000 --> 00:58:50.100
I did distribute the 3, but I distributed the √U into the parentheses.
00:58:50.100 --> 00:58:53.700
I got something a little bit nicer but still not that nice.
00:58:53.700 --> 00:59:05.600
The way I got the range for U was, I remembered that the range for β distribution is always Y goes from 0 to 1.
00:59:05.600 --> 00:59:12.800
I took those values of Y and I plugged those into my function for U.
00:59:12.800 --> 00:59:20.300
U is Y + 1², that is how I got U goes from 1 to 4, when Y goes from 0 to 1.
00:59:20.300 --> 00:59:25.200
That is where my range of values for U comes from.
00:59:25.200 --> 00:59:31.300
That wraps up example 6, and that is the last example for this lecture on the method of transformations.
00:59:31.300 --> 00:59:37.100
Remember, this is part of the three lectures series, these are all different methods
00:59:37.100 --> 00:59:45.900
for how to find the density and distribution functions for a function of random variables.
00:59:45.900 --> 00:59:48.600
This was the middle one, this is a method of transformations.
00:59:48.600 --> 00:59:52.400
In the previous lecture, we covered the method of distribution functions.
00:59:52.400 --> 00:59:58.100
I hope you will stick around for the next lecture which is the method of moment generating functions.
00:59:58.100 --> 01:00:04.100
It might be worthwhile to review moment generating functions, before you jump in to the next lecture.
01:00:04.100 --> 01:00:08.400
This is all part of a larger chapter on functions of random variables.
01:00:08.400 --> 01:00:15.200
In turn, that is part of the probability lectures here on www.educator.com, with your host Will Murray.
01:00:15.200 --> 01:00:16.000
Thank you very much for joining me today, bye.