Probability Distribution Functions (PMF, PDF, CDF)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] I'd saved Justin's lt'sa here from said statistics calm coming at you today with a video on probability distribution functions now this video was actually requested by one robot II sanam I'm gonna give a shout out to cuz I thought it was a great idea for a video and as I do on this channel I keep things very intuitive I don't use a lot of formula and it's something that's going to be hopefully useful for you to wrap your head around the concepts so come along with me as we dive and straight into probability distribution functions now straight off the bat I just need to get some terminology out of the way hopefully if you're watching this video you're familiar with the concept of discrete and continuous variables if you're not don't worry we're going to deal with them individually in this video but four discrete variables they have this thing called a probability mass function which is just a simple way of saying the probability of each discrete outcome now that's given the three-letter acronym a PMF that you might see around the place and this compares to the PDF or probability density function which we use for continuous variables but again it's just like the probability of particular outcomes on a continuous distribution but it's slightly different so we're going to call it the probability density and we'll see why that is a little bit later now be careful about PDF because I've called this whole video probability distribution functions now some people might call probability distribution functions which relate to all of these together as PDFs which does get a bit confusing doesn't it but I use PDF to mean the probability density function which relates solely to continuous variables and I think most statistical resources will do exactly the same but just be careful with the term PDF now both discrete and continuous variables can construct what's called a cumulative function and we'll see what these look like just in a second but they use the common acronym CDF to mean cumulative distribution function so let's dive in to my first example which is going to be a discrete variable and this is one again that you might be able to intuit rather easily let's talk about a dice now one dice has six possible outcomes and each of those possible outcomes has the probability of 1/6 and we would call this distribution we'd call this the probability mass function just like we described on the previous slide it's a discrete variable because it can only have outcomes one two three four five and six you can't roll a 2.5 or a four point one three so this is a variable with discrete outcomes in other words a discrete variable now I've written 1/6 here because we know there's six equally possible outcomes but I might just use decimals here because it's gonna help us a little bit later so hopefully you're okay with me putting this at around 0.167 or so which of course just represents 1/6 now what we can do is we can construct the cumulative probability not just the probability but the cumulative probability but what does the word cumulative actually mean well you can see that on this side we go from 0 to 1 so the scale is actually a little bit different to the scale on our original probability diagram over here so what am I do just quickly is change the scale on this side so that it matches so if we're looking at the cumulative probability diagram let's just pick one of them and let's just say we're looking at the height of the cumulative probability for outcome for now what the height of this represents is not the probability of rolling a four it's actually the probability of rolling a four or less and the way we can describe that is by saying the probability of X being less than or equal to four so in other words have to sum up the probability of rolling a 1 plus the probability of rolling a 2 plus the probability of rolling a 3 and also four so what's essentially happening here is we're summing up all of the areas of 1 2 3 & 4 on this side you can see if you kind of stack these little bars together you'll get the height at 4 so quite clearly then one of the properties of a cumulative distribution function is that the final bar needs to be 1 it needs to get to 1 by the end because don't forget the probability of getting a 6 or less when you're rolling a dice has to be a hundred percent right you can't roll a 7 on any dice I've seen ok so I might just put this scale back to the original scale so we can have a little bit more ease at distinguishing things but what I wanted to do is just muck with this a little bit so it's no longer just a perfect uniform distribution like it is here so let's pretend now that the dice is rigged such that it can't roll threes or fours in other words the probability of rolling a 1 2 5 or 6 is 0.25 is 25% for each of those possible outcomes which sounds a bit silly but I used to use a dice rolling app on my mobile and I actually found out that the algorithm they were using was under representing threes and fours in it and boy did I write a sternly worded review on the iTunes Store but that's another story what I want to look at here is how this represents changes now in the cumulative probability so you can see that we actually get a nice flat gradient around 3 & 4 here because there is no 3 & 4 in the PMF so the probability of getting four or less he's kind of going to be the same as the probability of getting two or less in fact it's going to be exactly the same because there is no probability of 3 & 4 individually right so you can see that flatness here on the CDF indicates that there is no mass if you want to call it that in our probability mass function around 3 & 4 so that's going to come back to us 1 start looking at continuous distributions so we've pretty much dealt with the top half of this little flow diagram and in this next section we're gonna have a look at continuous distributions so let's jump straight into that and see how it differs so my continuous distribution I'm gonna use is the height of women it's a classic example that everyone can kind of visualize so it makes it pretty simple and I've got my good friend penny over here who's telling us that indeed female heights might be distributed with a mean of 165 let's say that's 165 centimeters is our mean and it has some kind of standard deviation such that by about 140 centimeters you're not getting too many women of that height nor are you getting too many women up at 190 centimeters either it's a completely theoretical distribution but just one that I think is quite simple now I'm hoping that you realize here that height is not a discrete distribution in fact it's a continuous distribution because you can be a hundred and sixty five point three eight seven centimeters or 165 point three eight seven six eight four etc right so it's a continuous variable so we call the distribution here the probability distribution we call it a PDF a probability density function and if you're a little bit ahead of me you might have a look at the probability on this side which says 0.01 0.02 0.03 etc and you might be asking one of these numbers actually mean what does it mean that this probability density at 165 at the mean is about 0.04 what does that mean is there a four percent chance of being a hundred and sixty-five centimeters tall well not quite it's almost that but we'll have a look at that in just a second so hold that thought but for the moment let's just appreciate this nice bell curve shape which we can call the probability density function now if we're going to look at the cumulative probability we can call it the seed again the cumulative distribution function and much like in the discrete case the axis here must go from zero to one anyway this nice s-curve here it's called an s-curve actually he's a very typical curve that you get from a normal PDF anything that looks bell-shaped in it's probability density will look s-shaped in its cumulative probability so what I'm gonna try to do now is link the probability density function the PDF with the CDF and see if we can get from one to the other so I'm going to start on this side and I'll select the mean value of 165 now because it's the mean we know that the proportion of the distribution to the left of that mean is going to be 50% so the yellow shaded region here is 50% of the whole distribution and in fact that's what's going to be represented on the CDF over here at 165 it goes up to a value of 0.5 so this tells us that 50% or 0.5 of the distribution has elapsed at this point or if you want to use different terminology you can say we've accumulated cumulative we've accumulated half of the distribution by the time we get to 165 centimeters so then if we were to choose a point say before 165 maybe the point where there's only 25% in this left-hand region and let's just say that that occurs where the height is a hundred and fifty eight centimeters so of course we can look at the CDF again and we can see that one hundred and fifty eight matches up with the value of 0.25 so in essence these numbers here are telling us how much of the distribution is to the left of a given height okay so that's how you can derive the cumulative probability from the probability density function but can we go the other way it's a little bit more involved but follow me we're gonna zoom in now on the cue of probability so let's take 165 again remembering that that's where we've accumulated half of the distribution my question to you is how much of the distribution is going to be around 165 and can we gage that from our CDF from this cumulative probability well of course we can and the way we do it is we look at the gradient of this line think about it the higher the gradient the more of the distribution that must be hovering around 165 if this was nice and flat remember what happened in our discrete example when it was flat that meant that none of the underlying distribution was around there remember there was no threes and fours and so our cumulative distribution for our discrete example was nice and flat at that point you can see that the higher the gradient the more of the distribution is going to be in that area so let's find the gradient at 165 now for those of you with a background in calculus you've got a way of doing this but even for those that don't I want to do it this I want to do it a simplified way so we get a real sense of what's going on and if you go back to your year 9 here 10 mathematics we know how to find a gradient and all we need to do is construct a sort of little interval here around 165 and we're going to pick two points that are very close to 165 and let's choose 164 and 166 so if you go down just one centimeter here to 164 or up one centimeter to 166 you're gonna get these two points here and we know how to find a gradient between two points it's the rise over the run and you can see that the rise here is about 0.08 and these values have just been calculated using Excel because Excel has lots a bunch of statistical functions so I just found those out using Excel and the run is going to be two so if you did this calculation you get point zero four so that's the approximate gradient at 165 and have a look at the PDF you can see that it goes to 0.04 so this probability density these values here essentially represent the gradient of the CDF in other words you can see that the gradient Peaks right in the middle of this CDF the gradient is much smaller down this side and also it's smaller up as you get close to 180 and 190 centimeters and that's reflected in the PDF you can see that we have this crest at 165 centimeters the crest tells us that the gradient is maximized at 165 so there you go to summarize then we can get from the cumulative probability to the probability density function by calculating the gradient so the gradient of the CDF is the PDF and if we find the area to the left of a given point on the PDF we'll get the value for the CDF so they're very much related now if you have done some calculus you might be able to put this in terms of differentiating and integrating and for those of you that are comfortable with with that I might just call here the PDF I might call this lowercase F x for the sake of the formulas to come and the cumulative probability the CDF is going to be capital f of X and this is quite common terminology usage here so you might see lowercase F and uppercase F s that's used quite a lot for PDF and CDF respectively so for those people comfortable with calculus you can see that the differential of the CDF is going to be equal to the PDF so that's going this way going from right to left alternatively the integral of the PDF from negative infinity to X becomes the CDF now I did think about actually providing some examples of this but I thought that that would make the video too long and there is a wealth of resources on the internet helping you differentiate and integrate functions this video was just about the graphical representations themselves and that brings us to the end hope you have enjoyed that and found that quite useful I've got a whole bunch of videos now up on Zed statistics dot-com it pretty much covers first and almost parts of second year university so check that out I would recommend it and please keep the suggestions coming I really appreciate the feedback hit me up subscribe to the channel and do all those lovely things for me if you can I'll see you later [Music]
Info
Channel: zedstatistics
Views: 428,214
Rating: undefined out of 5
Keywords: PDF, CDF, PMF, Probability Distribution Function, PDF and CDF, Cumulative Distribution Function, zedstatistics, zstatistics
Id: YXLVjCKVP7U
Channel Id: undefined
Length: 16min 16sec (976 seconds)
Published: Sun Mar 01 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.