 So, we will continue. So, we discussed CDFs properties of CDFs. So, we said that CDFs have the have 4 fundamental properties they start off at minus infinity they start off at 0 end up at plus 1 at plus infinity. And everywhere in between it is monotonically non decreasing and they have to be right continuous right. Conversely I also orally mentioned that if you give me any function at all which has these 4 properties it will be the CDF of some random variable. So, this converse result the proof is available in Grimett and Sturzaker for example, if you can explicitly construct a random variable. So, given any function with these properties you can explicitly construct a random variable whose CDF is the function you want. So, these 4 are the only fundamental properties so to speak there are no more properties that generally define a random variable CDF. So, today we will move on to types of random variables. So, remember that a random variable. So, you are looking at some probability space omega f p right and the real line sitting here and your random variable maps each elementary outcome to a unique real number x of omega. So, this will be x of omega what we said is that pre images of Borel sets are f measurable and that essentially implied that there is a probability law p x right from the Borel sigma algebra to 0 1 which is a probability measure on r b r right. Effectively the random variable pushes the measure p on to the real line and you have a measure induced measure is p x probability law p x. Now, you classify random variables as belonging to various types based on the nature of measure induced on the real line namely based on the nature of p x. Now, I have to tell you what nature of p x is what do you mean by how many types of measures there are and so on right. So, it take so it turns out that there is a very fundamental theorem in measure theory that says that there are only 3 fundamental types of measure on the real line any probability measure on the real line will have to be are only fundamentally of 3 types or they can be of some combinations thereof. So, you are already familiar with 2 I believe right. So, 1 is what you call a discrete random variable right that is something you are used to there is and then you are also used to what is known as a continuous random variable right. These things I will define very precisely, but you for now you know colloquially roughly that you know that there are discrete random variables and continuous random variables and you also know that you can have a mixed mixture of these 2 right. The mixture is not a fundamental type of a random variable right it is just putting this and that together right you can put on maybe on a discrete set you put some probability and on some yes and then you put some probability on some interval or something. Now, there is actually a third fundamental type of probability measure on the real line called a singular measure singular random variable this singular random variables you probably would not have encountered. So, far for the reason they are perfectly valid probability measures they are neither discrete nor are they continuous. In fact, they are not mixtures either there is a fundamentally new type of a probability measure that you would probably not have encountered. So, far the reason is the reason you do not really encounter them. So, much is they are mostly of academic interest they are very bizarre they do not have any useful applications in particular right. So, there are totally 3 types of. So, there is discrete random variables there is continuous random variables I have not defined any of this I am just picking it out and then there is a third fundamental type called singular random variable and there is a very basic result in measure theory called Lebesgue's decomposition theorem which says that all probability measures on R any p x you consider will have to be only one of these 3 type or mixtures there of. So, how many types will you get totally? So, you can have this or that or that pure or you can have these 2 together these 2 together these 2 together or all 3 together in general right. So, each any measure on any probability measure on R can in fact be decomposed into a discrete component continuous component and a singular component this is what this famous theorem called Lebesgue's decomposition theorem says it is not a theorem we will prove it is something that it is good to know I mean again it is a fairly mathematical result and you will not worry so much about it all we need to know is there is no more only these 3 fundamental types and mixtures there of all measures probability measures on R only fall into these 3 categories or mixtures there of. So, there are 7 types of random variables on R cannot 3 you are used to 3 right discrete continuous mixtures of discrete and continuous in fact there is one more fundamental type of random variable called singular random variable which you would not have encountered because it is very bizarre and not very practically useful, but it is nevertheless a valid probability measure singular random variables are there any questions I have not told you what they are right I mean I have to define 1 by 1 I will define. So, shall we move on to discrete random variable. So, the nicest type of random variables are discrete random variable just like the easiest type of probability measures were discrete probability spaces. So, discrete random variables are also the easiest to study. So, a random variable x is said to be discrete definition if there exists a countable t subset of R. So, a countable boreal set so this must be boreal well. So, what they say discrete if there is a countable actually this is a countable set. So, it is automatically boreal. So, I do not even have to say this. So, such that what do I want to say p x of e equal to 1. So, actually I do not even strictly have to say this because it is implied by the fact that it is a countable set he all countable sets are boreal. So, I was about to say o e has to be boreal because I am talking about its p x, but the fact that it is countable means it is automatically boreal. That is all there is. So, what is a random variable what is a discrete random variable the random variable which puts all its probability the probability of 1 rests on a countable set. So, there exists some countable set e whose pre image has probability 1. The one little where see I could have see I did not quite say that the range of the random variable is countable. Also I mean that is also not terrible that is also an definition except that this definition allows for some measure 0 some points of measure 0 here being mapped to outside e also. So, there exists some countable set e whose pre image is not necessarily a sample space, but some set of probability 1. That is what that means which means the probability 1 the random variable takes values in a countable set. The only difference here. So, let me say in other words x takes values in a countable set almost surely with probability 1 it takes values in a countable set. So, you can write e as let us say e 1 e 2 dot dot dot is a countable set after all and with probability 1 it only takes those discrete set of values. There may be some omegas which in some set of probability 0 which takes values outside the set e which is why I did not say that the range is necessarily just a countable set. They are almost the same, but not quite the same because they could be some measure 0 set here which maps outside e right, but as long as it has probability 0 it is the sample space is omega. So, this is a random variable x. So, this is a random variable from omega to r as usual. So, what I am saying is that it is a discrete random variable if the set of values it takes an r belongs to a countable set with probability 1 that is it p x of omega you know p x is only defined for Borel sets subsets of r right, p x of r is always 1 because it is a probability measure on r. I am saying that all the probability rests on see this r has probability 1 there is no doubt about it because it is a probability measure. I am saying all that probability rests on a countable set right. So, the probability of the random variable taking values outside this countable set is 0 which is a little bit different from saying that the range of the random variable is only countable slightly different because you could have some 0 measure sets which map outside e right fine this clear to everybody. So, in particular if you write e see e is a countable set. So, it has a listing right. So, if I write e as e 1 e 2 dot dot dot it could be finite or countably infinite if it is finite I will write e 1 e 2 e n it is countably infinite it is e 1 e 2 dot dot dot let us say it is e 1 e 2 dot dot dot then I essentially have that p x of e is 1 right. So, but p x of e see these are all singletons right these e i's are just real numbers right. So, what can I say? So, p of p x of e can be written as the sum of p x of these singletons y. So, yeah because it is countable countably additive know. So, of course, I am assuming that the e i's are distinct if you just write e i belong to r distinct right. So, then you have p x of e which is 1 right is equal to sum over i p x of what the singletons e i. So, in other words this can be written as sum over i equals 1 through infinity probability that probability of omai. So, this is probability measure on r I can transfer it to the probability measure on the original sample space and write probability of omega such that x of omega equal to e i right. But, I no longer write that I will only write x is equal to e i if you want you write I mean if you prefer x i you can write x i here x is equal to x i is probably little nicer right. So, this is the random variable has all the probability sitting on this countable set. And there is sum and if you specify the probability of each of the singletons values that it takes you essentially specify the entire measure p entire measure right. So, if you if you give me any borel set on r what would be what would be its probability law and probability p x. So, for any for any b in b p x of b under this particular set measure will be sum over how do I write this sum over all the i such that e i belongs to b probability that x is equal to e i I just have to this is a complicated notation I am simply saying that you look at all the e i's that exist in your borel set simply add their probabilities that is all you need to do to find the probability measure of any borel set is that clear any questions. You can define this state and so omega can be anything the omega does not have to be countable or uncountable or any such thing I am just saying that the random variable has to take values in a countable set with probability 1. So, you could have omega can be 0 1 for example, but the random variable could simply be some indicator random variable for example is clearly a discrete random variable right because when it takes 2 values right. So, you can have indicator of any set on 0 1 so many borel set on 0 1 that will be a discrete random variable right. So, omega can be uncountable also no problem so this is. So, generally so if you specify this right then you are basically specified the probability law completely because I have explicitly written down the probability law for every borel set in terms of that guy right. So, this thing is called the probability mass function. So, definition the function little p x which is equal to the probability that x is equal to x is called the. So, this is for p x of x p x of little x is called the probability mass function of x. See this definition you can make for any random variable right I mean I am just so after all x is equal to x is a I mean this is a single term set and you can always talk about its probability. And you can define the probability mass function for any random variable nothing stops you from doing that, but for a discrete random variable the nice thing is that the probability mass function completely specifies its probability law right. So, if x is discrete. So, what you have shown here is that if x is a discrete random variable the probability mass function this is p m f completely describes the probability law of x as we have shown here right you should probably just write this down here because it specifies the probability of any .boral set right. So, this for the values that it does not take it. So, this will be 0 I mean if outside the set E right this guy will be 0 no problem right you can define it for all real numbers, but it will only be non zero for these E is you can define it for any kind of a random variable I am just saying that for the discrete random variable it captures everything there is to capture about the random variable for continuous or singular it will not capture actually it captures almost nothing if the probability mass function really captures the probability law for discrete random variables. So, that deals with the probability law how will the c d f of a discrete random variable look it will have a number of steps right. So, it will be it will have several discontinuities. So, if we are trying to plot for this random variable. So, if I try to plot f x of x against x. So, may be my E i's are like that right. So, may just for so if my E 4's are like E my E's are like that then we will start of it 0 and that each point it will jump by an amount p x of E i right. So, it will let us say that there is nothing here there is no E i's here just for the sake of argument then this guy will start from 0 jump solid dot here hollow dot here right to main flat until you see the next E i and again jump solid dot here hollow dot here. So, one right here again jump hollow dot jump that is it right this is how the one that will be 1. If it is I mean I am only plotting for finite number of E i's right, but if there are a countably many E i's countably infinite E i's then there will be countably infinite any discontinuities right. So, that is how a typically how a CDF of the discrete random variable looks. So, I usually see the if you specify. So, on the height of each of these jumps for example, this jump will be p x of E 4 right. So, each jump corresponds to the probability that x is equal to that E i right. So, if you specify the PMF you can get the CDF right you because you simply put in that much jump this is the CDF capital F x right. See the mass function is you can define it for all x it will be 0 except at the E i's where it takes value equal to p x of E i's it will not have jumps it will simply be like sticks right it will just be like a discrete right. So, remember see I mean this discrete random variable can actually be fairly complicated in the sense that this E could be rationals. In that case it is not nicely separated sticks standing everywhere right it could you could have a distribution over the rationals right. It may not be as simple as you think it may not be as nice as you think here right you can put some measure on the rationals in 0 1 right you can do it you want right. For example, if you want if you want to put a measure on the rationals in 0 1 1 valid probability measure would be to simply arrange the rationals call q n your n th rationals in 0 1 and say probability the probability x is equal to q n is equal to 1 by n square or something like that appropriately scaled. So, there it adds up to 1 right that is the discrete random variable right because all the probability measure is on the rationals see what I am saying, but your CDF will not CDF will be very bizarre it will not be like this right you have to it will jump at all these rationals points correct. So, although you are used to some nice discrete CDF like this, but discrete random variables can also be a little bit counter intuitive or bizarre in the sense that it may not look like nice steps going up, but the random variables that are practically used often are in fact quite nice the discrete random variables. So, I will give some example if there are no more questions on the theoretical bit I will give some examples. So, you will know you will notice that I deliberately being avoiding examples right. So, I want to keep a certain level of abstraction going. So, that you get the abstract understanding first right you can always give examples later, but I want that abstraction to you know keep that thread to be going all along right. So, now I will give example of some popular discrete distributions. So, in all of this so I am going to give examples of discrete random variables. So, I will not mention what the probability space is I will only talk about the RBRPX. I told you that once you have the random variable and your probability law it is you can just if you do not have to worry about omega f p anymore right. So, in order to describe a random variable I just need to supply PX to you right what the probability law is to you and in fact these are discrete random variables. So, I will just supply the PMF to you right the probability mass function then I have described the random variable the most elementary example is that of a Bernoulli random variable. So, this takes values. So, this E is simply 0 and 1 it only takes the set E has only 2 values 0 and 1 and PX of 0 is equal to 1 minus P and PX of you can have it PX of 1 is equal to P where P is some number between. So, this is Bernoulli random variable is a random variable that is essentially it is a binary value random variable and it takes value 1 with probability P and it takes value 0 with probability 1 minus P what sample space it is coming from is not very relevant here right. If you want you can take the sample space some 0 1 with Borel with uniform measure and say that if you random variable is in 0 P it is 1 or something like that if you omega is in 0 1 0 P you can say it is 1 right, but that is not important you do not worry about what omega f p it is this is what finally produces on the real line. And clearly this is it satisfies that this plus that must be equal to 1 which it is right and if you want to find the probability of any Borel set on R under this for this random variable what would you do. So, if you give some see this is something you have seen multiple times before, but now if I give you Borel set and I say what P x of B is what would you do look yeah look whether the Borel set if the Borel set does not contain any of these points the probability will be 0 if it contains only 0 it is probability will be 1 minus P if it contains only 1 it will be P it contains both it will be 1 right that is it for every Borel set you can specify. So, for example, this you can look at as the number you can toss a coin with tossing a coin with probability P and you are simply counting the number of heads if it is 1 heads probability P 0 heads probability 1 minus P and this is as simple as it gets any questions the second example I want to give is a uniform measure on a discrete set uniform measure on a finite set. So, if you have a set E equal to E 1 E 2 dot dot dot E n. So, uniform random variable I should say actually on a finite set. So, you are set E is now finite it is not even countably infinite then you the random variable that I am talking about. So, that is your E then your P x of E I is equal to 1 over n for all I for all I equal to 1 2 dot dot dot n. So, if there are if you are simply looking at. So, if you are just tossing a die and your random variable is that the trivial random variable that is simply tells you the phase of the phase on the die this will be 1 2 3 4 5 6 and you are putting a 1 over 6 probability on each of these elements. So, this is called uniform random variable you can only do it for a finite set right if you do it for a countably infinite set it would not work out right because I mean they would not add up to 0 I mean they would not add up to 1. So, it cannot work out. For a countable set you cannot put a you cannot there is no way to define a uniform there is you cannot put if you put any non zero mass or at any point it will go to infinity right. But, if you put 0 mass it is a countable set it will go to 0 right there is no nothing you can do. So, countably infinite is a no go for uniform measure if you have an uncountable set you can put uniform measure that is a different story right there is no you cannot do it there is no way to define a uniform random variable on a countable set countably infinite set. So, that is also a simple example let us move on to let should I give you also let us say I will give you a example of a geometric random variable. So, the geometric random variable is has the values it takes are in fact basically n it takes values in n which is a countably infinite subset of r right. So, that is the first one you are encountering which is this is finite that is finite which is infinite countably infinite. So, now for each. So, what do I have to do I have to specify the probability mass for for each natural number that is all right. So, I have to say that p x of k which is nothing but the probability of x is equal to k everywhere right k is equal to for the geometric random variable it is 1 minus p raise to k minus 1 times p where again p is some parameter between. So, k is in n and p is p is in 0 1. So, and in order to verify that this is a valid p m f you have to verify that the summation has to go to 1 right and if you sum this you get a geometric series right which and then you will very trivially see that it goes to 1. And that is why it is called a geometric random variable because in order to if you sum this up you get a geometric series. Yes, that is the interpretation as I just said right you you can just toss a n faced die of something you say x of omega is a trivial random variable right. So, here so a geometric random variable it puts a geometric measure on r on n for 1 thing right we have already encountered geometric measure on n right. And this is how it looks and it has the interpretation that if you have. So, you have number of if you have what is known as independent Bernoulli random variables right you have not come to independent of random variables yet. So, if you let say so this is like a tossing a coin and tossing a toss a number of coins independent independently the first the probability that this is the probability that you will encounter your first head in the k th toss that is the interpretation this has. So, the number of tosses you have to wait until you see a head right that is the distribution it has a geometric distribution if the coin tosses are the if these are independent coin tosses right. But, for now I am just talking about its PMF any questions on this another related random variable is called the binomial random variable it takes values again. So, here the set E is 0 1 2 dot n which is a finite set and p x of k is equal to n choose k p power k 1 minus p power n minus k for k and e and p n 0 1 n choose 0 is taken as 1 you know what n choose k is right. So, this again is closely related to the Bernoulli random variable if you have a number of these independent coin tosses it is if you have n such independent coin tosses this is the distribution of this is the this corresponds to the total number of heads right this corresponds to probability of getting k heads in independent coin tosses. So, this and this are closely related in fact Bernoulli leads to both geometric and binomial very direct way. So, there are see there are so many examples there is negative binomial multinomial it is a huge I am not going to give you all possible examples of discrete random variables I will just give you one more for so here your E is a 0 1 2 dot it is whole numbers is all of whole numbers which is a countably infinite set and you have p x of k is equal to e power minus lambda power k by k factorial where for k equal to 0 1 2 dot and lambda is some parameter that is strictly positive and 0 factorial is taken as 1 this is your Poisson random variable and this also you can verify the random variable because if you sum over all k that is simply your expansion of e power k right. So, e power minus e power lambda so we will get one. So, these are some popular very very routinely encountered examples of discrete random variables it is by no means all right you can any you take any discrete set you like any countable set you like and you put any numbers on that countable set which add up to 1 that is a valid that is a very valid that is it right discrete random variable. So, if you want another example I am if you are a nameless example you want maybe it has a name. So, if you want e let us say e equal to n again let us say p x of k is equal to 6 over pi squared 1 over k squared right this is a p m f because that summation goes to pi square over 6 right. So, that is a valid p m f I I do not know it probably has a name I do not know the name if it has one just something I made up that is also a discrete random variable and any questions these are the simplest kind of random variables no questions. So, if there are no more questions I will stop and next week we will move to continuous random variables.