R-Squared

  

R-squared is a measure of the percentage of change in one variable due exclusively to changes in another variable. Accidentally back into a car in the lot and need someone to blame it on? Late for work and need a scapegoat the boss will believe? R-squared is here to find you a patsy to take the blame for pretty much anything you can dream up.

While r-squared won’t take the fall for you, it will find the fall guy best suited for that job. Let’s say we looked at a set of bivariate (two variable) data that compares the top speed of a remote control car to the size of the tires on the car, which ends up having an r-squared value of 0.79. That means 79% of the changes in the top speed of the car are due to changes in the size of the tires. More simply, the changes in tire size are the primary cause for changes in the top speed. Other factors do affect top speed, like wind resistance, battery power, etc., but changes in tire speed are the primary cause for changes in top speed.

We need to be careful not to say that tire size is the primary cause of top speed. R-squared doesn’t tell us that. It just tells us that changes in the tire size are the primary cause for changes in the top speed. The difference is subtle but hugely important.

Let’s walk through how we might really work with r-squared from beginning to end. We’ve got two variables, like the daily price of a gallon of gasoline and the average number of gallons purchased per customer on that same day. It’s not unreasonable to think that changes in the price of gas are a factor in how much gas people buy. But how much of a factor?

R-squared will tell us how much of the changes in how much people pump into their tanks is due to changes in the price of gas, and how much of those changes in the amount of gas purchased is due to other factors, like length of trip, amount of money on hand, how loud the kids are screaming in the back, butterflies flapping their wings in Indonesia, etc.

A few important safety tips. We should only find r-squared for data that have a linear-ish pattern. We can find r-squared by hand, but that’s a sign of insanity, so use tech to do the grunt work of the actual calculations. R-squared is the percentage of change in one variable that is due strictly to changes in another variable.

If we square root r-squared, we get the correlation coefficient, r.

And finally, never, ever, ever suggest that 99% of the changes in a policeman's weight is due to changes in donut consumption. That last one's a freebie.

Find other enlightening terms in Shmoop Finance Genius Bar(f)