Transcription
Welcome back. Okay, we introduced this notion of functions of a random variable. Um, so if you have some random variable X, maybe it's, you know, Gaussian, normal distributed, and you want to build a new function Y, uh, which is some function G of X, it could be X squared, or ax + b, or the square root of X, whatever you like. Uh, there is a procedure for building the probability density function, the PDF of Y, and the cumulative density function, the CDF of Y, from the things you know, the PDF and CDF of X.
So we went through this procedure and basically showed that you start with the um, the, the, the CDF of X to build a CDF of Y, and then you differentiate it to get the probability density function of this new variable Y. And we actually showed that if I have a normal distribution uh with mean mu and and standard deviation Sigma, and I introduce a new random variable Y = ax + B, so just, you know, a scaling and a shift, this is kind of a linear function of X. You go through all the math, and you find that your new variable Y is also a normal distributed random variable with a new mean that is also just shifted and scaled by the exact same amount and a standard deviation that is just a * Sigma, so a variance which is a^2 * Sigma^2. And this is super, super useful.
So I'm going to show you one of the ways that this is um really, really useful, and the idea here is quite simple. Often times you have a normal distributed random variable that has some mean and some standard deviation. So I'm just going to kind of draw that here as um, you know, it has mean mu, it has standard deviation Sigma, you know, minus Sigma, something like that. So I've got to going to try to draw my mu, my PDF here. Okay, so I've got my PDF, symmetric; it's not a great, but it's fine. Uh, and this variable, let's say, is um, you know, X is normal with mean mu and standard deviation Sigma, or variance Sigma squared.
Now, if I want to compute something about this uh, this variable, in the olden days it was actually, you know, difficult to compute things uh by hand, or computers, you know, were really slow um in for a generic mean and standard deviation. And so what you would actually do—this is back when I was learning things—is you would, you would map this Gaussian into another Gaussian that was the standard unit normal Gaussian, where it had mean zero and standard deviation equal to one. So what you would do is you would map this into another Gaussian. I'll draw it here—another Gaussian that had mean zero and standard deviation one. So we would say this is um, and maybe I'll make this kind of yellow so that you can see where now this new variable Y is normal with mean zero and standard deviation one.
Okay, and then what you would do is, let's say you wanted to compute the probability that X is less than seven. Okay, what you would do is you would map that into some probability in this unit normal, and you'd say, what's the probability that this variable Y is less than whatever the corresponding value is here in this standard unit normal? All of the probabilities uh, or all of the cumulative distribution functions of this standard unit normal were written down; they were in the back of the book, or in some kind of uh, you know, a table you could look up. So you could do your calculations here, and then you could map them back to calculations here.
Now, nowadays you don't have to do that; you can just use a computer to directly compute the probability up here. Under the hood, it might very well be going back down here to some like compiled Fortran code from the 70s, I don't know, but um, you know, that's not something we really have to do anymore, but it's still kind of a useful notion that um, you know, if I if I can map uh this normal distribution kind of distorted into this normal distribution, I can do things like compute the area, uh, the probability that this distribution is between minus Sigma and Sigma, and it would be the same as the probability that this distribution is between minus 1 uh and 1. Things like that, you can compute probabilities down here easily if you, and you can then translate those to probabilities up here through this mapping. And so the mapping is really, really simple; it's just um, how would I, how would I build Y to have mean zero and standard deviation 1 if X was this normal distribution? That's pretty simple; we would just say Y equals, and I don't want to mess this up, but essentially if a is 1 over Sigma, then this will work, so it's uh 1 over Sigma * X um, and then I'm going to have a 1 over Sigma mu, and I have to somehow [Music] um, gosh, I'm really making this way harder than it is. Uh, um, it should be X minus mu over Sigma. What am I doing? It should just be X minus mu over Sigma. That's an easier way to see this. So you know, in this notation here, a would equal 1 over Sigma and B would equal minus mu over Sigma. And if I take that a and that b and I plug it in here, I will get um essentially a mean of zero and a standard deviation of one.
So this is the distribution: you literally just take X and you shift it, you you shift it by mu, you shift it to center it, and then you divide by Sigma to bring that standard deviation from Sigma down to one. And that's how you distort this normal distribution into this normal distribution, where again there's lookup tables, easy function. This is something that's really easy to analyze; this is just a standard Gaussian. You can write it down in your sleep, um, hopefully. Um, you can write this down in your sleep and analyze it and work with it, and going back and forth here um is a useful thing you might do. Okay, nowadays you don't really need to map here to compute these probabilities, but it can be useful.
So just to give you an idea of what I mean, let's say uh I want to compute the probability that my random variable X is between a and b. Okay, so let's say um I'll draw another little picture of this here where um, you know, I have my Gaussian. Now, let's say I want to compute the probability that it's between uh A and B, so I want this area under the curve here. What I want to do then is to map it to the standard unit normal where I can compute the probabilities more easily. So this is going to equal uh the probability that my Y variable is between a minus mu over Sigma and it's less than B minus mu over Sigma. And this is something I can compute because in these Y variables I have lookup tables for this cumulative distribution function. So this is just um kind of this cumulative density function for the standard normal; it actually has a name; it's so commonly used we call it Big Phi, and that means it's in the back of the, you know, book in this lookup table. You can actually look this up, um, or this is a function call; this is Phi of B minus mu over Sigma minus Phi of a minus mu over Sigma. And so what you would do is you would map A and B to this standard unit normal; it would be A minus mu over Sigma and B minus mu over Sigma, and you'd compute the area between those in the standard unit normal using these well-defined cumulative density functions that have been written down. This is just the standard error function or standard sigmodal function, and again it's written down in tables in the back of most statistics books, and there are function calls for this. Um, okay, so that's just a really, really uh kind of rough sketch of one of the ways you would use this basic linear function would be to subtract the mean and scale the variance so that you can bring your normal distribution into this standard unit normal where calculations are easier uh and kind of, you know, everything makes a little bit more sense um in this distribution. Okay, thank you.