WEBVTT mathematics/probability/murray
00:00:00.000 --> 00:00:06.000
Hello, welcome back to the probability lectures here on www.educator.com, my name is Will Murray.
00:00:06.000 --> 00:00:10.100
Today, we are wrapping up a three lecture series on how to find
00:00:10.100 --> 00:00:15.900
the density and distribution functions for functions of random variables.
00:00:15.900 --> 00:00:23.400
We had one lecture on the method of distribution functions, and then the last lecture cover the method of transformations.
00:00:23.400 --> 00:00:29.000
Today, we are going to talk about moment generating functions which is the last of our three methods.
00:00:29.000 --> 00:00:31.700
Let me jump in and tell you the setting here.
00:00:31.700 --> 00:00:34.800
This is going to start out the same as the last two lectures.
00:00:34.800 --> 00:00:38.400
The first few slides are exactly the same as the last two lectures.
00:00:38.400 --> 00:00:42.300
If you have been following along diligently and you watch the last two lectures,
00:00:42.300 --> 00:00:44.800
you do not need to watch these first few slides again.
00:00:44.800 --> 00:00:48.600
It is just going to be a review of the exact same stuff.
00:00:48.600 --> 00:00:54.900
Just setting up the same premise and then we will get into actual moment generating functions, a few slides in.
00:00:54.900 --> 00:01:01.900
The premise here is that we have several random variables Y1, Y2, etc. And then, we have some function of them
00:01:01.900 --> 00:01:05.400
This U is some function of Y1 through YN.
00:01:05.400 --> 00:01:14.900
We might have something like U is Y1² + Y2², something like that.
00:01:14.900 --> 00:01:20.300
We will have some function of these random variables.
00:01:20.300 --> 00:01:25.200
What I said before, I taught you how to calculate the mean and the variance of U,
00:01:25.200 --> 00:01:27.500
that was in the previous series of lectures.
00:01:27.500 --> 00:01:32.700
What I did not teach you before was how to calculate the whole distribution of U.
00:01:32.700 --> 00:01:41.700
The purpose of this lecture and the previous two videos is to teach you how to find the entire distribution function of U.
00:01:41.700 --> 00:01:51.400
Our goal is to find this distribution function F of U is the probability that U is less than some cutoff value u.
00:01:51.400 --> 00:01:57.900
And then, if we can find that F, then we can find the density function just by taking the derivative.
00:01:57.900 --> 00:02:02.400
F of U is just the derivative of F of U.
00:02:02.400 --> 00:02:07.600
Assuming that we know f and F, it is very easy to calculate probabilities.
00:02:07.600 --> 00:02:13.400
If we want to find the probability that U is in a particular range between A and B, what we will do is,
00:02:13.400 --> 00:02:17.700
if we just know the density function, we could integrate the density function from A to B.
00:02:17.700 --> 00:02:25.100
Or if we know the distribution function, it is even better because we can just do F of B - F of A.
00:02:25.100 --> 00:02:30.500
That is why we want to find these functions, this F and f.
00:02:30.500 --> 00:02:41.100
The point of this lecture and the previous two lectures is to give you various methods for finding this F and this f.
00:02:41.100 --> 00:02:45.400
These three methods that we have been discussing, the first one was distribution functions.
00:02:45.400 --> 00:02:50.100
You will see that, if you scroll back up two lectures, you will see the method of distribution functions.
00:02:50.100 --> 00:02:53.500
Transformation function is what we covered in the previous lecture.
00:02:53.500 --> 00:02:56.000
You should be all set to go with that.
00:02:56.000 --> 00:03:00.700
In this lecture, what we are talking about today is the method of moment generating functions.
00:03:00.700 --> 00:03:05.600
That is what I'm about to jump into is the method of moment generating functions.
00:03:05.600 --> 00:03:10.100
First, I have to review for you what a moment generating function is.
00:03:10.100 --> 00:03:15.300
There was a whole lecture on moment generating functions, earlier on in the lesson.
00:03:15.300 --> 00:03:20.300
If you scroll back up, you will see that we have a whole lecture here on moment generating function.
00:03:20.300 --> 00:03:25.200
If you do not know what they are at all, if you did not go through that lecture before,
00:03:25.200 --> 00:03:30.200
you probably want to watch that lecture before you watch this one, because it would not make much sense.
00:03:30.200 --> 00:03:33.800
This is the quick and dirty and review of moment generating functions.
00:03:33.800 --> 00:03:38.500
Let me just show you just quickly, remind you of what they are all about.
00:03:38.500 --> 00:03:47.300
By definition, the moment generating function for random variable is the expected value of E ⁺TY.
00:03:47.300 --> 00:03:52.500
If you work that out, you always end up with a function of T, it is not a function of Y.
00:03:52.500 --> 00:04:02.100
Moment generating function will always be something like 1 -2T⁻³, something like that where it is a function of T.
00:04:02.100 --> 00:04:07.600
You should not see any Y, in the moment generating function.
00:04:07.600 --> 00:04:13.000
We practice calculating some moment generating functions in that earlier lecture,
00:04:13.000 --> 00:04:17.000
that was just specifically dedicated to moment generating functions.
00:04:17.000 --> 00:04:22.600
Let me show you in particular, the moment generating functions for key distributions.
00:04:22.600 --> 00:04:27.100
Because, you really need to remember them or have them somewhere very close by as a reference,
00:04:27.100 --> 00:04:30.700
in order to make all the examples in this lecture work.
00:04:30.700 --> 00:04:37.000
Here, the key moment generating functions, we have discreet distributions, we have continuous distributions.
00:04:37.000 --> 00:04:41.100
In this side, I’m going to do the discrete one and in the next slide, we will continuous ones.
00:04:41.100 --> 00:04:49.400
Our distributions are binomial, geometric, negative binomial, hypergeometric, and the Poisson distribution.
00:04:49.400 --> 00:04:52.600
Each one has its own moment generating function.
00:04:52.600 --> 00:05:02.000
The binomial is PE ⁺T + 1- P ⁺N, where P is the probability associated with the binomial distribution, N is the number of trials.
00:05:02.000 --> 00:05:08.600
By the way, this 1- P is often called Q.
00:05:08.600 --> 00:05:12.400
You might see this called PE ⁺T + Q ⁺N.
00:05:12.400 --> 00:05:19.100
Geometric looks similar, PE ⁺T + 1-, again, this P could be written as Q.
00:05:19.100 --> 00:05:23.800
If you look at this in some sources and some textbooks, they will just this call 1- P = Q.
00:05:23.800 --> 00:05:25.600
It just means the same thing.
00:05:25.600 --> 00:05:31.300
Negative binomial is the same as the geometric distribution except that it is raised to the R power.
00:05:31.300 --> 00:05:33.700
Again, this 1- P could be a Q.
00:05:33.700 --> 00:05:39.600
Hypergeometric distribution has no closed form, no simple moment generating functions.
00:05:39.600 --> 00:05:43.600
I cannot write down anything for the hypergeometric distribution.
00:05:43.600 --> 00:05:49.500
The Poisson distribution is E ^λ × the (E ⁺T-1).
00:05:49.500 --> 00:06:01.200
Notice that all of these, there no Y anywhere in here, all are functions of the variable T.
00:06:01.200 --> 00:06:05.200
You want to be seeing a T, when you are looking at a moment generating function.
00:06:05.200 --> 00:06:07.300
You are not going to see any Y in there.
00:06:07.300 --> 00:06:10.900
We also have moment generating functions for the continuous distributions.
00:06:10.900 --> 00:06:17.600
Our favorites ones are uniform, here is the moment generating function for the uniform distribution.
00:06:17.600 --> 00:06:22.800
Normal is E ^ν T + T² σ²/2.
00:06:22.800 --> 00:06:25.100
All of that is in the exponent, by the way.
00:06:25.100 --> 00:06:30.000
That is all in the exponent of the E, it is quite complicated moment generating function there.
00:06:30.000 --> 00:06:35.200
The gamma distribution that is a whole family, 1- β T ^-α.
00:06:35.200 --> 00:06:39.200
Remember that the exponential and the chi square distributions,
00:06:39.200 --> 00:06:44.400
those should both be considered children of the gamma distribution.
00:06:44.400 --> 00:06:52.100
The exponential distribution is just γ with α equal to 1.
00:06:52.100 --> 00:06:56.100
If you remember the moment generating function for the gamma distribution,
00:06:56.100 --> 00:07:01.100
then you can remember the exponential distribution, its moment generating function
00:07:01.100 --> 00:07:06.500
just by taking the α equal to 1 in the gamma distribution.
00:07:06.500 --> 00:07:16.400
Chi square is also a gamma distribution, it is where you take α is equal to ν/2 and β is equal to 2.
00:07:16.400 --> 00:07:24.700
Ν is the number of degrees of freedom in the Chi square distribution.
00:07:24.700 --> 00:07:29.700
Again, you can see how, if you start with a function for the gamma distribution,
00:07:29.700 --> 00:07:33.300
you plug in β is equal to 2, there is right there.
00:07:33.300 --> 00:07:40.000
And if you plug in α is equal to ν/2, ν by the way is the Greek letter that looks like a v.
00:07:40.000 --> 00:07:45.700
If you plug in α is ν/2, that is what you get.
00:07:45.700 --> 00:07:49.700
You recognize the moment generating function for the Chi square distribution.
00:07:49.700 --> 00:07:53.800
A β distribution has no closed form of moment generating function.
00:07:53.800 --> 00:08:01.400
It does not lend itself very easily to the problems that have to do with moment generating functions.
00:08:01.400 --> 00:08:08.400
The point of using moment generating functions to solve problems is that you got to be able
00:08:08.400 --> 00:08:14.900
to recognize these moment generating functions, when you see them in a dark alley or see them out on safari.
00:08:14.900 --> 00:08:18.500
You see a moment generating function, and then you have to say that
00:08:18.500 --> 00:08:25.400
it is the moment generating function for the gamma distribution, or that is the moment generating function for the normal distribution.
00:08:25.400 --> 00:08:30.900
You really want a kind of stare at this chart on the slide and also the one on the previous side,
00:08:30.900 --> 00:08:33.800
and get these functions into your head.
00:08:33.800 --> 00:08:40.300
Or else, maybe have one of these charts as an easy reference, when you are solving these problems.
00:08:40.300 --> 00:08:45.900
Because, the whole point of this is you got to be able to recognize these, when you see them in the wild to speak.
00:08:45.900 --> 00:08:51.800
Let me show you how that works out, I had not really told you how to solve any problems yet.
00:08:51.800 --> 00:08:54.500
I want to show you how it works.
00:08:54.500 --> 00:08:57.200
You are going to be calculating moment generating functions.
00:08:57.200 --> 00:09:00.800
There is a couple useful formulas that you are going to need to now.
00:09:00.800 --> 00:09:06.900
One is that if you take a linear function of our random variable, AY + B.
00:09:06.900 --> 00:09:13.600
And then, you build a new variable called Z, that is AY + B.
00:09:13.600 --> 00:09:20.200
The moment generating function for Z is, you take the moment generating function for Y and
00:09:20.200 --> 00:09:26.700
just wherever you see a T, you change it to AT.
00:09:26.700 --> 00:09:31.200
And then, you multiply on this factor E ⁺BT on the outside.
00:09:31.200 --> 00:09:41.700
The time when this is most useful is when Y is a normal variable, and you are converting to make Z a standard normal variables.
00:09:41.700 --> 00:09:51.600
That is when you use this formula most often, is when you are converting from a normal variable to a standard normal.
00:09:51.600 --> 00:09:58.400
Here is another very useful formula that we are going to be using in almost every exercise today.
00:09:58.400 --> 00:10:04.000
It is that, if you have two independent variables and it is important that they be independent,
00:10:04.000 --> 00:10:11.200
and you add them together then the moment generating function for the sum is equal to
00:10:11.200 --> 00:10:17.900
the product of the moment generating function of the individual variables.
00:10:17.900 --> 00:10:24.900
That is very convenient because if you want to add two variables, you just multiply their moment generating functions.
00:10:24.900 --> 00:10:28.500
That is very useful, we are going to use that over and over again.
00:10:28.500 --> 00:10:32.800
Moment generating functions converts addition into multiplication.
00:10:32.800 --> 00:10:38.900
It behaves very nicely, as long as your variables are independent.
00:10:38.900 --> 00:10:44.300
Let me show you now, how we are going to use moment generating functions.
00:10:44.300 --> 00:10:54.900
We will be given a collection of random variables and we want to find the moment generating function of U, M sub U of T.
00:10:54.900 --> 00:11:00.000
That can be kind of tricky and we are going to use several different tricks to do that.
00:11:00.000 --> 00:11:03.000
We might use the definition of moment generating function.
00:11:03.000 --> 00:11:12.000
We will often use these formulas on the previous slide, especially the one where it converts addition into multiplication.
00:11:12.000 --> 00:11:21.900
M sub Y1 + Y2 of T will be equal to M sub Y1 of T × M sub Y2 of T.
00:11:21.900 --> 00:11:27.700
That is going to be extremely useful to calculate the new moment generating function.
00:11:27.700 --> 00:11:30.900
What we will do is we will calculate that new moment generating function,
00:11:30.900 --> 00:11:37.400
and then kind of compare it against all the charts that we have of all of our moment generating functions.
00:11:37.400 --> 00:11:41.900
We will make sure that we recognize it as a known distribution.
00:11:41.900 --> 00:11:47.300
If we can, then we will say that is the Poisson distribution with a certain value of λ.
00:11:47.300 --> 00:11:51.800
Or, that is the exponential distribution with a certain value of β.
00:11:51.800 --> 00:11:56.300
And then, we will know what our distribution is.
00:11:56.300 --> 00:12:03.500
There is a lot of pattern recognition involved in using moment generating functions to identify distributions.
00:12:03.500 --> 00:12:07.300
But, we will do some examples and you will see how it works out.
00:12:07.300 --> 00:12:13.400
The first example is actually the trickiest, if you have trouble, if you get bugged down in the first example,
00:12:13.400 --> 00:12:16.800
it is okay if you want to skip to a couple of the later ones.
00:12:16.800 --> 00:12:26.200
And then, maybe come back and analyze the first one because it is the most challenging to understand.
00:12:26.200 --> 00:12:31.600
With example 1, we have a standard normal variable, Y is the standard normal variable.
00:12:31.600 --> 00:12:38.800
We want to find the density function of U which is defined to be Y².
00:12:38.800 --> 00:12:42.200
We want to use moment generating functions for this.
00:12:42.200 --> 00:12:50.500
We want to calculate the moment generating function of U M sub Y of T.
00:12:50.500 --> 00:12:57.700
Remember, our U, by definition is Y² of T.
00:12:57.700 --> 00:13:01.300
We are going to use the definition of the moment generating function here.
00:13:01.300 --> 00:13:11.400
Remember, our definition of moment generating function M sub Y of T is just the expected value of E ⁺TY.
00:13:11.400 --> 00:13:14.200
In this case, we do not have Y, we have Y².
00:13:14.200 --> 00:13:26.000
This is the expected value of E ⁺TY², the expected value of E ⁺TY².
00:13:26.000 --> 00:13:35.700
To calculate the expected value of the function of a random variable, what you do is you take that function E ⁺TY².
00:13:35.700 --> 00:13:42.600
And then, you multiply it by the density function of that random variable.
00:13:42.600 --> 00:13:46.500
You integrate that over all possible values for Y.
00:13:46.500 --> 00:13:51.200
This integral is going to get a little complicated because if you remember,
00:13:51.200 --> 00:13:58.600
the density function for the normal variable is no joke, it is rather complicated.
00:13:58.600 --> 00:14:03.100
One thing we are given here is that Y is a standard normal variable.
00:14:03.100 --> 00:14:07.900
Standard is sort of a loaded term, when you are studying probability and statistics.
00:14:07.900 --> 00:14:19.300
Standard normal variable means that its mean is 0 and its variance is 1.
00:14:19.300 --> 00:14:26.300
That kind of simplifies some of the equations that we have to deal with, when we are looking at its density function.
00:14:26.300 --> 00:14:35.500
The density function for a standard normal variables, I’m plugging in ν = 0 and σ² = 1, is 1/√2 π.
00:14:35.500 --> 00:14:49.700
There is actually a σ in there, but I'm taking advantage of the fact that it is σ = 1 × E ^- Y²/2.
00:14:49.700 --> 00:14:53.300
Again, I’m simplifying that as I go along.
00:14:53.300 --> 00:15:01.400
The full normal variable density function would be E ⁻Y - μ²/2 σ².
00:15:01.400 --> 00:15:05.900
I have simplified that, taking advantage of the fact that we have a standard normal variable.
00:15:05.900 --> 00:15:12.900
We solved E ⁺TY² here and we still have to integrate this thing over all possible values of Y.
00:15:12.900 --> 00:15:20.100
By the way, in this case, the possible values are -infinity to infinity because that is my range for a normal variable.
00:15:20.100 --> 00:15:24.100
This looks like λ, it is tricky to solve.
00:15:24.100 --> 00:15:29.500
Let me pull out the 1/√2 π because that is just a constant.
00:15:29.500 --> 00:15:37.400
I see that I have two functions that both look like E ⁺Y².
00:15:37.400 --> 00:15:41.500
I got E ⁺TY² and E ⁻Y²/2.
00:15:41.500 --> 00:15:53.900
What I'm going to try to do is write this as E ^-, I’m going to try to factor out Y²/2.
00:15:53.900 --> 00:16:01.100
E ⁺Y²/2 + TY², that is what I have here.
00:16:01.100 --> 00:16:06.900
I forgot my DY there, there is DY.
00:16:06.900 --> 00:16:10.100
Let me just work inside the integral for the next couple of steps.
00:16:10.100 --> 00:16:16.200
This is E ⁻Y²/2, I’m going to factor that out.
00:16:16.200 --> 00:16:22.200
I have a 1, this T, since I’m factoring out the negative sign becomes –T.
00:16:22.200 --> 00:16:26.100
Since, I factored out ½, it becomes a 2T.
00:16:26.100 --> 00:16:33.000
E ⁻Y²/2 × 1 -2T, and I have a reason for doing this, but it is not obvious right now.
00:16:33.000 --> 00:16:38.200
Let me show you where I'm headed with this, I do not want to solve this integral.
00:16:38.200 --> 00:16:41.800
In fact, I know that I cannot solve this integral by any direct means.
00:16:41.800 --> 00:16:52.200
What I'm going to try to do, is to try to compare this integral to the density function that I recognized
00:16:52.200 --> 00:16:56.900
which would be a density function for different normal variable.
00:16:56.900 --> 00:16:58.700
Let me show you what I mean by that.
00:16:58.700 --> 00:17:12.400
The density function for a nonstandard normal variable would be 1/σ √2 π.
00:17:12.400 --> 00:17:20.500
I do not think I need a μ, but E ⁺Y²/2 σ².
00:17:20.500 --> 00:17:36.100
That is the density for a nonstandard normal variable.
00:17:36.100 --> 00:17:43.500
It is not the same variable the we start out with.
00:17:43.500 --> 00:17:48.200
Because it is a density function, I know what it is integral is.
00:17:48.200 --> 00:17:56.800
If I integrate that from - infinity to infinity, the integral of any density function must be 1.
00:17:56.800 --> 00:18:06.200
If I had an integral in that form, then I would know that its integral would be 1.
00:18:06.200 --> 00:18:11.200
What I have here is something that is sort of generically similar to that.
00:18:11.200 --> 00:18:19.300
If I try to arrange my variables carefully, I can make this integral equal to 1 in that form.
00:18:19.300 --> 00:18:23.600
What I'm going to do is, I'm going to figure out what my value should be.
00:18:23.600 --> 00:18:34.100
I want -Y²/2 × 1 -2T to be equal to -Y²/2 σ².
00:18:34.100 --> 00:18:43.800
I see that the -Y²/2 is going to cancel, that 1 -2T is equal to 1/σ².
00:18:43.800 --> 00:18:54.100
If I flip both sides, I get σ² is 1 -2T and my σ would be 1 -2T.
00:18:54.100 --> 00:19:06.800
Σ² is 1/1 -2T and σ is 1 -2T⁻¹/2.
00:19:06.800 --> 00:19:12.800
That is the σ that we would be talking about, if we want to make this integral that I have here
00:19:12.800 --> 00:19:18.900
match the density function for nonstandard normal variable.
00:19:18.900 --> 00:19:24.300
Let me arrange, see if I can arrange things to make it work.
00:19:24.300 --> 00:19:40.500
I got 1/√ 2 π and then I got the integral of E ^-, if I arrange this to be Y²/2 σ² DY,
00:19:40.500 --> 00:19:43.900
that was by choosing my σ up above here.
00:19:43.900 --> 00:19:45.600
I will choose my σ to make that work.
00:19:45.600 --> 00:19:48.600
Now, I want to make this match this integral over here.
00:19:48.600 --> 00:19:54.200
It does not quite match it as it is because it is missing that 1 σ in the denominator.
00:19:54.200 --> 00:20:02.800
I'm going to fudge that σ in there, and in order to balance that, I will have to put a σ on the outside here.
00:20:02.800 --> 00:20:05.700
Let me remember that there is a σ on the outside.
00:20:05.700 --> 00:20:12.000
The whole point is that, this is now the density function for a nonstandard variable.
00:20:12.000 --> 00:20:18.800
But I know that this density function, the integral of any density function is equal to 1.
00:20:18.800 --> 00:20:22.100
I got to multiply that one by the σ as well.
00:20:22.100 --> 00:20:31.100
Σ × all that is equal to σ × 1.
00:20:31.100 --> 00:20:39.900
What I have got there is that, this whole thing is equal to σ.
00:20:39.900 --> 00:20:48.200
Σ, remember was 1 -2T⁻¹/2.
00:20:48.200 --> 00:20:55.200
What have I done here, I have just calculated the moment generating function for this variable μ.
00:20:55.200 --> 00:21:02.900
I found out that the moment generating function is 1 -2T⁻¹/2.
00:21:02.900 --> 00:21:04.200
What am I supposed to do with that?
00:21:04.200 --> 00:21:12.000
What I do is I go back and I looked at my charts of common moment generating functions.
00:21:12.000 --> 00:21:17.400
And, I see if I will recognize this moment generating function somewhere on the chart.
00:21:17.400 --> 00:21:19.700
Low and behold, I do.
00:21:19.700 --> 00:21:34.800
Let me remind you on the chart, the moment generating function for Chi square distribution is 1 -2T ^-ν/2.
00:21:34.800 --> 00:21:43.300
What I have here is exactly a Chi square distribution with ν = 1.
00:21:43.300 --> 00:22:10.500
That is worth writing down, ν has a Chi square distribution with ν = 1 degrees of freedom.
00:22:10.500 --> 00:22:25.600
From that, I can figure out the density function of U because I remember that Chi square is the gamma distribution.
00:22:25.600 --> 00:22:35.700
It is just a special case of the gamma distribution with α is ν/2 and β is 2.
00:22:35.700 --> 00:22:40.400
I can look up the density function for the gamma distribution.
00:22:40.400 --> 00:22:42.900
Let me remind you what it was.
00:22:42.900 --> 00:22:48.300
The gamma distribution, the density function for the gamma distribution,
00:22:48.300 --> 00:23:09.500
I will write it in terms of U is U ^α -1 × E ⁻U/β divided by β ^α × γ of α.
00:23:09.500 --> 00:23:17.400
If I plug in all my values here, I'm going to plug in U ^α-1.
00:23:17.400 --> 00:23:21.000
Α is ν/2 and ν is 1.
00:23:21.000 --> 00:23:31.500
This is U ^½ -1, U⁻¹ E ⁻U/β is 2 U/2.
00:23:31.500 --> 00:23:48.400
Β ^α is 2 ^½ and γ of α, γ of ½.
00:23:48.400 --> 00:23:53.400
There is one thing I need to remember which is γ of ½.
00:23:53.400 --> 00:24:02.200
That is kind of something that you either need to remember or look up, because it is quite a lot of work to derive from scratch.
00:24:02.200 --> 00:24:10.900
Γ of ½, it turns out that it is √π , it is a kind of a surprising number there.
00:24:10.900 --> 00:24:16.400
That is not something you can easily figure out from the factorial property of the gamma distribution,
00:24:16.400 --> 00:24:18.600
because ½ is not a whole number.
00:24:18.600 --> 00:24:23.100
It is easy to figure out γ for whole numbers, γ of ½.
00:24:23.100 --> 00:24:32.800
It is quite difficult the first time you work it out, from then on it is probably worth remembering that γ of ½ is √π.
00:24:32.800 --> 00:24:43.800
What I have here is, U⁻¹/2 E ⁻U/2.
00:24:43.800 --> 00:24:52.800
And then, in the denominator I got 2¹/2 and that is √2 and √π.
00:24:52.800 --> 00:24:59.800
I’m just going to combine those together, I think, and give myself √2 π.
00:24:59.800 --> 00:25:05.200
The range on the Chi square distribution, it is the same as the range on the gamma distribution.
00:25:05.200 --> 00:25:12.200
It is all U greater than 0 and less then infinity.
00:25:12.200 --> 00:25:24.300
Another way to think about that is to say that, since U is Y² and since Y goes from - infinity to infinity,
00:25:24.300 --> 00:25:26.800
Y² will go from 0 to infinity.
00:25:26.800 --> 00:25:29.700
That is my density function for U.
00:25:29.700 --> 00:25:33.800
A lot of work to find that one, that is probably the hardest one we are going to do though.
00:25:33.800 --> 00:25:41.400
The rest build on this one and we have done the hardest steps in this example number 1.
00:25:41.400 --> 00:25:43.700
Let me remind you how all those steps went.
00:25:43.700 --> 00:25:48.000
We are trying to find the density function of U = Y².
00:25:48.000 --> 00:25:52.700
I used the original definition of moment generating function here.
00:25:52.700 --> 00:26:00.100
The original definition of a moment generating function is the expected value of E ⁺T Y.
00:26:00.100 --> 00:26:09.800
I plugged in my U there was Y², that means instead of the TY, I'm finding the expected value of E ⁺TY².
00:26:09.800 --> 00:26:15.700
That means, I'm finding the integral of E ⁺TY² × the density function.
00:26:15.700 --> 00:26:20.400
The density function for a standard normal variable is that right there.
00:26:20.400 --> 00:26:26.000
Standard normal variable means μ is 0 and σ² = 1.
00:26:26.000 --> 00:26:30.500
I pulled out the 1 /√2 π, I combine the exponents.
00:26:30.500 --> 00:26:38.000
I got this thing that is a little messy and is definitely not something I'm going to be able to integrate with any ease.
00:26:38.000 --> 00:26:45.600
The trick to integrating that is to combine those exponent using a little bit of clever factoring and then,
00:26:45.600 --> 00:26:52.100
to try to identify it as a density function for another normal distribution.
00:26:52.100 --> 00:26:56.100
Here is the density function for another normal distribution.
00:26:56.100 --> 00:27:03.800
What I know is that if I integrate the density function for any distribution, I should get 1.
00:27:03.800 --> 00:27:09.900
That is of course, because in any experiment, the total probability is 1.
00:27:09.900 --> 00:27:17.300
In order to make this match this density function, I set my two exponents equal to each other.
00:27:17.300 --> 00:27:25.400
And then, I solved and I figure out that my σ had to be 1 -2T⁻¹/2.
00:27:25.400 --> 00:27:29.900
I plugged in that value of σ, I converted this into σ.
00:27:29.900 --> 00:27:36.200
It almost match the density function but there was this one extra factor of σ that I did not have before.
00:27:36.200 --> 00:27:41.800
In order to create that factor of σ in the denominator, I had to multiply it in the numerator
00:27:41.800 --> 00:27:45.400
which meant I also had to multiply it on the other side.
00:27:45.400 --> 00:27:54.700
That density function, if I integrate that is equal 1 but then there is one extra factor of σ here, which is left over,
00:27:54.700 --> 00:27:58.300
that σ tracks on down there.
00:27:58.300 --> 00:28:01.700
What I'm left with, everything else drops out very nicely.
00:28:01.700 --> 00:28:05.000
Thanks to the fact that integrating a density function gives you 1.
00:28:05.000 --> 00:28:17.900
I’m left with 1 -2T⁻¹/2, and what I do there is I go back and look at my charts of the common moment generating functions.
00:28:17.900 --> 00:28:21.500
Because, what I just calculated was the moment generating function for U.
00:28:21.500 --> 00:28:30.700
I go back and look at my charts, and I say that looks a lot like the moment generating function for Chi square distribution.
00:28:30.700 --> 00:28:37.200
It is the Chi square distribution, if I just take my ν equal to 1.
00:28:37.200 --> 00:28:42.600
1 degree of freedom, I got a Chi square distribution and then, I want to write the density function for that.
00:28:42.600 --> 00:28:50.000
In order to do that, I had to remember that Chi square was a gamma distribution, was special values of the α and β.
00:28:50.000 --> 00:28:53.400
Α is ν/2 and β is equal to 2.
00:28:53.400 --> 00:28:59.700
My gamma distribution, I wrote down the density function for the gamma distribution, in general.
00:28:59.700 --> 00:29:05.600
I did it in terms of U, when we originally learned that, I gave it you in terms of Y but our variable now is U.
00:29:05.600 --> 00:29:12.300
It is U ^α -1, E ⁻U/β, β ^α, γ of α.
00:29:12.300 --> 00:29:19.500
I plugged in my α is ν/2 and my ν is 1.
00:29:19.500 --> 00:29:22.400
I plug in β is equal to 2.
00:29:22.400 --> 00:29:26.000
This all simplified fairly well, except of this γ ½.
00:29:26.000 --> 00:29:30.700
I'm just remembering the γ of ½ is √π.
00:29:30.700 --> 00:29:35.200
That is kind of a lot of work to figure that out, I do not do that work every time.
00:29:35.200 --> 00:29:40.400
I just looked up that value of γ of ½ is √π.
00:29:40.400 --> 00:29:48.000
It is not so obvious like the way that γ of a whole number is easy to calculate using factorials,
00:29:48.000 --> 00:29:53.200
you have to do a lot of integrals, in order to figure out that γ of ½ is √π.
00:29:53.200 --> 00:29:55.500
That is why I did not show you the details of that.
00:29:55.500 --> 00:30:01.600
In the denominator, I combined 2¹/2 and √π, I got the √2 π.
00:30:01.600 --> 00:30:07.400
And that gave me my density function for U = Y².
00:30:07.400 --> 00:30:11.000
My range, that is the generic range for Chi square distribution.
00:30:11.000 --> 00:30:20.300
But, I also could have figured it out by looking at my original range for Y and then, by figuring out U = Y².
00:30:20.300 --> 00:30:24.800
By the way, this is one reason why we study the Chi square distribution.
00:30:24.800 --> 00:30:34.400
It is because it is very common to look at the square of a standard normal variable, it turns out to have a chi square distribution.
00:30:34.400 --> 00:30:40.100
We are going to use the result from this example again in example 2.
00:30:40.100 --> 00:30:45.200
Make sure you understand this example, or at least make sure that you believe the answer,
00:30:45.200 --> 00:30:47.300
before we move on to example 2.
00:30:47.300 --> 00:30:49.700
I do not want to do all this work again in example 2.
00:30:49.700 --> 00:30:59.000
I’m just going to invoke the answer from this example again, in example 2.
00:30:59.000 --> 00:31:05.500
Example 2 looks a lot like example 1, except we have two independent standard normal variables,
00:31:05.500 --> 00:31:08.700
instead of the one that we had in example 1.
00:31:08.700 --> 00:31:13.200
We want to find the density function of Y1² + Y2².
00:31:13.200 --> 00:31:18.600
I am going to use the answer from example 1 to help me solve example 2.
00:31:18.600 --> 00:31:25.300
If you have not worked through example 1 of this lecture, then I really recommend going back and looking at example 1.
00:31:25.300 --> 00:31:28.900
It is a lot of work, if you do not want to work through all the details there,
00:31:28.900 --> 00:31:31.800
just make sure that you understand the answer.
00:31:31.800 --> 00:31:36.800
We are going to use that answer as intermediate result here in example 2.
00:31:36.800 --> 00:31:39.500
It will make example 2 a lot less work.
00:31:39.500 --> 00:31:48.700
Let us work out example 2, we want to find the density function of U = Y1² + Y2².
00:31:48.700 --> 00:31:52.100
The way we are going to do that is via moment generating function.
00:31:52.100 --> 00:32:03.800
We are going to find the moment generating function for U, M sub U of T that is equal to M sub Y1².
00:32:03.800 --> 00:32:12.800
U is Y1² + Y2².
00:32:12.800 --> 00:32:19.300
The lovely thing about moment generating functions, that good property that I gave you on one of the introductory slide
00:32:19.300 --> 00:32:25.400
is that they convert addition into multiplication, when you have independent variables.
00:32:25.400 --> 00:32:28.800
Here, we do have independent variables.
00:32:28.800 --> 00:32:38.700
This is M Y1² of T × this is where the multiplication comes in, M Y2² of T.
00:32:38.700 --> 00:32:46.100
That is really nice, that our addition converts into multiplication.
00:32:46.100 --> 00:32:49.700
Let me now invoke the answer from example 1.
00:32:49.700 --> 00:33:12.200
From example 1, each Y is², Y1² and Y2² has a Chi square distribution with 1 degree of freedom.
00:33:12.200 --> 00:33:15.400
Let me say with ν =1, I will say it that way.
00:33:15.400 --> 00:33:24.400
If you are wondering where that comes from, you got to go back and watch example 1.
00:33:24.400 --> 00:33:28.000
Example 1 is a lot of work and I cannot redo it here.
00:33:28.000 --> 00:33:34.500
If you trust example 1, it is worth knowing that if you start with the standard normal variable
00:33:34.500 --> 00:33:37.700
and you square it, you get a Chi square distribution.
00:33:37.700 --> 00:33:46.200
We can look up what the moment generating function of a Chi square distribution is.
00:33:46.200 --> 00:34:01.300
From the chart of the moment generating function of a Chi square distribution is 1 -2 T.
00:34:01.300 --> 00:34:13.200
It is always a function of T, remember, raised to the –ν.
00:34:13.200 --> 00:34:21.300
In this case, it is just 1 -2T⁻¹.
00:34:21.300 --> 00:34:37.100
What I have here is a product of two functions here, 1 -2T ^-ν/2.
00:34:37.100 --> 00:34:52.600
1 -2T⁻¹/2 and 1 -2T⁻¹/2, that is not so obvious that it is negative because
00:34:52.600 --> 00:34:56.400
I let my negative run into my line there, my fraction line.
00:34:56.400 --> 00:34:58.700
That is a little more obvious now.
00:34:58.700 --> 00:35:04.100
Let me multiply those two together, if you multiply those then the exponents just add.
00:35:04.100 --> 00:35:19.200
I get 1 -2T⁻¹, that is my moment generating function for U.
00:35:19.200 --> 00:35:27.000
Let me write this as -ν/2 because then, that will make it more obvious that
00:35:27.000 --> 00:35:38.100
the moment generating function that I just discovered for U, is again a Chi² distribution.
00:35:38.100 --> 00:35:41.700
Remember, this whole lecture is about pattern recognition.
00:35:41.700 --> 00:35:46.200
You calculate a moment generating function, then you stare at the chart and you try say
00:35:46.200 --> 00:35:50.300
that is the Chi square distribution or that is the exponential distribution.
00:35:50.300 --> 00:36:03.100
This in fact is the Chi square distribution with ν is equal to, -1 is -ν/2, ν would be 2 there.
00:36:03.100 --> 00:36:08.700
We have a Chi square distribution with 2 degrees of freedom.
00:36:08.700 --> 00:36:18.600
Now, I can find its density function, I will remember that Chi square is a gamma distribution.
00:36:18.600 --> 00:36:22.200
It is a sub family of the γ family.
00:36:22.200 --> 00:36:28.500
Let me remind myself of the density function for the gamma distribution.
00:36:28.500 --> 00:36:39.100
F of U = U ^α - 1 × E ⁻U/β.
00:36:39.100 --> 00:36:42.300
That β got a little squashed there, it ended up looking like a Δ.
00:36:42.300 --> 00:36:51.300
U/β and β ^α × γ of α.
00:36:51.300 --> 00:36:54.900
That is the density function for a gamma distribution.
00:36:54.900 --> 00:37:09.300
Chi square is γ with α is equal to ν/2 and β is equal to 2.
00:37:09.300 --> 00:37:22.100
I'm going to plug in those values into my gamma distribution, F sub U of U is U ^α -1.
00:37:22.100 --> 00:37:29.500
Α is ν/2, we said ν is equal 2, 2/2 -1 is 0, that term drops out.
00:37:29.500 --> 00:37:37.400
I will go ahead and write it as U⁰, just in case you are wondering where it went, E ⁻U/2.
00:37:37.400 --> 00:37:43.500
In my denominator, I got β ^α is 2¹.
00:37:43.500 --> 00:37:48.000
And then, γ of α is just γ of 1.
00:37:48.000 --> 00:37:52.900
Γ of 1 is 0Factorial which is just 1.
00:37:52.900 --> 00:38:03.100
Finally, my density function for my U is F sub U of U which is the U⁰ drops out, the γ of 1 drops out.
00:38:03.100 --> 00:38:15.200
It is ½ E ⁻U/2, and my range for Chi square distribution is U goes from 0 to infinity.
00:38:15.200 --> 00:38:21.800
That is my density function.
00:38:21.800 --> 00:38:26.900
That is officially the end of that problem, let me make a coupe of notes about this.
00:38:26.900 --> 00:38:32.600
One note is that you might recognize that density function as an exponential distribution.
00:38:32.600 --> 00:38:35.700
It is in fact an exponential distribution.
00:38:35.700 --> 00:38:42.200
That is not so relevant to this problem because that pattern does not really continue.
00:38:42.200 --> 00:38:46.700
The fact that was an exponential distribution is sort of a fluke of nature on this problem.
00:38:46.700 --> 00:38:50.300
Let me tell you what is not a fluke of nature on this problem ,
00:38:50.300 --> 00:38:55.300
which is that we got a Chi square distribution with 2 degrees of freedom
00:38:55.300 --> 00:39:02.100
by adding up the squares of two standard normals that is not a fluke.
00:39:02.100 --> 00:39:38.700
In general, let me say Y1 through YN, if we add up N standard normal, Y1, Y2, up to YN are independent standard normal.
00:39:38.700 --> 00:39:51.300
U is Y1² up to YN², then U has a Chi square distribution with N degrees of freedom.
00:39:51.300 --> 00:39:58.300
U is Chi² distribution with N degrees of freedom.
00:39:58.300 --> 00:40:05.700
Let me say with a ν, ν is the number of degrees of freedom, in this case it will come out to be N.
00:40:05.700 --> 00:40:14.300
That is not so surprising, if you kind of look at this step right here, instead of having two factors, we would get N factors.
00:40:14.300 --> 00:40:24.200
This exponent would turn into N/2, we would just get Chi square distribution with ν = N.
00:40:24.200 --> 00:40:31.600
This does generalize to adding up N independent squares of standard normal,
00:40:31.600 --> 00:40:35.400
what you get is a Chi square distribution with N degrees of freedom.
00:40:35.400 --> 00:40:41.700
That is really a big reason why the Chi square distribution is significant in probability and statistics.
00:40:41.700 --> 00:40:48.100
It is because it kind of flows out of the standard normal distribution.
00:40:48.100 --> 00:40:50.300
Let me recap the steps here.
00:40:50.300 --> 00:40:55.000
We want to find the density function of Y1² + Y2².
00:40:55.000 --> 00:41:03.100
We start out just by that definition U is Y1² + Y2², the definition of moment generating function.
00:41:03.100 --> 00:41:11.900
But quickly, we are going to use this property that we had, I think I called it a useful formula on one of the earlier slides.
00:41:11.900 --> 00:41:17.500
The really useful fact is that when we have independent variables, it converts addition,
00:41:17.500 --> 00:41:23.400
when we are adding the variables into multiplication of moment generating functions.
00:41:23.400 --> 00:41:29.400
What we do is we multiply the moment generating functions for Y1² and Y2².
00:41:29.400 --> 00:41:34.400
We figured out the moment generating functions for each one, back in example 1.
00:41:34.400 --> 00:41:41.100
If the introduction of the Chi square variable suddenly came out of the left field for you,
00:41:41.100 --> 00:41:44.100
what you want do is go back and watch example 1.
00:41:44.100 --> 00:41:54.400
You will see where we figured out that the distribution for Y1² is just Chi square with 1 degree of freedom.
00:41:54.400 --> 00:42:00.300
Its moment generating function, we figure that out on the chart earlier on in this lecture.
00:42:00.300 --> 00:42:11.600
It is 1 -2T ^-ν/2, we get that for both of these variables multiplying together and we get 1 -2T⁻¹.
00:42:11.600 --> 00:42:15.600
We notice that, that Chi square again, this is sort of pattern recognition.
00:42:15.600 --> 00:42:22.200
That is still a Chi square, the difference is that the exponent is bigger now, we have 2 degrees of freedom.
00:42:22.200 --> 00:42:30.000
If we want to find again the density function, we have to remember that Chi square comes from the gamma distribution.
00:42:30.000 --> 00:42:34.300
I wrote down my formula for the density function for the gamma distribution.
00:42:34.300 --> 00:42:41.500
And then, I plugged in Chi square is gamma distribution with α is ν/2 and β = 2.
00:42:41.500 --> 00:42:49.600
I plugged in those values, I plug in ν = 2, I plug in all those values to my γ density function.
00:42:49.600 --> 00:42:55.900
I simplified it down and got my density function for my U there.
00:42:55.900 --> 00:43:00.200
Of course, the range for Chi square distribution is from 0 to infinity.
00:43:00.200 --> 00:43:05.400
What I noticed along the way is that, this is sort of a pattern with two variables.
00:43:05.400 --> 00:43:12.600
But if we had N variables, we could have just extended this up to N moment generating functions and
00:43:12.600 --> 00:43:16.600
we would have gotten a Chi square distribution with N degrees of freedom.
00:43:16.600 --> 00:43:20.200
That is kind of a good thing to know in probability and statistics, in general,
00:43:20.200 --> 00:43:24.700
which is that if you add up N standard normal variables, squaring each one,
00:43:24.700 --> 00:43:31.000
then you get a Chi square distribution with N degrees of freedom.
00:43:31.000 --> 00:43:36.400
In examples 3, we have R independent binomial variables.
00:43:36.400 --> 00:43:39.600
They all represent flipping the same coins.
00:43:39.600 --> 00:43:42.500
The coin comes up heads with probability P.
00:43:42.500 --> 00:43:48.300
P is not necessarily ½, it could be a loaded coin, nobody told us that it is a fair coin.
00:43:48.300 --> 00:43:52.800
Each one represents a different number of flips, N1 through NR.
00:43:52.800 --> 00:43:56.900
What we want do is add these variables together and call it U.
00:43:56.900 --> 00:44:01.400
We want to find the probability function of U.
00:44:01.400 --> 00:44:07.200
Our method that we are exploring in this lecture is moment generating functions.
00:44:07.200 --> 00:44:11.100
We are going to find the moment generating function of U.
00:44:11.100 --> 00:44:17.600
In the meantime, along the way we are going to need the moment generating function of the individual Y.
00:44:17.600 --> 00:44:21.600
I want to find the moment generating function of YI of T.
00:44:21.600 --> 00:44:27.000
I get that just by looking at my chart for moment generating functions.
00:44:27.000 --> 00:44:34.900
The binomial is discreet, if you scroll back a few slides in this lecture,
00:44:34.900 --> 00:44:40.300
you will see the chart for moment generating functions of discrete variables.
00:44:40.300 --> 00:44:55.900
The one for binomial is PE ⁺T + 1- O ⁺Nth but Yi variable is Ni flips.
00:44:55.900 --> 00:44:58.100
I’m going to write N sub I here.
00:44:58.100 --> 00:45:07.500
This is coming from the chart earlier on in this lecture, just scroll back and you will find it.
00:45:07.500 --> 00:45:10.000
It is the discrete distributions.
00:45:10.000 --> 00:45:14.500
We want to find my moment generating function for U.
00:45:14.500 --> 00:45:23.300
Than U that we have been given here which is the sum of the Yi, Y1 up to YN.
00:45:23.300 --> 00:45:29.600
The lovely thing about moment generating functions is that they convert addition into multiplication.
00:45:29.600 --> 00:45:34.800
You can only do that when you have independent variables, which is what we have here.
00:45:34.800 --> 00:45:41.100
This is M Y1 of T multiplied, this is multiplied now, I’m not adding any more.
00:45:41.100 --> 00:45:44.000
Which is, I do not know why I try to write an addition sign there.
00:45:44.000 --> 00:45:51.900
This is MYN of T, I'm going to plug in the moment generating functions for each one.
00:45:51.900 --> 00:46:11.700
PE ⁺T + 1 – P ⁺N1, I'm going to multiply that all the way through up to PE ⁺T + 1- P ⁺N,
00:46:11.700 --> 00:46:16.900
I called it Y sub N, of course, I should have called it Y sub R.
00:46:16.900 --> 00:46:22.200
There are R in these things, I will try not to reuse the variable N.
00:46:22.200 --> 00:46:26.100
This is N sub R in my exponent.
00:46:26.100 --> 00:46:29.700
The lovely thing about this is, I got the same base everywhere,
00:46:29.700 --> 00:46:34.200
I can just combine all those exponent and you add the exponents.
00:46:34.200 --> 00:46:47.400
This is PE ⁺T + 1- P, I add the exponents N1 up to N sub R.
00:46:47.400 --> 00:46:53.500
Maybe this is obvious, but if it is not obvious, go back and look at your chart of moment generating functions.
00:46:53.500 --> 00:47:03.200
Stare at this and you recognize that it is a binomial distribution, again.
00:47:03.200 --> 00:47:05.500
Remember, that is how moment generating functions work.
00:47:05.500 --> 00:47:10.900
You work out the MGF and then you go back and look at your chart, and you try to recognize it.
00:47:10.900 --> 00:47:22.300
This is binomial with N = N1 + NR.
00:47:22.300 --> 00:47:26.400
I know what my probability function for binomial distribution is.
00:47:26.400 --> 00:47:30.900
The probability of any given value of U, this is the discrete probability function.
00:47:30.900 --> 00:47:37.000
We had a whole lecture on the binomial distribution, if you are completely lost with the word binomial,
00:47:37.000 --> 00:47:41.300
just scroll back and you will see our probability function for the binomial distribution.
00:47:41.300 --> 00:47:44.200
I’m going to use U instead of Y, we use Y back then.
00:47:44.200 --> 00:47:54.100
It is N choose U × P ⁺U × Q ⁺N- U.
00:47:54.100 --> 00:47:58.800
In this case P of U, I will fill in my N is.
00:47:58.800 --> 00:48:16.600
It is N1 added up to NR choose U P ⁺U and Q ⁺N1 up to NR-U.
00:48:16.600 --> 00:48:23.600
My range here is that U goes between 0 and N, including both of them.
00:48:23.600 --> 00:48:32.800
In this case, U goes between 0 and my N is N1 up to NR.
00:48:32.800 --> 00:48:40.900
That is really not very surprising, it is like you are taking a coin and you are flipping it N1 ×.
00:48:40.900 --> 00:48:50.800
And then, you flip it N2 × and then you flip it N3 ×, and you keep on flipping until you finally flip it NR ×.
00:48:50.800 --> 00:48:56.900
And what you have really done is you flip it N1 + N2 + N3 up to NR × total.
00:48:56.900 --> 00:49:03.600
You get a binomial distribution where your N is just the sum of all those n.
00:49:03.600 --> 00:49:09.000
This is really not very shocking and it is nice to have a moment generating functions
00:49:09.000 --> 00:49:14.800
to confirm what our intuition probably should have already told us.
00:49:14.800 --> 00:49:18.400
Let me review the steps there.
00:49:18.400 --> 00:49:21.300
We are trying to find the moment generating function for U.
00:49:21.300 --> 00:49:26.300
But, U was Y1 through YR, the sum of Y1 through YR.
00:49:26.300 --> 00:49:33.700
Our useful formula on moment generating functions says that, it converts addition into multiplication.
00:49:33.700 --> 00:49:39.100
I got addition in my subscript here, that converted into multiplication here.
00:49:39.100 --> 00:49:43.200
I had to know the moment generating function for each one of the Yi.
00:49:43.200 --> 00:49:51.300
I looked at the moment generating function for binomial distribution, because I was told that the Yi were binomial.
00:49:51.300 --> 00:49:58.400
The moment generating function for binomial distribution, on my chart is PE ⁺T + 1- P ^,
00:49:58.400 --> 00:50:01.600
whatever the N is for that distribution.
00:50:01.600 --> 00:50:05.200
In this case, it is N1 through N sub R.
00:50:05.200 --> 00:50:10.600
I use those as my exponents but then all those terms, since they are multiplied together,
00:50:10.600 --> 00:50:18.500
they combine together and we just get one big exponent at the top and 1 + up to NR.
00:50:18.500 --> 00:50:26.600
And then, I looked back at my charts, see if you can identify this moment generating function.
00:50:26.600 --> 00:50:32.700
And of course, that is a binomial, again it is just binomial where your exponent tells you the N.
00:50:32.700 --> 00:50:37.400
N is N1 up to NR, added together.
00:50:37.400 --> 00:50:46.200
I looked at my binomial probability function, this comes back from our earliest lecture on the binomial distribution.
00:50:46.200 --> 00:50:50.900
You can look this up, you will see this formula except you will see a Y instead of U.
00:50:50.900 --> 00:50:55.400
Here our variable is U and here is the range for U.
00:50:55.400 --> 00:51:01.300
I just plug in what N was, N was N1 through NR.
00:51:01.300 --> 00:51:06.900
I plugged that in all the way through here and my range for U goes from 0 to N.
00:51:06.900 --> 00:51:12.300
Again, this is not surprising, this kind of fits what your instinct should tell you because
00:51:12.300 --> 00:51:19.000
you want to think about flipping the same coin N1 ×, and then you start all over and flip it N2 ×.
00:51:19.000 --> 00:51:27.500
You will keep flipping until you finally flip it NR ×, that is just the same as flipping it many times over.
00:51:27.500 --> 00:51:32.000
N1 + N2 + N3, up to NR ×.
00:51:32.000 --> 00:51:39.900
It is not surprising that the total number of heads will give you a binomial distribution,
00:51:39.900 --> 00:51:45.100
based on that total number of flips.
00:51:45.100 --> 00:51:51.200
In example 4, we got two independent Poisson variables with means λ 1 and λ 2.
00:51:51.200 --> 00:51:57.700
We want to find the probability function of U which is Y1 + Y2.
00:51:57.700 --> 00:51:58.800
Let me set up what we are going to need here.
00:51:58.800 --> 00:52:07.300
I know I'm going to need the moment generating functions of Y1 and Y2.
00:52:07.300 --> 00:52:09.600
Let me go ahead and write those down.
00:52:09.600 --> 00:52:11.600
I'm looking these up from the chart.
00:52:11.600 --> 00:52:15.900
We did have a whole section on how to calculate moment generating functions.
00:52:15.900 --> 00:52:21.500
You could look that up much earlier in the series of lectures, if you want.
00:52:21.500 --> 00:52:26.600
What we did was we eventually found this chart and I’m not going to calculate these again from scratch.
00:52:26.600 --> 00:52:38.400
M sub YI is just E ^λ I ×, in the exponent E ⁺T-1.
00:52:38.400 --> 00:52:44.200
That is going to be useful, as I try to calculate the moment generating function of U.
00:52:44.200 --> 00:52:53.200
Let me try to do that, M sub U of T is M sub Y1 + Y2 of T.
00:52:53.200 --> 00:52:59.500
The whole point or one of the really nice features of moment generating functions is that
00:52:59.500 --> 00:53:05.100
they convert addition into multiplication, when you have independent variables.
00:53:05.100 --> 00:53:13.900
We do have independent variables here, this is the M sub Y of T × M sub Y2 of T.
00:53:13.900 --> 00:53:21.400
I can plug in what I have found to be the moment generating functions of each one of those variables.
00:53:21.400 --> 00:53:31.900
This is E ^λ 1 × E ⁺T-1 × E ^λ 2 × E ⁺T-1.
00:53:31.900 --> 00:53:36.600
Of course, since I have similar exponents, I can add them.
00:53:36.600 --> 00:53:47.200
This is E ^λ 1, I will factor out the E ⁺T-1 λ 1 + λ 2 × E ⁺T-1.
00:53:47.200 --> 00:53:54.200
I will go back and I will look at my chart of moment generating functions, and see if I find anything like this.
00:53:54.200 --> 00:54:01.800
Of course, I will find something like this because that is the moment generating function for Poisson distribution.
00:54:01.800 --> 00:54:16.000
The chart tells us this is Poisson with this mean λ is equal to λ 1 + λ 2.
00:54:16.000 --> 00:54:21.200
I know I have a Poisson distribution with means λ 1 + λ 2.
00:54:21.200 --> 00:54:41.000
If I look up my probability function for a Poisson distribution, what it is, is λ ⁺U × E ^-λ all divided by U!.
00:54:41.000 --> 00:54:47.500
The range there is from U goes from 0 to infinity.
00:54:47.500 --> 00:55:16.100
Let me plug in what λ is, λ is λ 1 + λ 2 ⁺U E ^- λ 1- λ 2 divided by U!, where U goes from 0 to infinity.
00:55:16.100 --> 00:55:22.400
This is also not surprising and let me try to explain this.
00:55:22.400 --> 00:55:27.600
Remember what the Poisson distribution models, it models random occurrences.
00:55:27.600 --> 00:55:37.500
A kind of prototypical example of the Poisson distribution is, you are sitting at an intersection on a country road,
00:55:37.500 --> 00:55:43.600
a kind of a not very crowded country road, and you are counting the number of cars that go by this intersection.
00:55:43.600 --> 00:55:48.500
It does not happen very often, every once in a while a car goes by.
00:55:48.500 --> 00:56:02.300
You might say that Y1 is the number of cars through an intersection on a country road.
00:56:02.300 --> 00:56:09.900
The Poisson distribution models that perfectly because you might have a whole bunch of cars, you might not have any cars.
00:56:09.900 --> 00:56:16.900
Maybe, you are calculating this over the course of 1 hour, how many cars go through this one intersection over 1 hour?
00:56:16.900 --> 00:56:27.500
Y2 could be the number of trucks through the same intersection, again, that is going to follow a Poisson distribution.
00:56:27.500 --> 00:56:33.500
Probably, we will have a different mean because depending on the area, you might have more cars or you might have more trucks.
00:56:33.500 --> 00:56:38.500
If it is a rural community, you might have more trucks because people are carrying stuff around their farms.
00:56:38.500 --> 00:56:42.300
If it is an urban community, you might have more cars.
00:56:42.300 --> 00:56:47.700
But any way, you will have different means for the average number of cars and trucks through the intersection.
00:56:47.700 --> 00:56:55.400
What you are really keeping track of, if you look at Y1 + Y2, it is the of total number of cars and trucks.
00:56:55.400 --> 00:57:02.600
The total number of vehicles through the intersection.
00:57:02.600 --> 00:57:08.700
Again, it is not too surprising, the one we calculate out, the distribution there,
00:57:08.700 --> 00:57:12.000
what we discovered is that is also a Poisson distribution.
00:57:12.000 --> 00:57:17.700
Then, you are just kind of sitting there at that intersection and just every time something with wheels goes through,
00:57:17.700 --> 00:57:22.200
every time a car or truck goes through, you count it as 1.
00:57:22.200 --> 00:57:26.900
It is a Poisson distribution because every once in a while something goes through.
00:57:26.900 --> 00:57:31.000
Sometimes you get a lot of cars and trucks, sometimes you get nothing.
00:57:31.000 --> 00:57:39.300
It is not surprising that, when we calculate the probability function of Y1 + Y2, we end up with the Poisson distribution again.
00:57:39.300 --> 00:57:42.200
Let me recap the steps there.
00:57:42.200 --> 00:57:46.300
We figure out the moment generating function for Poisson distribution.
00:57:46.300 --> 00:57:54.400
I’m being a little charitable when I say I figure that out, I really use the chart that I gave you early on.
00:57:54.400 --> 00:57:58.600
It was in the discrete distributions, earlier on in this lecture.
00:57:58.600 --> 00:58:02.900
If you are really want to know where that comes from, you have to go back and watch the earlier lecture,
00:58:02.900 --> 00:58:06.500
the previous video which covered moment generating functions.
00:58:06.500 --> 00:58:10.600
That is the moment generating function for a single Poisson distribution.
00:58:10.600 --> 00:58:15.500
We want to combine them, we are finding U is Y1 + Y2.
00:58:15.500 --> 00:58:21.400
A very useful formula which showed that, that converts addition into multiplication,
00:58:21.400 --> 00:58:23.600
for a moment generating functions.
00:58:23.600 --> 00:58:29.200
That is because these variables are independent, you can convert addition into multiplication.
00:58:29.200 --> 00:58:36.900
We multiply the two moment generating functions together and it combined very nice and get this λ 1 + λ 2 factoring out.
00:58:36.900 --> 00:58:43.700
If we look back at the chart, that is still the moment generating function for Poisson distribution.
00:58:43.700 --> 00:58:49.500
The only difference is the λ has changed, the new mean is λ 1 + λ 2.
00:58:49.500 --> 00:58:56.100
If you look up the probability function for Poisson distribution, this is something we covered earlier on,
00:58:56.100 --> 00:58:58.300
when we are talking about discreet distributions.
00:58:58.300 --> 00:59:01.200
We had a whole lecture on the Poisson distribution.
00:59:01.200 --> 00:59:06.400
Here is the probability function for Poisson distribution and here is the range.
00:59:06.400 --> 00:59:12.000
I think we used Y before, but now are using U because that is the name of our variable.
00:59:12.000 --> 00:59:18.300
The only difference is that the λ here is λ 1 + λ 2.
00:59:18.300 --> 00:59:25.300
I plug that in everywhere I saw a λ and then I got my probability function for U.
00:59:25.300 --> 00:59:32.500
Again, this is not surprising if you remember what the Poisson distribution measures in real life.
00:59:32.500 --> 00:59:41.500
One way to think about it is, it measures random events that happened with no effect on each other.
00:59:41.500 --> 00:59:45.300
If you are sitting by an intersection, sometimes you see a lot of cars and
00:59:45.300 --> 00:59:48.300
sometimes you see a lot of trucks, and sometimes you do not see anything.
00:59:48.300 --> 00:59:54.300
But, you can have one variable the counts the number of cars, one variable that counts the number of trucks,
00:59:54.300 --> 00:59:57.000
and one variable that counts everything together.
00:59:57.000 --> 00:59:59.100
You are just adding the cars and trucks.
00:59:59.100 --> 01:00:08.100
All three of those are Poisson variables, it is not too surprising when we actually calculate,
01:00:08.100 --> 01:00:16.200
if we add two Poisson variables, the answer is still a Poisson variable.
01:00:16.200 --> 01:00:21.800
In example 5, we have independent normal variables, each one has the same mean and variance.
01:00:21.800 --> 01:00:24.500
Each one has mean μ and variance σ².
01:00:24.500 --> 01:00:30.500
We want to find the distribution of Y ̅, Y ̅ is the average of the variables.
01:00:30.500 --> 01:00:36.400
You can think of it as the mean, but that gets confusing because we also use mean in another sense.
01:00:36.400 --> 01:00:42.700
Y ̅ is 1/N × Y1 + Y2 up to YN.
01:00:42.700 --> 01:00:45.600
We are going to use moment generating functions for this.
01:00:45.600 --> 01:00:57.100
Let me find the moment generating function for any particular normal variable M sub YI.
01:00:57.100 --> 01:01:05.400
I got a normal variable, I have to look this up from the chart look of continuous distributions.
01:01:05.400 --> 01:01:23.700
You will see the moment generating function for a normal variable is E ^μ T + σ² T²/2,
01:01:23.700 --> 01:01:25.700
that is all in the exponent there.
01:01:25.700 --> 01:01:30.700
That is the moment generating function for any single variable here.
01:01:30.700 --> 01:01:35.600
I want to find the moment generating function for Y ̅, but I do not think I'm going to find it directly.
01:01:35.600 --> 01:01:40.800
I think I’m going to first find the moment generating function for Y1 through YN.
01:01:40.800 --> 01:01:49.100
I will call that Y, and I will moment generating function from that first.
01:01:49.100 --> 01:01:52.500
And then, I will figure out what to do with that 1/N.
01:01:52.500 --> 01:02:05.300
M sub Y of T is, Y is just Y1 up to YN of T.
01:02:05.300 --> 01:02:09.800
Remember, moment generating functions for independent variables which we have here,
01:02:09.800 --> 01:02:12.700
they turn addition into multiplication.
01:02:12.700 --> 01:02:20.200
M sub Y1 of T multiplying up to M sub YN of T.
01:02:20.200 --> 01:02:32.300
That is just E ^μ T + σ² T²/2, multiply it together N ×.
01:02:32.300 --> 01:02:41.300
It is the same moment generating function every time, E ^μt + σ² T²/2.
01:02:41.300 --> 01:02:52.100
What I get there is E ^μ T + σ² T²/2 ⁺nth.
01:02:52.100 --> 01:02:55.700
I'm going to go ahead and distribute that in into the exponent.
01:02:55.700 --> 01:03:08.600
That is E ^μ MT + σ² T² N/2, all of that is in the exponent there.
01:03:08.600 --> 01:03:12.200
That is the moment generating function for Y but that is not quite what I wanted.
01:03:12.200 --> 01:03:16.700
I wanted Y ̅, let me show you how I can deal with that.
01:03:16.700 --> 01:03:23.900
I noticed that Y ̅ is just the same as Y divided by N, it is 1/N × Y.
01:03:23.900 --> 01:03:32.200
Let me remind you of a really useful property, this is listed in fact as a useful formula earlier on in this video.
01:03:32.200 --> 01:03:45.000
Scroll back and you will see the following formula, that M sub AY + the moment generating function of AY + B of T is equal to,
01:03:45.000 --> 01:03:50.800
You start with the moment generating function for Y, you plug in AT whenever you saw a T.
01:03:50.800 --> 01:04:01.600
I forgot to include the extra term there, our extra factor is E ⁺BT × M sub Y of AT.
01:04:01.600 --> 01:04:06.600
That is one of the useful formulas that we have for moment generating functions.
01:04:06.600 --> 01:04:24.800
In this case, what we have is A is equal to 1/N and B is equal to 0, because we have Y ̅ is 1/NY.
01:04:24.800 --> 01:04:37.900
M sub Y ̅ of T is equal to M sub Y of, our A is 1/N so 1/N × T.
01:04:37.900 --> 01:04:47.100
I'm going to take my moment generating function for Y.
01:04:47.100 --> 01:04:54.300
I'm going to plug in 1/N wherever I saw a 1/N × T, wherever I saw AT before.
01:04:54.300 --> 01:05:04.700
I get E ^μ N 1/MT, 1/M × T + σ².
01:05:04.700 --> 01:05:13.700
I see a T, I got to put in 1/N × T² × N/2.
01:05:13.700 --> 01:05:28.100
This is actually quite nice because it simplifies E ^μ, the N and 1/N cancels, I get E ^μ T +, I got Σ² + σ².
01:05:28.100 --> 01:05:33.500
I have got T/N², that is T²/N² × N.
01:05:33.500 --> 01:05:37.300
The N cancels with one of the N in the denominator but not both of them.
01:05:37.300 --> 01:05:46.800
Σ²/N and then, I still have a T² and I still have a 2 there.
01:05:46.800 --> 01:05:52.200
That is all in my exponent, that is my moment generating function for Y ̅.
01:05:52.200 --> 01:05:55.600
What I want to do is go back and look at my chart now
01:05:55.600 --> 01:06:01.900
and see if I recognize that as the moment generating function for any of my known distributions.
01:06:01.900 --> 01:06:14.200
I go back and look at the chart, and what I recognize is that, that is the moment generating function from normal distribution.
01:06:14.200 --> 01:06:31.100
This is the moment generating function for a normal distribution.
01:06:31.100 --> 01:06:41.200
Not quite in the format that was given in the chart though with mean,
01:06:41.200 --> 01:06:47.800
The mean looks good, the mean is ν, that fits the pattern but the moment generating function
01:06:47.800 --> 01:06:56.300
for the normal distribution was E ^μ T + σ² T²/2.
01:06:56.300 --> 01:07:00.100
What I have here is σ²/N × T²/2.
01:07:00.100 --> 01:07:11.600
My variance is slightly different here, instead of σ² by itself, σ²/N.
01:07:11.600 --> 01:07:24.900
That is what my distribution of Y ̅ is, my distribution for Y ̅ is normal and it has mean U but its variance is σ²/N.
01:07:24.900 --> 01:07:28.500
It is not the same variance that I started with.
01:07:28.500 --> 01:07:34.800
That is my answer and this is not too surprising because we have a bunch of variables,
01:07:34.800 --> 01:07:40.400
we expect their average to have the same mean as the individual variables.
01:07:40.400 --> 01:07:48.300
However, the average does not have the same variance because we are sampling over more variables.
01:07:48.300 --> 01:07:54.600
It makes the average be less variable, that is the law of large numbers.
01:07:54.600 --> 01:08:13.500
A greater sample size gives smaller variance in the average.
01:08:13.500 --> 01:08:17.300
This is something that is sort of very fundamental to statistics.
01:08:17.300 --> 01:08:23.200
That is why you try and take bigger samples, when you are trying to understand the population.
01:08:23.200 --> 01:08:29.700
It is because, if you take an average of more samples there will be less variance in your calculations.
01:08:29.700 --> 01:08:37.100
By the way, we did calculate this same example back in the lecture on distribution functions.
01:08:37.100 --> 01:08:40.700
If you go back and look at the lecture on distribution functions,
01:08:40.700 --> 01:08:45.700
you will see the same example and you will see the same answer.
01:08:45.700 --> 01:08:53.100
I’m sorry, it was not the lecture on distribution functions, it was the lecture on linear combinations of random variables.
01:08:53.100 --> 01:08:56.900
It was back in the previous chapter, you will see the same example, same answer,
01:08:56.900 --> 01:08:59.900
but calculated using very different methods.
01:08:59.900 --> 01:09:03.200
We were not using moment generating functions back then.
01:09:03.200 --> 01:09:04.500
Let me review the steps here.
01:09:04.500 --> 01:09:10.600
First of all, I wrote down the moment generating function for a normal variable.
01:09:10.600 --> 01:09:16.200
I got that from the chart, I did not calculate that from scratch.
01:09:16.200 --> 01:09:23.200
And then, I want to find the moment generating function for a particular Y, which was Y1 through YN,
01:09:23.200 --> 01:09:27.500
which means I kind of ignored the 1/N to start with here.
01:09:27.500 --> 01:09:34.500
I just called that stuff inside the parentheses Y, I was not going to even worry about the 1/N until later.
01:09:34.500 --> 01:09:42.100
The point of that is that, I have the some of variables and moment generating functions converts sums into products.
01:09:42.100 --> 01:09:47.900
It converts addition into multiplication and that is because these variables are independent.
01:09:47.900 --> 01:09:56.000
And then, I filled in what each one of the individual moment generating functions are.
01:09:56.000 --> 01:09:59.900
Since, I’m multiplying them together, I can just raise it up to the Nth power.
01:09:59.900 --> 01:10:07.100
I can distribute that exponent in, there is N in that exponent there.
01:10:07.100 --> 01:10:11.600
I have to figure out what that 1/N on the outside does to it.
01:10:11.600 --> 01:10:16.300
I was using an old property of moment generating functions that the moment generating function for
01:10:16.300 --> 01:10:23.200
AY + B is E ⁺BT × M sub Y of AT.
01:10:23.200 --> 01:10:29.100
That was listed in, I think it was called the useful formula on one of the introductory slide of this lecture.
01:10:29.100 --> 01:10:33.100
In this case, my A, my coefficient is 1/N.
01:10:33.100 --> 01:10:38.300
I’m plugging in, in place of T I’m substituting in 1/NT.
01:10:38.300 --> 01:10:43.500
There is that 1/NT manifesting itself right there and right there.
01:10:43.500 --> 01:10:48.700
It is very nice on the left, it just cancel off the N, we got that same μ again.
01:10:48.700 --> 01:10:52.300
It does not quite cancel with this N because it gets².
01:10:52.300 --> 01:10:59.900
We have a N² in the denominator and N in the numerator, that is why we still end up with 1N in the denominator.
01:10:59.900 --> 01:11:05.800
Once I got that moment generating function, I went back and look at my chart and said do I recognize this.
01:11:05.800 --> 01:11:10.700
I did spot on the chart, it looks a lot like the moment generating function from normal distribution.
01:11:10.700 --> 01:11:19.500
In fact, the μ is the same, the mean is the same, but the difference is that there was no N for the normal distribution.
01:11:19.500 --> 01:11:23.300
What I have to do is change my variance to be σ²/N,
01:11:23.300 --> 01:11:29.000
that would give me this moment generating function here with the σ²/N.
01:11:29.000 --> 01:11:35.500
I still have a normal distribution, I have the same mean as before, that is not surprising if you take a bunch of samples,
01:11:35.500 --> 01:11:39.800
you expect their average to be the same as the average of the population.
01:11:39.800 --> 01:11:46.400
The variance though is lower, the variance of a bunch of samples will be lower than
01:11:46.400 --> 01:11:51.400
the variance of an individual member of the population.
01:11:51.400 --> 01:11:55.900
The variance that we have now is σ²/N.
01:11:55.900 --> 01:12:01.100
Notice that, if you take more samples which means you make N bigger then you will have a lower variance,
01:12:01.100 --> 01:12:07.100
which is really why surveys with many samples are more accurate than surveys
01:12:07.100 --> 01:12:12.300
with sample of few members of the population.
01:12:12.300 --> 01:12:17.900
In examples 6, we are looking at to two independent exponential variables.
01:12:17.900 --> 01:12:24.900
Each one has mean 3 and we want to find the density function of Y1 + Y2.
01:12:24.900 --> 01:12:27.600
Let me remind you of how this works.
01:12:27.600 --> 01:12:34.300
First, we got to know the moment generating function for an exponential variable since,
01:12:34.300 --> 01:12:38.300
everything here is based on moment generating functions.
01:12:38.300 --> 01:12:52.500
M sub YI, the individual ones, I’m going to look up my moment generating function for the exponential variable on my chart,
01:12:52.500 --> 01:12:54.800
that is earlier on in this lecture.
01:12:54.800 --> 01:13:01.500
If you scroll back in this lecture, you will see the moment generating functions for continuous variables.
01:13:01.500 --> 01:13:10.100
The one for the exponential function is 1- β T to the -1.
01:13:10.100 --> 01:13:20.200
In this case, our mean is given that β = 3, it is 1 -3 T⁻¹.
01:13:20.200 --> 01:13:24.500
We are going to use that when we find the moment generating function for U,
01:13:24.500 --> 01:13:29.700
that is the moment generating function for Y1 + Y2.
01:13:29.700 --> 01:13:34.000
The whole point of moment generating functions or one of the very useful properties
01:13:34.000 --> 01:13:39.600
that they have is that, it converts addition into multiplication.
01:13:39.600 --> 01:13:54.000
M sub Y1 × M sub Y2, that is 1 -3T⁻¹ × 1 – 3T⁻¹.
01:13:54.000 --> 01:14:02.300
We just get 1 -3T⁻², we are going to look back in my chart and say do I recognize this
01:14:02.300 --> 01:14:07.700
as the moment generating function for any of my known distributions.
01:14:07.700 --> 01:14:15.800
If you look back at the chart, you will see that the gamma distribution does have a moment generating function.
01:14:15.800 --> 01:14:29.600
The gamma distribution does have a moment generating function of 1- β T ^-α.
01:14:29.600 --> 01:14:37.400
What I have here is a gamma distribution with α is 2 and β is 3.
01:14:37.400 --> 01:14:42.100
I can find the density function now as the density function from the gamma distribution.
01:14:42.100 --> 01:14:46.700
Here is the density function for the gamma distribution.
01:14:46.700 --> 01:14:51.400
I learned this way back in one of the earlier videos on the gamma distribution.
01:14:51.400 --> 01:14:53.800
You can look this up, if you do not remember it.
01:14:53.800 --> 01:15:07.300
It is U ^α -1 × E ⁻U/β divided by β ^ α × γ of α.
01:15:07.300 --> 01:15:17.900
In this case, U ^α -1, α is 2 so this is just U¹ × E ⁻U/3.
01:15:17.900 --> 01:15:23.800
Β ^α is 3² and γ of α is γ of 2.
01:15:23.800 --> 01:15:30.100
Γ of 2, remember is 2 -1!, 1! is going to be 1.
01:15:30.100 --> 01:15:35.500
That is easy to work out, γ of a whole number because it is related to the factorial function.
01:15:35.500 --> 01:15:51.000
Let me simplify that, F sub U of U is UE ⁻U/3 divided by 3² is 9.
01:15:51.000 --> 01:15:56.900
My range for gamma distribution is U goes from 0 to infinity.
01:15:56.900 --> 01:16:06.500
I found my density function for U.
01:16:06.500 --> 01:16:09.200
That is it, let me review the steps there.
01:16:09.200 --> 01:16:13.100
It was given that we had exponential variables.
01:16:13.100 --> 01:16:19.100
The first thing I did was, look up the moment generating function for the exponential variable on the chart.
01:16:19.100 --> 01:16:26.600
It is β T in general, but β is the mean of the exponential distribution, that is 3, in this case.
01:16:26.600 --> 01:16:31.300
We are given that it was 3 and U is Y1 + Y2.
01:16:31.300 --> 01:16:37.800
If I want to calculate its moment generating function, it converts addition into multiplication,
01:16:37.800 --> 01:16:42.100
using the fact that we have independent variables there.
01:16:42.100 --> 01:16:50.000
I multiply together two copies of 1 -3 T⁻¹, I get 1 -3T⁻².
01:16:50.000 --> 01:16:54.500
I go back and look at the chart, and I'm looking at my continuous distributions.
01:16:54.500 --> 01:17:01.900
I'm saying do I recognize this moment generating function.
01:17:01.900 --> 01:17:14.100
And I say, yes this is the MGF, the moment generating function for the gamma distribution because,
01:17:14.100 --> 01:17:20.400
the moment generating function for the gamma distribution has this form, 1- β T ^-α.
01:17:20.400 --> 01:17:26.000
I just recognize that this is the right thing with α = 2 and β = 3.
01:17:26.000 --> 01:17:31.600
I know I got a gamma distribution and I know my formula for gamma distribution,
01:17:31.600 --> 01:17:35.700
my density function for gamma distribution is just given by this.
01:17:35.700 --> 01:17:39.900
This comes from our earlier lecture on the gamma distribution.
01:17:39.900 --> 01:17:43.900
You can go back and look that up, if this formula seems to come out of left field.
01:17:43.900 --> 01:17:49.800
And then, I plugged in my α and my β.
01:17:49.800 --> 01:17:55.900
Remember, the γ of N is just N -1!, if N is a whole number.
01:17:55.900 --> 01:18:01.900
Γ of 2 is just 1Factorial which is just 1.
01:18:01.900 --> 01:18:11.900
I just simplified everything here and I got down to UE ⁻U/3, they are all divided by 9.
01:18:11.900 --> 01:18:17.500
My range for the gamma distribution is going from 0 to infinity.
01:18:17.500 --> 01:18:21.100
That wraps up our lecture on moment generating functions, this is kind of a long one.
01:18:21.100 --> 01:18:23.800
I really appreciate if you stuck with me through all of that.
01:18:23.800 --> 01:18:31.500
That wraps up this three lecture series on finding distributions of functions of random variables.
01:18:31.500 --> 01:18:38.200
We had one on distribution functions, one on transformations, and now this last one on moment generating functions.
01:18:38.200 --> 01:18:42.300
Next up, we are going to talk about order statistics, I hope you will stay tuned for that.
01:18:42.300 --> 01:18:48.100
This is part of the larger series of probability lectures here on www.educator.com.
01:18:48.100 --> 01:18:52.000
I, as always, I’m your host Will Murray, thank you for joining me today, bye.