And finally interpreting coefficients.
In front of us here, we've got the four models that we built
in our backward elimination method.
And as we agreed, model number three is the best one is the best fitted model.
And if we were to deliver a model on our project it would be this one.
So let's go ahead and start interpreting coefficients by looking at this model.
Here we've got two variables R&D spend and marketing spend.
So it's basically how much
companies are spending on their research and development and on their marketing.
And we've also got the constant and we're predicting profit.
So these coefficients here these are B1 and B2.
What they're telling
us is that so how to how to interpret them.
First of all you look at the sign.
If the sign is positive that means your variable is correlated
with your your independent variable is correlated with your dependent variable,
meaning that if you change, the value of your independent variable,
then the value, then you can see that
the dependent variable will be changing in the same direction.
So basically if you'll be increasing spend on R&D then
your profit will be increasing your increasing spend on marketing.
Then your profit is also increasing which makes sense right.
So if you're spending more on research and development and making your product
better, then, probably your profits should increase eventually as well.
Same thing with marketing.
The more you spend marketing, the more you sell, and therefore
the profits should also go up.
And that's the sign.
If the sign is negative, if the sign were negative,
then it's the opposite effect.
So basically
you increase your independent variable and your dependent variable decreases.
And now let's look at the magnitude.
So here you can see right away that the magnitude is higher for indie spend.
And the magnitude is low for marketing spend.
Magnitude is always tricky with regressions.
Be careful with magnitude.
Sign is kind of, you know, pretty obvious.
It's either it's one way or the other magnitude can, really trip you up.
And I can give you an example here.
So you might think that okay, right away magnitude is greater.
So this this, coefficient for R&D spend is bigger than the marketing
spend coefficient.
So definitely R&D spend has a bigger impact.
Well, what if I tell you that I could easily without changing
anything in the regression, I could easily make this coefficient bigger,
by a lot,
by a thousand times bigger than R&D spend.
Well, it's easy to do.
All I have to do is say marketing spend instead of looking at it in dollars.
How about I look at it in, a fraction of a cent?
So, every marketing.
So let's look at and sense so marketing spend instead of
counting it in dollars, let's count it in cents right away because our variable
is going down 100 times, our coefficient will proportionally increase.
So it go up 100 times.
And if I, change my data and replace everywhere
marketing spend with sense and everything else, I will leave the same.
Then I rerun this model.
I guarantee you that the coefficient here will actually become 2.99.
So you'll just increase 100 times.
Everything else will stay the same.
And that way right away you'll see oh well the marketing spend
coefficient is greater. So then marketing spend
has a bigger impact on, your dependent variable profit.
And that's a mistake that a lot of beginners make.
You should not fall into this trap.
magnitude is a tricky thing.
And the way to think about it is always say
magnitude in terms of units of the independent variable.
So the correct way to analyze this is even without knowing what they're measured.
And maybe this one's measured in thousands of dollars
and this one's measured in dollars I don't know.
For instance, although I do I do know of course, I've seen the data,
but if, say, I don't know, the you can still make a conclusion,
just all you have to say is, R&D spend
has a greater impact on profit
per unit of R&D spend,
then marketing, then marketing spend has per unit of marketing spend.
And that's all.
So basically, even if they're measured in different things, by saying per
unit of the underlying variable, you are protecting yourself
from that error that you know they are they are measured in different things.
And moreover, imagine if they're measured,
one's measured in dollars, the other one's measured in,
you know, kilometers or something that you can't compare dollars and kilometers.
Right.
But you can always say per unit and this leads us to the actual
interpretation of these variables or these coefficients.
What does it mean? So
this means 0.79 means that for every unit,
if you keep all other variables constant, so you only have one other variable.
So if you keep everything else constant but you are able to adjust R&D spend for,
in this model or for a, for a hypothetical company,
for every dollar or for every unit of R&D spend that you,
increase your profit will increase.
According to this model, your profit will increase by $0.79.
That's exactly what this, coefficient is saying.
And so for every unit that you decrease in your R&D spend,
your profit will decrease by 70.79 of a unit of profit.
And because R&D spending, mission dollars and profit is also million dollar,
that means so for every unit increase in for every dollar
increase in R&D spend, your profit will increase in, by $0.79.
So let me just repeat that again
that you are looking at units increase in R&D spend.
They translate through this coefficient into units increase in profit.
So if your profit was measured in apples
then a $1 increase and one unit increase is always going to be true.
One unit increase in R&D spend will drive
point 79 units increase in profit.
And of of course, of the profit units.
So let's turn that into dolls and apples.
A $1 increase in R&D spend
will drive a 0.79, or 80% of an Apple increase in profits.
So here you're talking about units of R&D spend in profit.
You're talking about units of profit.
And this coefficient, it links them together.
So as long as you say per unit you're fine.
Once you already know
what these variables are measured and then you can start comparing them,
if they're on the same scale.
And in this case they are on the same scale
because they're measured, everything's measured dollars here.
And you can say that, a dollar increase
in R&D spent drives $0.79, dollars $0.79 increase in profit and mark a dollar
increase in marketing spend drives only, $0.03 increase in profit.
So basically, if you're the venture capitalist,
which companies are going to invest in, well,
from this model you're going to decide that you should invest into
companies are spending more on their R&D.
there may be lots of reasons behind this.
And this is not just a random fact.
This could be true in reality because profit is revenue minus expenses.
Maybe marketing does drive a lot of revenue to a company,
but at the same time, maybe for these specific companies
that we're looking at their expense, the cost of marketing.
So, the prices that they pay for marketing is so high that the increase
in profit, the net increase in profit is actually marginal.
So the marketing is eating up a lot of the revenue that it's creating,
whereas R&D is, you know, it's creating a lot of,
revenue and a lot of it is actually staying in profit, something like that.
But we're not worried about that right now.
That's more financials.
What we're doing is we're delivering a model.
So that's how you interpret coefficients with, linear regression.
It's very simple.
Just remember about that per unit trick or tip I guess
because if you forget about that you can, you know, make the wrong conclusions.
Otherwise it's all pretty simple.
The last thing that I wanted to mention here is that
you can see that every time we run a model, the coefficients change.
So what that is telling us is that coefficients actually only talk
about the additional effect of every single variable,
given that the other variables are already in place.
So for instance, in this example, your coefficient of marketing,
which is 0.029
is means that given that R&D spend
is already in your model and it's, fixed,
then marketing spend adds additional, you know, contributes
this additional effect of 0.0299, meaning that if you were to
run a different model and take out R&D, spend,
then the coefficient would be completely different.
And that's what we see here, that when we take our marketing,
the coefficient for and spend is, taken out.
So that's another thing you should remember about that.
Coefficients merely
portray the
additional effect that every single variable brings into the model.
Hope you enjoyed this tutorial and I look forward to seeing you next time.
Until then, happy analyzing!