Introduction to Probability Generating Functions

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone um today we are going to start our next topic which is probability generating functions it is a year to statistics topic so we're carrying on with statistics it's a year to topic and normally I would be teaching this to you in the first couple of weeks of September obviously we're a bit ahead because we didn't have we didn't have our exams and so I thought I'd start teaching it to you now and well that doesn't mean though is that I want you to be super chill about this and not do it okay because um it's quite a tricky topic we've got quite a few tricky topics to do um next year obviously and so they're quicker we do the quicker we get through this all the better we understand this now these it will be next year I'll let our topic after base which will be starting to uh September will be complex numbers and that is a really tricky topic so it'd be fantastic we could have the whole of the first term focusing on that okay so it's really really important to me that you get your this off in the locker and you're happy with it okay so it's called property generating functions which we abbreviate to PDFs and all of probability generating function is is a mathematical function that stores details of a probability distribution okay it can only be used with discrete probabilities so at discrete probability distribution that takes non-negative integer values okay so for example the binomial distribution or the Poisson distribution would be suitable distributions to include PDFs okay now every year that I've taught their sixth it was new to the day level when it went the year level change a couple of years ago um and I think the the biggest problem that the students have is trying to understand what a PDF actually is okay but basically all it is is if we have a probability mass function and I promise you that is a probability mass function okay the probability of X is equal to X it's a way of writing a function for those probabilities okay and so if you have a discrete random variable and that has got a probability mass function where the probability of x equals x so you know all those probabilities then the probability generating function is denoted by this G of X with respect to T so this X is a little subscript the X referring to this random variable X okay of T what a faulty me in the minute is the sum of all of the probabilities of each for rinsing times T to the power of what the variable that they are representing okay now this T is a dummy variable now what that means is we could we could substitute in any value of T and it would work it's like a placeholder okay so I've just tried to write a bit more about what yeah a probability generating function it is so it gives us it gives an equation if you like or a power series that it represents the probability mass function this p of x equals x okay and it it's used because you can just see them see viral equation what is happening with your probability mass function okay now this variable t which we call a dummy variable that is just like a placeholder so that we've got something to raise to the power and the power is the thing that's important because that is our value of x okay now that is my best explanation for it so come back again once you've done that once you've gone through the whole video come back again and we listen to what I've just said and see if it then makes a bit of sense I'll send you all my notes on it as well so that you can umm so you can read through those and that might help a bit okay if at all the things I've just said sort of mean nothing to you don't hun it because we're going to do some examples and it become much clearer okay so we're gonna I'm gonna just show you sort of how it works okay so let's say I've had a variable X if we any sort of variable and X I'd it might be the number of times I need to know the number of sixes I get when I roll a dice 20 times okay for example obviously it's not going to be a proper dice and this is my table of results so it must be a four-sided dice it's got these on it anyway so I the probability of it getting the 0 times is not point to probably two one times not point three probably to two times not quite three and the probability I throw it 3 I get three sixes would be nought points it will not point to okay so this is saying I must only roll the dice three times and the maximum number of sixes August I can therefore get is three if it was dice for example and I'll even dice unfair anyway so if this was the case if this was my probability mass function that this is what we would call a probability mass function because it gives us our probabilities that x equals x that makes it a probability mass function okay so if I keep talking about priority mass function that is what I mean I mean that table okay so if this is our policy mass function then the probability generating function ie the PDF is given by this equation down here which I wrote on the last piece of paper on the other side so it's the sum of each of the probabilities x by T to the power of X okay so these at this x mean refers to these X's so 0 1 2 & 3 and the P the probability of X is obviously these ones okay so for the first one we're going to do the probability of X is naught point 2 times T to the power 0 so not put 2t to the 0 and then we do miss some of them so we're plussing naught point 3 is the priority times T to the power of our X is 1 okay so the teens just in that position so that we can raise it to the power okay that's all that means it's just a dummy placeholder okay and then plus because we're doing some off so naught point three eight T to the power of two and a lot point two T to the power three okay and then obviously you can just simplify that expression T to power 0 is 1 so that just becomes null point to 2 to power 1 it's just T so this whole probability generating function this PDF becomes all of that okay and the reason we do that is the whole idea of this is so that that is now a function a power series for this probability mass function which we've just made up okay it doesn't mean anything there's probably mass function it's just a made-up one so this is the PDF for that prophecy mass function and the PDF is just like us it's like a visual series of how the probabilities of this are gonna be okay now you will notice of course because we've got this T to the power of X that your your X is your variable so X is the thing that goes in these your x position okay and your coefficients of t are your probabilities okay that is the very nature of our PDF and that is what is important okay so if you had given this PDF you would then be able to go backwards and produce this table in the same way okay in the same way that we just undid it okay now what we will notice about this so I'm saying that T is a dummy variable it can be it's just a placeholder if you substitute one in is T ie you do G of X of 1 then obviously this would be one one's got T if T is 1 1 squared is 1 so this would be 1 this would be 1 this would be 1 so we'd have no point tube that's no place for you plus not quickly that's not point to which of course equals 1 and that will always happen because that is the point we've got to just squeak discreet variable means we can only have certain outcome so because we can only have certain outcomes that is always going to be the case okay so this is a very important piece of information that you need to be aware of okay it's a very important concept surrounding PGs okay that the G of X of 1 equals 1 so if T is 1 the whole G of X of T is 1 okay really important um and I just talked to you about this next a little bit but don't panic about it because we're talk about it another time but if we need we can also write our PG F in terms of the expectation now don't forget we've talked about expectations we first did it when we looked at discrete random variables expectation could also be the mean okay and it is given by our a of X okay that's what we mean that's how we know it normally okay but we can also we can say that these two things are equivalent if we have a probability generating function a PDF we could also say that's the same as our expectation of T to the power of X okay and that that quote just means exactly same thing here and all that means is that our that is going to give us them our mean value okay don't worry too much about that just so go with it for now okay and that's similar how can I make that similar if we did e to the a of ax you remember that a lots of e to the X yeah which is similar to what we've done here there's a sort of a to the X if you like and there is there okay right so let's kick us off with an example here we go so we've got that can we see that okay X's is a sweet random variable that denotes the absolute difference off the scores when two dice are thrown construct the probability distribution of X and write the PDF okay what do I mean by the absolute difference I mean it doesn't matter if it's positive or negative so if you're doing the score one take away the score of the other you just take the positive version okay so um what I'm gonna do here to help us visualize it is I'm gonna draw a sample space diagram I don't even know if you can remember what song because base diagrams are that this is giving us all the possible outcomes that's what a sample space diagram does so if you think about a dice or two dice they're being rolled when they are rolled obviously they can only show they're fair dice with you because it hasn't said otherwise one two three four five six okay so these are the options we can get what roll one dice and get one two three four five say for second eyes and get one two five six then we're gonna work out the differences now the differences just doesn't as I say it doesn't matter which so obviously the difference between one and one is zero difference between 2 and 1 is 1 3 between 3 and 1 is 2 difference between form 1 is there are three difference between 5 minutes for 6 and 1 is 5 etc thank and hopefully I don't need to go through the whole process obviously the diagonals will all be 0 because they're not going to be different and then we can just go through so that's 1 2 3 4 okay so those are our possible outcomes okay then I need to put this into a probability distribution that is the same I'm saying write down the probability mass function okay that is asking you to put it into a table so that's what we're gonna do now if you don't have to draw this sample space high ground then that's absolutely fine okay don't feel like you need to draw it just cuz I do I personally have to work out what's going on okay I just circled those that we didn't get confused so we can either have our absolute differences can either be 0 1 2 3 4 or 5 although I've done the team quite thick but there we go and so the probability of each of those are carrying the property of getting 0 1 2 3 4 5 6 6 out of 36 we're just getting 1 1 2 3 4 5 6 7 8 9 10 10 out of 36 1 2 3 4 2 4 8 over 36 3 over 36 it's gonna be no number 3 in 1 2 3 4 5 6 6 out of 36 then 4 out of 36 and then 2 out of 36 ok that is our probability distribution done that ok now we've got to do the PGA so all we need ahead of us is that table ok so a pgf by its nature is given by the sum off don't forget that sign means of some of the promise of x times T to the power of X ok so what we've got here then from our table I'm just gonna read it off the table straight under it so you can understand so I've got the probability of X is 6 over 36 T to the power 0 plus because I'm adding them all up turn over 36 T to the power of 1 plus 8 over 36 T squared plus 6 over 36 T cubed plus 4 over 36 T to the 4 plus 2 over 36 T to the 5 okay and then we can simplify it so um I don't know if you'll enjoy this but I'm gonna do it anyway let's uh let's do it step by step so that we know what I'm talking about so obviously that was just 3 over 36 and hello3 ever 18 I'm just gonna simplify all of them slightly first so that they've all got the same denominator but it's slightly simpler you don't have to go through quite the same notion I am like that and then I would just take out I'm thinking account I thought should I make this really tiny I'm gonna make it look nice for my probability generating function so I'm going to take out a factor of 1 18 so I've got 3 plus 5t plus 4t squared plus 3t cubed plus 2t to the 4 plus 2 to the 5 that is my property generating function ok and what that gives us is a is a series function it gives us a function that shows us this table that is the point in a primary generating function ok now you should be able to go from there back to this table is as easily as we've gone from the table to the PG a-- okay right yes here it is so the PGR for the discrete random variable X is given by G X of T it's K lots of 1 plus T all squares and we've got to find the value of K ok so um what do we know about probably generating functions well we know that all the probabilities in a discrete random variable so the sum of P of x equals x must equal 1 ok so that means if T is one we know that must be true I quote that on that one and earlier on when I talked through all of this stuff here it is the probably twenty is one they add up to one and it's because R P of X the sum of P of X has to be one okay and our probabilities are the coefficients of T okay that makes sense so when T is one they all have to add up to one that's why not have them okay so I can just quote that and then use that here so if I've got the G of X the G of X is one I've got K lots of one plus one squared must all equal one okay so that means that I've got four K must equal 1 because 1 plus 1 is 2 2 squared is 4 and therefore K must equal okay not complicated that bit right and then it says write down the probability distribution of X fantastic so what this is asking us to do is to go from a probability generating function and put it back into the table that's what I keep talking about so now we know what K is we can sort of think about what this means okay so there's our PDF let's tidy up so that we can actually understand what the hell's going on and we're gonna expand it obviously this so our PDF is 1/4 plus now actually when we're doing these it's probably much easier to go in ascending order of power okay because then what we're gonna do when we write it is our probability mass function the coefficient of the coefficient the power of T there is 0 the power of T there is 1 and the power of T there is 2 now don't forget I'm talking about the powers of T because that is what I promised you generating function is it's T to the power of X of the power refers to our x value so here T hasn't got a power so our x value is 0 here T has got a power of 1 and so on X 1 is 1 and here Tina's got a character so x1 is 2 and I don't forget that this is our coefficient of T so these probabilities are our coefficients so the properties will be being 0 is 1/4 probably assuming 1 is 1/2 and the probability being 2 is 1/4 okay and that is our probability distribution that is our probability mass function that is how we go from the PDF to the probability mass function okay I'm gonna ask you now to just try and get your head all around that and then have a go at exercise 7a in the booklet I'll be sending you and you'll have the word solutions as well okay no mean if there's any problems
Info
Channel: CallowayMaths
Views: 2,835
Rating: 4.9322033 out of 5
Keywords:
Id: qNiSUP4gIsE
Channel Id: undefined
Length: 18min 12sec (1092 seconds)
Published: Tue Jun 09 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.