 Today, we will start discussing random variables. Random variables are motivated by the following fact. So, when you have random experiment, the experiment may not be interested in the specific elementary outcome the results. So, the if you have a sample space big omega, the experimental may not really care about what specific little omega shows up. Here, she may be more interested in some numerical function of the elementary outcome. So, an example is that if you toss a coin 10 times, you may not be interested in what specific sequence of heads and tails resulted, but you may just want to know how many heads came up. So, that is a numerical function of your elementary outcome. The elementary outcome is a sequence of heads and tails, 10 long string of heads and tails and you simply counting the heads. And there are many more complicated examples, where your probability space and your elementary outcome may be something very complicated. So, if you are looking at something like weather as a random phenomenon, it is very difficult to even propose a proper sample space or you know talk about what the elementary outcome is, because it is a very complicated phenomenon. Whereas, you may just want to know what the temperature is, which is just a numerical function of the days elementary outcome. So, that is what motivates random variables. So, random variables are simply numerical functions of your outcomes. They are defined. So, it is a function defined on the sample space and it gives a real number in general. So, I will make this more formal. So, I just want to before I really formally tell you what a random variable is. I want to tell you what it is not, because it is a misnomer. So, a random variable is neither random nor is it a variable. This is something you have to keep in mind. So, it is not random. It is a deterministic function and it is not a variable. It is a function. So, it is a misnomer to call a random variable or random variable, because it is neither random nor is it a variable. So, this pictorially and I will keep drawing this picture a few times. So, this is your sample space and it is endowed with some sigma algebra and some probability measure. Omega p is a probability space given to you and a random variable is a map from omega to r. So, this is your map. We will call it x. We will always use capital letters to capital letters like x, x 1, x 2, y z, etcetera to denote random variables. So, normally for events and sets we use also capital letters, but we use letters like a, b, c. You may also use a, b, c for random variables, but we generally keep a, b, c, etcetera for sets and x, y, z for random variables to the extent possible and always capital. Random variables are always denoted by capital letters. So, what happens is, so you have this probability space and your goddess of chance picks a little omega. That is what happens in the random experiment. So, your little omega realizes and for every little omega there is a unique real number. This random variable identifies a unique real number. So, it is a mapping from omega to r and it is a deterministic mapping. There is nothing random about it. Once you fix your little omega, it is a unique real number. Every time for little omega is fixed, if for little omega 1 you may have some real number. Here for some other little omega 2 you may have some other real number. So, the only source of randomness in the random variable is the little omega itself. That is the only random thing in probability that little omega being selected by mother nature or whatever that is the only random thing. After little omega realizes, there is no randomness in the random variable. It is a deterministic mapping. You give an omega, it will give you x of omega. So, this will be x of that little omega and it will be some real number. So, capital X within brackets to denote the random variable which is the function itself and x of little omega will denote the specific value taken by the random variable when the elementary outcome is little omega. If you are talking about the specific, so if you want to say that the specific real number is the value x, you say x of omega is equal to little x. So, always capital letters for random variables and small letters for the value it takes. So, please retain this notation in your written work. So far any questions? So far I have said that random variable is a mapping from sample space to real line. So, one little subtlety here is that. So, just like not all subsets of omega are considered events, not all functions from omega to r are considered random variables. So, random variables are special certain nice functions called measurable functions. So, I will I have to define what a measurable function is. Let me. So, let me just define that first. Let me just consider a function x from omega to r is said to be f measurable if for every Borel said b the pre image x inverse of b which is. So, the pre image x inverse of b is f measurable here x inverse of b is equal to the set of all omega for which x of omega belongs to b. So, I will explain this in a minute. I will also define a random variable on the probability space omega f p is a measurable function is a f measurable function from omega to r. So, I will explain this definition now. So, I am defining. So, here I am defining what an f measurable function is. Actually in this case I mean I have used the notation of a random variable, but this omega could omega f could jolly will be any measurable space. You do not even need a probability measure on it. It could be any measure. All you need is a set and some sigma algebra on it and any f measure any function f from omega to omega to r is said to be f measurable if the pre image of all Borel sets are f measurable. So, what is that mean? So, you take any. So, this real real line is endowed with the Borel sigma algebra remember the Borel sigma algebra it is generated by open sets on open intervals on r. So, you take any Borel set you want let us say that is your Borel set. This is your B I am drawing it like an interval, but it could be something very complicated. This is your Borel set. It could be some cantor set or some complicated set and you look at all those. So, this omega maps here. So, actually let me take my Borel set here. So, this omega maps here into B and there may be some other omega that maps here. You take those omegas. So, let me just draw a pre image of this. So, if you look at those omegas that map into that Borel set that will be some subset of your sample space. Now, that subset of your sample space need not be in your sigma algebra F need not be a F measurable set. But, a function is set to be F measurable if every Borel set has a pre image which is F measurable or in the case of a probability space the pre image of every Borel set must be a event correct everybody with me. So, that is what this is saying. So, X inverse B. So, this is notation X inverse B is the pre image of the Borel set B. So, you take a Borel set B and you are looking at all those omegas in the sample space for which X of omega is in B. X of omega is a real number. So, the X of omega is this one for example, and you look at all those omegas for which your X of omega is in that Borel set. And that will be a subset of the sample space and for every Borel set if it. So, happens that that pre image is F measurable then the function is set to be F measurable. And after all then we are saying that a random variable on probability space omega F P is just an F measurable function. So, here as I said in this for this definition you only need a measurable space you do not even need a probability measure on it. But a random variable is defined on a probability space F measurable function can be defined on any measurable space are there any questions on this definition. Random variable is a function from omega to R and we are saying that not all functions from omega to R are considered random variables. So, whether X is a random variable or not depends on what your sigma algebra is essentially right. So, you should have all your pre images of Borel sets must be F measurable. So, that is what makes a function a random variable it is a misnomer as I said it is a function right. So, it is a function it is not random either it is completely deterministic there is nothing random about it right. If it is a little omega it produces a deterministic X of omega right. The only randomness lies in the little omega itself right because little omega realizes randomly right. So, random variable is not random either is this definition yes. No see this could be this set omega may not be even a set of numbers it could be a set of numbers, but it could contain coin tosses it could contain diroles it could contain anything right and you all you have a some sample space consisting of elementary outcomes under sigma algebra on it. Borel set to the sigma algebra. So, every element in Borel set there should be a inverse mapping. No the inverse mapping. So, this is not the inverse mapping in the sense of an inverse function right this is notation for all those omegas for which X of omega is in B. I am not saying X is an invertible function for example, that is not what I am saying X inverse of B is the pre image of B the set of all omegas that map to B that is all. So, is this notation clear. So, we will use this a lot any other questions. So, if it is for example. So, you may have some. So, you can give examples of functions which are not random variables if you simply have let us say if you have non measurable sets here right. If you have subsets of omega which are not f measurable right even if you find one Borel set or some Borel set here whose pre image is that non f measurable set that function will not be a random variable right we can create many such examples. So, you know that you take any non Borel set. So, if you are looking at functions from R to R you take any non Borel set and put the map the function to 1 if it is in the non Borel set and 0 to if it is not right and then the. So, that is like an indicator of that set right. So, if you have indicators of non Borel set you will have a something that is not a random variable you will give you will give this example. So, not all functions are considered random variables that is all I want to say. So, why do you insist. So, first of all. So, why do you insist that you want a random variable to be this very special function right I mean why do you want this to be f measurable why cannot what is the problem with saying that all functions from omega to R are random variables. So, ultimately the probability measure is only defined for f measurable sets right. If you give me some arbitrary subset of omega it may not be an event and they I may not define a probability measure for arbitrary subsets of omega. So, I may have a situation. So, what I ultimately want to do is assign probability measure to Borel sets on R right. So, if you have a Borel set whose pre image is not f measurable you cannot assign a probability to Borel set on R right some. So, I would not avoid that problem right, but for a random variable because pre images of all Borel sets are in fact, f measurable I can assign a there is a well defined probability measure on R which is what is called the probability law of the random variable of random variable x. So, x is a random variable on probability space omega f p that I am not writing again. So, the probability law of x denoted p x is a function that maps Borel sets to 0 1 and is defined as p x of B is equal to p of x inverse of B alright which is. So, this is by definition. So, this is the probability of for which x of omega belongs to B right. So, I should write curly braces here. So, this probability law of x a random variable x takes as inputs Borel sets and for each Borel set will produce a number in 0 1 and this number is in fact, the probability of the Borel set the probability of the random variable lying in the Borel set. So, what are we saying here p x of B is defined as p of x inverse of B normal x inverse of B right is the pre image of the Borel set B. So, remember B is a Borel set on real real line this is a subset of this is a subset of the sample space it is in fact, an f measurable set why because it is a random variable x is a random variable. So, for every Borel set x inverse B is a f measurable set. So, it will have a probability measure assigned to it right. So, that is I am writing it out in full form here probability of those omegas for which x of omega is in B right and this p is your original measure on omega f. So, that is the definition of a probability law of random variable x. So, it produces. So, what is it in physical terms what does it mean it gives you the probability that the random variable takes value in your Borel set B you give me a Borel set it will give me a number between 0 and 1 which is the probability that my random variable takes values in the Borel set. So, in other words. So, to pictorially again this is a picture you may want to remember. So, you have your omega f p that is your probability space you have your random variable that maps to R right. So, you have you take any Borel set let us say that is your Borel set it will have some pre image here right that is x inverse B right. Now, this is an f measurable set right. So, this is x inverse B and that is an f measurable set. So, the probability measure the original probability measure assigns a value in 0 1 to it. So, you can look at the probability law as a composition. So, it takes inputs as B it is a composition of x inverse and p right. So, often in shorthand notation people write p x is equal to p composition x inverse this is shorthand notation for what I just said right p x takes inputs as the Borel set. So, if you put a Borel set in here you put a Borel set in here x inverse B is f measurable set and what is the probability of it right this is more advance takes books use this somewhat cryptic, but shorthand notation it is a composition of your original measure p and your pre image under the random variable everybody with me. So, what can be shown now. So, this everybody understands probability law the probability that the random variable takes values in your Borel set. Now, what can be shown which you can easily do as homework is that R Borel p x is a probability space. So, for any random variable x R B R p x is a probability space what is that mean what is that mean. So, we already know B R B of R is sigma algebra on R right we only have to prove that p x which is the probability law is in fact a probability measure on this measurable space R B R correct. So, what you have to prove now you have to prove that p x of null set is 0 which is very trivial then you have to prove that p x of R is 1 right what is p x of R if you look at the entire real line it maps back to omega right because for every element omega you have to map some real number. So, the pre image of the entire real line will be the sample space itself and probability of sample space we knows what right and then finally, you have to prove countable additivity of p x for disjoint Borel sets right there again you will have to use that the disjoint Borel sets will have disjoint pre images and then use countable additivity of p on omega f is that clear you can do it it is a very it is just definition chasing. So, what does a random variable do it effectively pushes. So, we have a measure omega. So, we have a measure p on omega f it pushes that measure on to R B R on to the Borel sigma algebra on R right and p x is the probability measure induced by the random variable on the real line the probability loss nothing, but the probability measure induced by the random variable on the real line on the Borel sigma algebra on the real line I should say be precise right you have to prove it right you have to take prove this joint Borel sets. So, you have to take a countable you have to prove what it countable additivity right you take B 1 B 2 dot dot dot as disjoint Borel sets and you look we have to prove that p x is countable additive right it follows from the countable additivity of p. Maximum 4 is to 6, but here same every b have to have a pre image. So, there will not be 1 to 1 mapping. Let us say no see if you have some if your omega is some nice countable set right let us say omega is throw of a die or tossing a coin 10 times or some such thing then you know that your f your f is you can take your f as 2 power omega right in that is your discrete probability space. So, in that case all functions from omega to r will be random variables why because your f is 2 power omega right. So, pre image you cannot have a pre image which is not f measurable right. So, only in cases where your f is not 2 power omega does is there a possibility that a function is not a random variable right. If your f is 2 power omega all functions of omega to r will be random variables right that ok. So, that is your probability law. So, in order to specify. So, once you have this probability space right. So, you have real line. So, you are interested in what this random variable measure. So, may be you are just interested in today's temperature or the number of heads in 10 tosses or some such thing then you are only interested in this probability space you can if you are not interested in anything else you can throw away omega f p right. You can just keep this probability space because you are only interested in what x values of x it takes. So, if I want to specify. So, the random variable x I can if I specify p x for all boral sets I can I know it is complete probabilistic description on the real line right. So, it appears as though in order to give you a complete probability description of a random variable I need to give you the probability law p x for every boral set right. It turns out that you do not need p x for all boral sets. It is enough to specify p x for certain nicer subsets right. Boral sets are can be very complicated right. So, that is what I will get to next. See I also when I introduced boral sigma algebra on the real line I mentioned you that you can there are multiple ways you can generate the boral sigma algebra on the real line. One of them is using open intervals the other is using semi infinite intervals right. So, you can look at the boral sigma algebra as being generated by sets of that form for x belonging to r right. Now, so you can. So, let me write this. So, this we know right. So, you know that sigma algebra generated by sets of this form sigma algebra generated by sets of this form is nothing but your boral sigma algebra on r right. You have to prove that this is the same boral sigma algebra as that generated by open intervals, but that is true you can prove it. Now, what I am trying to get at is this is that this probability law which is defined for all boral sets must also be defined for the generating class correct. So, note that minus infinity x. So, note that sets of the form minus infinity x x belongs to r are boral measurable boral sets right. Thus p x is well defined on sets of this form. Why? Because, they are the generating class of the boral sigma algebra you know p x is defined on all boral sets. So, it must obviously be defined on the generating class which is minus infinity x. Note that the sets of the form are boral sets. Thus p x of minus infinity x is well defined for all x in r right agreed. I am simply saying that minus infinity x being a very special boral set must have a probability law assigned to it right. So, this is well defined. So, if you look at this. So, another way of writing this is. So, if you want to write this I can write it as probability of omega such that what x of omega is less than or equal to x right. So, I should put in order to be precise I should put set like that right. Everybody with me? So, that is a boral set. So, p x is defined on that set right and that is nothing but the probability that omega is such that x of omega lies in this. So, remember this right. So, it is the set of all omega for which x of omega lies in minus infinity x which is nothing but the probability that x of omega is less than or equal to little x correct. So, you are essentially this specifies the probability law of the semi infinite intervals right which are nice boral sets after all. And this has a name what is it called? This is the cumulative distribution function of the random variable this is called c d f cumulative distribution function right. And it is usually denoted by f x of little x. So, capital F subscript whatever random variable you are talking about of whatever the argument is little x. It gives you the probability that x of omega is less than or equal to x. So, in short hand notation this is usually written as probability that x is less than or equal to x. This is bad notation. So, this is abuse of notation, but it is like a short hand. So, if I write this I really mean this I will keep writing this several times, but I actually mean this. And similarly, for something like this people write short hand probability that x is in b right. When I write this again I mean this probability of omega for which after all p is only defined on subsets of omega right. So, when I write this I mean this and similarly when I write that I mean that any questions. So, what we said so far is that a random variable being a measurable function from omega to r pushes this measure from omega f to the boral sigma algebra on r right. So, given any boral set I can talk about p x of b which is the probability that x lies in that boral set. Then I went ahead and said hey this boral sigma algebra is after all generated by this semi infinite intervals. So, they must have a probability law there because they are nice sets nice boral sets. So, it is nice to give that a name. So, I have called that the cumulative distribution function. It is well defined because these guys are boral sets right. So, if you give me the probability law for all boral sets I can easily figure out the cumulative distribution function. Because these are also boral sets right this minus infinity x is also boral set. So, what is not so obvious and requires a proof is that if you specify the CDF. In fact, you can specify the probability law for all boral sets see after all see in your probably in your under graduate treatment of probability that you may have studied. You are told that CDF tells me everything about the random variable right yes or no. If I give you CDF you know everything about the random variables distribution right. That is true it is a correct statement, but it is not obvious if you think about it. So, the way we have developed it in order to know everything about the random variable I need to know the measure of probability measure of all these boral sets. But, if I only give you the measure of this minus infinity x type of semi infinite intervals. It may not be it is not clear at all that you can find p x for all boral sets right, but it is true that you can do it. After all see given any boral set you can write it as countable unions and intersections complements of generating class right and then you can figure out what p x is from f x. See the way to formalize this is suit using an object called a pi system. So, I will tell you what this is very briefly. A collection G of subsets of omega is said to be a pi system if a b in G implies a intersection b is in G. So, a pi system see like sigma like algebra sigma algebra etcetera this is another notion this is another notion. So, collection of subsets of omega is called a pi system if it is closed under finite intersections only finite intersections no complements no countable unions intersections etcetera closed under finite intersections. So, it is much weaker than a sigma algebra it is in fact weaker than an algebra also right all algebras are clearly pi systems, but not the other way. So, why do we care about this pi systems. So, the reason we care is that there is a non trivial result in measure theory that says if you uniquely specify a measure on a pi system it gets uniquely specified on the sigma algebra generated by G it is this is a non trivial result. So, this is something I will state, but not prove theorem let G be a pi system on omega and let f is equal to sigma of G. Let p 1 and p 2 be two probability measures on omega f that agree on G I E p 1 equals p 2 on G then p 1 equals p 2 on f. So, what this theorem which is a non trivial result from measure theory this we will just use it I will just tell you what it means. So, you given this pi system this pi system is nothing, but a collection of sets closed under finite intersections that is all and let us say that so on m f is your sigma algebra generated by G. Now, I am saying that suppose there are two probability measures defined on omega f. So, omega f p 1 is a probability space omega f p 2 some other probability space two different probability measures defined on the same measurable space omega f and I am saying that they agree on G. So, p 1 equals p 2 so p 1 of some set in G will be the same as p 2 was the set in the G. So, on this pi system they agree then they have to agree on the entire sigma algebra which means if you uniquely specify a measure on the pi system the measure is uniquely specified on the entire sigma algebra. So, why is this useful because pi systems are simple and sigma algebra are complicated. So, on the real line for example, so why did I go through the story you can show. So, let us pi of r equal to the set of all minus infinity x where x is in r is a pi system. So, you can see that if you have one set of the form minus infinity x another set of the form minus infinity y the intersection of two such sets will be also of this form. So, collections of sets subsets of r of this form are clearly a pi system on r fine and. So, I am saying now and sigma of pi of r is what is Borel sigma algebra is B r. So, now if I invoke this theorem what happens. So, if I tell you the C D F which is simply specifying the probability measure on the pi system pi r then it gets uniquely specified on the entire Borel sigma algebra correct. So, I can state the theorem the C D F uniquely specifies probability law P X any random variable. So, the argument so to summarize I will summarize what I have said so far. So, we started of saying that a random variable is a measurable function. So, which means pre-images of Borel sets are F measurable. So, for each Borel set B we can assign a probability measure which is called the probability law P X right. So, P X of B is the probability that the random variable takes values in the Borel set B. And we said that this P X is the probability measure on the real line real line comma Borel sigma algebra. So, in a sense what a random variable does is pushes this measure from omega F to R B R. And if you only care about that random variable you can forget about omega F and only look at R B R P X right. Now, then we further said that Borel sets are generated by this class semi infinite intervals. So, the probability of those sets are well defined and probability P X the probability law of the semi infinite intervals is what defines the CDF of a random variable. And finally, we said that sets of this kind form of pi system. And since specifying a probability measure on pi system is enough to specify it on the entire sigma algebra it is enough to just tell me if you tell me the CDF of a random variable I can uniquely specify the probability measure P X on the entire Borel sigma algebra. So, in short although P X is the complete description of the random variable in practice we will use F X the CDF because it captures all the information of P X. And it is more intuitive because it has to it deals with nice sets right. Whereas, this probability law has to be specified for all Borel sets which is a very complicated bunch of sets right. Whereas, these are very nice sets right. So, are there any questions at this point I think I am out of time. So, if there are no questions I will stop.