This is Stephanie from StatisticsHowTo.com and in this video I'll be talking about Adjusted
R Squared. In the previous video on the coefficient of
determination that was r squared. I talked about how variables can be related
to each other. And how r squared can give us an idea how
well data points fit our line. Let say, I’m looking at the price of pizzas.
So I have my price on the Y-axis, and on the X.
Let's say, I think the price is mostly due to the price of dough and toppings.
Now as the price of dough and toppings increase, the price in pizza is also likely to increase.
And I might get an r squared. That's pretty high, maybe 89%.
89% of the price of pizza is due to the price of dough and toppings.
Now let's say I take this one step further and I think that as well as the price of dough
and toppings. Let's say I think that whether preparers are
male or female. Now I’m going to add another axis here,
I’m going to say this is my Z-axis. So if could think of this as a 3D model.
And on the Z-axis, I’m going to suggest that male or female pizza tossers.
That also has something to do with the price of pizza.
As I add more and more of these independent variables, r squared will always go up.
So when I add male or female pizza tossers r squared might go up to say 90%.
Our r squared never decreases. So you might be looking at this and thinking,
oh this is obviously the better model because r squared has gone up to 90%.
But this is complete rubbish our male or female pizza tossers have nothing to do with the
price of pizza. But the more of these independent variables
I add, the higher r squared. So this becomes a problem.
We can fix this problem by using adjusted r squared.
If you run regression analysis your r squared might be 89% for the price of dough and toppings.
Adjusted r squared is always going to be lower. And let say my adjusted r squared was 80%.
Now when we run the adjusted r squared for the extra variable which is the male or the
female pizza tossers which has nothing to do with the price of pizza.
Your adjusted r squared, We'll take into account that the extra useless
variable and it will reduce the figure a little bit.
Let's say, it reduces it to 72%. So based on the adjusted r squared, you would
choose the first model. And you would really discount male or female
pizza tossers. This becomes important because you can keep
on adding these independent variables. You can add the price of a dough mixer,
the age of the customer that comes to the door.
You can keep on adding variables and r squared will always increase.
The adjusted r squared will take into account what kinds of variables you are adding to the
model. The adjusted r squared formula looks a little
complicated. But if you already have r squared the coefficient
of determination, then the formula is pretty simple.
n is the number of items in your data set. And this k those are those independent variables
we were talking about. For the price of pizza, being a result of
the price of dough and toppings, and the sex of the worker, these are your independent
variables and this is k. And hopefully you can see that as k increases,
as k goes up, adjusted r squared will always fall.
Unless, there's a significant increase in the r squared value.
So basically what this formula does is the more decent independent variables you add
that is independent variables that actually fit the model and cause r squared to increase.
As long as you keep on adding good data, adjusted r squared will increase.
But if you add a complete rubbish to k and k increases but r squared does not, the adjusted
r squared will fall. Most of the time you don't really need to
calculate adjusted r squared by hand, Microsoft Excel and most other statistical
packages will do the work for you. That’s the general overview of adjusted
r squared. Check us out at StatisticsHowTo.com for more
videos and articles on everything Elementary Statistics.