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

Root mean square deviation (RMSD)


4m read
·Nov 11, 2024

So we are interested in studying the relationship between the amount that folks study for a test and their score on a test, where the score is between zero and six. So what we're going to do is go look at the people who took the tests. We're going to plot, for each person, the amount that they studied and their score.

For example, this data point is someone who studied an hour and they got a one on the test. Then we're going to fit a regression line, and this blue regression line is the actual regression line for these four data points. Here is the equation for that regression line.

Now, there are a couple of things to keep in mind. Normally, when you're doing this type of analysis, you do it with far more than four data points. The reason why I kept this to four is because we're actually going to calculate how good a fit this regression line is by hand. Typically, you would not do it by hand; we have computers for that.

The way that we're going to measure how good a fit this regression line is to the data has several names. One name is the standard deviation of the residuals; another name is the root mean square deviation, sometimes abbreviated RMSD. Sometimes it's called root mean square error.

So what we're going to do is, for every point, we're going to calculate the residual. Then we're going to square it and add up the sum of those squared residuals. We will take the sum of the residuals squared, then divide that by the number of data points we have minus two. We can talk in future videos, or in a more advanced statistics class, about why you divide by two.

But it's related to the idea that what we're calculating here is a statistic and we're trying to estimate a true parameter as best as possible. “N minus 2” actually does the trick for us. To calculate the root mean squared deviation, we would then take the square root of this, and some of you might recognize strong parallels between this and how we calculated sample standard deviation early in our statistics career. I encourage you to think about it.

But let's actually calculate it by hand, as I mentioned earlier in this video, to see how things actually play out. So to do that, I'm going to give ourselves a little table here. Let's say that is our x value in that column. Let's make this our y value. Let's make this y hat, which is going to be equal to 2.5x minus 2.

Then let's make this the residual squared, which is going to be our y value minus our y hat value — our actual minus our estimate for that given x — squared. Then we're going to sum them all up, divide by n minus 2, and take the square root.

So first, let's do this data point: that's the point (1, 1). Now what is the estimate from our regression line? Well, for that x value when x is equal to 1, it's going to be 2.5 times 1 minus 2. So it's going to be 2.5 times 1 minus 2, which is equal to 0.5.

Our residual squared is going to be 1 minus 0.5, and (1 minus 0.5) squared, which is equal to 0.5 squared, which is going to be 0.25.

Alright, let's do the next data point. We have this one right over here: it is (2, 2). Now our estimate from the regression line when x is equal to 2 is going to be equal to 2.5 times our x value times 2 minus 2, which is going to be equal to 3.

So our residual squared is going to be 2 minus 3, (2 minus 3) squared, which is negative 1 squared, which is going to be equal to 1. Then we can go to this point: so that's the point (2, 3).

Now our estimate from our regression line is going to be 2.5 times our x value times 2 minus 2, which is going to be equal to 3. Our residual here is going to be zero, and you can see that that point sits on the regression line. So it's going to be 3 minus 3, (3 minus 3) squared, which is equal to 0.

Last but not least, we have this point right over here. When x is 3, our y value — this person studied 3 hours and they got a 6 on the test — so y is equal to 6. Our estimate from the regression line, you could say what you would have expected to get based on that regression line, is 2.5 times our x value times 3 minus 2, which is equal to 5.5.

So our residual squared is 6 minus 5.5, (6 minus 5.5) squared. So it's 0.5 squared, which is 0.25. Now, the next step: let me take the sum of all of these squared residuals. So this is let me just write it this way, actually let me just do it like this.

The sum of the residuals squared is equal to, if I just sum all of this up, it's going to be 1.5. Then, if I divide that by n minus 2, so if I divide by n minus 2, that's going to be equal to — I have four data points, so I'm going to divide by 4 minus 2. So I'm going to divide by 2, and then I'm going to want to take the square root of that.

So this is going to get us 1.5 over 2, which is the same thing as 3/4. So it's the square root of 3/4 or the square root of (3 over 2). You could use a calculator to figure out what that is as a decimal.

But this gives us a sense of how good a fit this regression line is. The closer this is to zero, the better the fit of the regression line; the further away from zero, the worse the fit. And what would be the units for the root mean square deviation? Well, it would be in terms of whatever your units are for your y-axis; in this case, it would be the score on the test.

That's one of the other values of this calculation of taking the square root of the sum of the squares of the residuals, dividing by n minus 2.

More Articles

View All
How Wildlife Overcame South Georgia's Haunting Past — Ep. 5 | Wildlife: Resurrection Island
When this place was in full swing, a cloud of smoke covered the skies. 300 men toiled as thousands of whales lost their lives in Salieri. But who started this, and how did we get to the point of nearly exterminating the wildlife from this island? How is i…
Fire Aboard the Hot Tuna | Wicked Tuna
[Music] Oh boy, all right. Well, one someone will get one here. Somebody will win the lottery here today. Whoa! Something’s on fire! Something’s on fire! What? Something’s on fire! Where? I don’t know; I smell it. I smell electrical burn. I smell it too.…
I Asked An Actual Apollo Engineer to Explain the Saturn 5 Rocket - Smarter Every Day 280
THREE TWO ONE ZERO. All engine running. Lift-off! We have a lift-off! 32 minutes past the hour, lift-off on Apollo 11, tower clear. The Saturn V rocket is one of the most amazing vehicles ever created by humans, and if you could have ONE person explain th…
Example: Comparing distributions | AP Statistics | Khan Academy
What we’re going to do in this video is start to compare distributions. So for example, here we have two distributions that show the various temperatures different cities get during the month of January. This is the distribution for Portland; for example,…
Jacksonian Democracy part 1
When we talk about the big social movements of the early 19th century in the United States, you can’t deny that the emergence of Jacksonian Democracy is one of the most influential aspects of early 19th century culture. So, what was Jacksonian Democracy,…
Top 5 Stocks the Smart Money is Buying for 2022
Wouldn’t it be great to know the five stocks the world’s biggest and best super investors have been buying for 2022? People like Warren Buffett, Charlie Munger, Ray Dalio, Bill Ackman, Guy Spier, Monash Prebride, Bill Gates, Seth Klarman, Lee Liu, Michael…