Moment Generating Functions (Part 1)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this sequence of videos we're going to be learning about moment generating functions so first of all before we actually start generating these moments let's figure out what a moment is so what's a moment well it's related to an expectation so if we wanted to know what the first moment of a random variable is we just take the expected value of that random variable and if we want the second moment of a random variable X then that is the expected value of x squared and more generally we can look at the case moment and that would be the expected value of X to the K I'm also useful is central moments so when you have a central moment we have the random variable - its expected value so the case central moment would be the expected value of the K power of X minus the expected value of X all right so this is what moments are and it would be nice if we could calculate lots of moments quickly so instead of having to calculate this expectation and then this expectation and this expectation would be nice if we could have a pretty straightforward way to calculate a bunch of them so what we're going to do is use a moment generating function or MGF alright so let's define an MGF so if we have a random variable X then the moment generating function for that random variable is denoted by capital m and then a subscript X and then parentheses T so that's how we do note the MGF and how we calculate it is it's the expected value of e to the T X all right so we know that if we want to calculate the expected value of some function of X we need to either take a sum or an integral depending on whether we have a discrete random variable or a continuous random variable so if we're in the discrete case we know that we calculated an expected value by taking the sum over all the possible values that our random variable can take on and we have e to the TK times the PDF evaluated at that value K and then if we have a continuous random variable this expected value here is an integral over all the values so from negative infinity to positive infinity of each of the TX times it's PDF and of course we're integrating with respect to X all right so this is our definition of MGF and of course we can only use this if these expected values exist so they need to exist for some T in a neighborhood of 0 if this expectation does not exist then the MGF does not exist so that's our definition of MGF now we need to think about how we actually use it to generate our moments so what we're going to do is take our MGF and then take derivatives so if we want the nth moment of X then we're going to take n derivatives with respect to T and then evaluate at T equals 0 so if we want the first moment then we take our MGF take one derivative with respect to T and then evaluate it at T equals zero all right so that's our definition and then that is how we use the MGF now for a lot of students and people this looks very strange it's like why is the MGF defined as expected value of e to the TX it kind of looks like this magical thing and then you just do this weird derivative and evaluation and all of a sudden you have the moment so let's talk about why this actually works so if you remember back to maybe calculus then the e to the X is equal to 1 plus X plus x squared over 2 factorial plus X cubed over 3 factorial plus X to the 4 over 4 factorial plus and just keep on going forever so what that means if we want to have e to the T X instead of rather than just e to the X we will just write T X instead of X all through here so each the TX is equal to 1 plus TX plus T squared x squared or 2 factorial plus T cubed X cubed over 3 factorial plus go on forever all right so so far we've just used a kind of basic calculus statement and now we're going to take the expected value so we're gonna now have X be a random variable so we take the expected value of each of the TX well we know that expected value is just linear so we can just take the expected value of this plus the expected value of that plus the expected value of this plus the expected value of this plus blah blah blah so let's go ahead and do that expect expected value of 1 is 1 expected value of T times X well T is a constant so we have expected value of TX as T times the expected value of x and then the same thing goes here T is a constant so we'll have T squared over 2 factorial times the expected value of this which is expected value of x squared and so on plus T cubed over 3 factorial times the expected value of x cubed and so on all right so that's our moment generating function and now we're wondering well why does it work to find our moments so let's try finding our first moment and see why it works out so to find our first moment we know we need to take one derivative with respect to T and then evaluate at T equals 0 so let's take one derivative with respect to T and then evaluate at T equals zero if we take a derivative of this with respect to T at zero if we take a derivative of this with respect to T well e of X is a constant with respect to T so then we just take the derivative of this which is one then and multiply it by e of X so we just end up with expected value of x all right if we take the derivative of T squared we get two times T the twos will cancel so we end up with T times expected value of x squared and then we just keep on going like that and then evaluate at t equals zero so when we evaluate at t equals zero obviously this is already zero this has no T's so if we plug in two equals zero nothing happens it just stays as expected value of X if we plug in T equals zero here we get zero and we know that we're going to have T's all going past this so we'll have plus zero plus zero plus zero and so on so if we take our MGF take a first derivative evaluate at T equals zero we get a bunch of zeros plus expected value of x so that is exactly what we were hoping we were hoping that taking a first derivative evaluating it to equal zero would give us the expected value of x and that worked out so that may satisfy your curiosity at this point but we can just do one more just to kind of solidify things get the pattern down so if we take one more derivative with respect to T and then evaluate at T equals zero then we're going to get zero plus zero plus x squared plus T X T times the expected value of x cubed plus and so on and then we evaluate at T equals zero so we'll get zero plus zero plus the expected value of x squared plus zero plus zero plus blah blah blah so in other words we end up with the expected value of x squared or in other words the second moment of X all right so hopefully that helps us understand like what is a moment what's a moment generating function how do we use it take derivatives evaluate at T equals zero and why it works out
Info
Channel: Professor Knudson
Views: 57,518
Rating: 4.8611345 out of 5
Keywords: probability, moment generating function
Id: dVRWBmykncQ
Channel Id: undefined
Length: 8min 25sec (505 seconds)
Published: Fri Oct 26 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.