yego.me
💡 Stop wasting time. Read Youtube instead of watch. Download Chrome Extension

Impact of transforming (scaling and shifting) random variables | AP Statistics | Khan Academy


4m read
·Nov 11, 2024

Let's say that we have a random variable x. Maybe it represents the height of a randomly selected person walking out of the mall or something like that. Right over here, we have its probability distribution, and I've drawn it as a bell curve, as a normal distribution. Right over here, it could have many other distributions, but for visualization's sake, it's a normal one in this example.

I've also drawn the mean of this distribution right over here, and I've also drawn one standard deviation above the mean and one standard deviation below the mean. What we're going to do in this video is think about how this distribution, and in particular, how the mean and the standard deviation get affected if we were to add to this random variable or if we were to scale this random variable.

So let's first think about what would happen if we have another random variable, which is equal to—let's call this random variable y—which is equal to whatever the random variable x is, and we're going to add a constant. So, let's say we add—so we're going to add some constant here; I'll do a lowercase k. This is not a random variable; this is a constant. It could be the number 10.

So, if these are random heights of people walking out of the mall, well, you're just going to add 10 inches to their height for some reason. Maybe you want to figure out, well, the distribution of people's heights with helmets on or plumed hats or whatever it might be. How would that affect—the mean of y and the standard deviation of y—relate to x?

So we could visualize that. What the distribution of y would look like; instead of this—instead of the center of the distribution—instead of the mean here being right at this point, it's going to be shifted up by k. In fact, we can shift the entire distribution; it would be shifted to the right by k in this example.

Maybe k is quite large; maybe it looks something like that. This is my distribution for my random variable y here, and you can see that the distribution has just shifted to the right by k. We have moved to the right by k. We would have moved to the left if k was negative, or if we were subtracting k.

So, this clearly changes the mean; the mean is going to now be k larger. So we can write that down. We can say that the mean of our random variable y is equal to the mean of x + k. You see that right over here.

But has the standard deviation changed? Well, remember, standard deviation is a way of measuring typical spread from the mean, and that won't change. So, for a random variable x, this length right over here is one standard deviation. Well, that's also going to be the same as one standard deviation here.

This is one standard deviation here; this is going to be the same as our standard deviation for our random variable y. And so we can say the standard deviation of y of our random variable y is equal to the standard deviation of our random variable x.

So, if you just add to a random variable, it would change the mean but not the standard deviation. You see it visually here. Now, what if you were to scale a random variable? So, what if I have another random variable? I don't know, let's call it z, and let's say z is equal to some constant times x.

And so, remember, this k is not a random variable; it's just going to be a number. It could be, say, the number 2. Let's think about what would happen. So, let me redraw the distribution for our random variable x. So, let's see if k were 2. What would happen?

With this distribution, it would be scaled out. It would be stretched out by two, and since the area always has to be one, it would actually be flattened down by a scale of two as well, so it still has the same area.

So, I can do that with my little drawing tool here. Let me try to first—I'm going to stretch it out. Oops! First, actually, I'll make it shorter by a factor of two. But more importantly, it is going to be stretched out by a factor of 2. So, let me align the axes here so that we can appreciate this.

It's going to look something like this. It's going to look something like this. When you scale the random variable, this is what the distribution of our random variable z is going to look like. I'll do the z’s color so that it's clear.

You can see two things. One, the mean for sure shifted—the mean here for sure got pushed out. It definitely got scaled up, but also we see that the standard deviation got scaled. The standard deviation right over here of z has been scaled.

It actually turns out that it's been scaled by a factor of k. So, this is going to be equal to k times the standard deviation of our random variable x. And it turns out that our mean right over here, so let me write that too, our mean of our random variable z is going to be equal to—that's also going to be scaled up times—or it's going to be k times the mean of our random variable x.

So, the big takeaways here: if you have one random variable that's constructed by adding a constant to another random variable, it's going to shift the mean by that constant, but it's not going to affect the standard deviation. If you try to scale—if you multiply one random variable to get another one by some constant, then that's going to affect both the standard deviation. It's going to scale that, and it's going to affect the mean.

More Articles

View All
Ray Dalio: The World's Greatest Wealth Transfer Has Begun.
You can’t spend more than you are without getting into debt, and if you have debt, you have to pay back the debt. The only difference is you can print the money. So the question is, what ends that? Or is there no end to that? Legendary investor Ray Dalio…
Consumer protection | Scams & fraud | Financial literacy | Khan Academy
So one thing to think about as you think about your own financial literacy is what do you do in a situation where you try to interact with some type of a business or a financial institution, and they either are misinforming you in some way or they’re not …
Superheroes MAKING BABIES
[Music] Hey Vsauce, how are you doing? It’s Michael here at the 2010 New York ComiCon, and I’m joined by Ramona. Myself and Rusty are going to be counting down the top superheroes to have a child with. So, I’m going to let you be my first victim. What su…
Blacksmith for Barter | Live Free or Die
Gonna be a hot one today in the mountains of Colorado. Primitive blacksmith Derik fires up his forge to nearly 2500 degrees, the ideal temperature to mold iron. Today I’m gonna continue working on my camp set, try to finish that out—four more pieces beca…
Charlie Munger's 2023 Recession Prediction
Visits partly fraud and partly delusion; that’s a bad combination. I don’t like either fraud or delusion, and the delusion may be more extreme than the fraud. This is a very, very bad thing. When Charlie Munger talks, we all better listen. Munger is the …
How To Get Ahead Of 99% Of People (Do This Now)
What’s big, guys? It’s Graham here. So, there seems to be this recent trend on YouTube of how to get ahead of 99% of people. Some of them, I’ll admit, are wildly genius and insanely insightful, while others seem like a chat GBT inspired list to the most g…