In this video, we are going to run multiple linear regression, that is, we are going to use all the
variables of our dataset to predict the house price.
This is exactly similar to the way we did a simple linear regression.
Only difference is that in the input X range, instead of just putting room, no table will be putting
all the variables to will again go to the data analysis button.
We will select a regression in the input y range.
We have the price column.
In the input X range, we'll put all the other variables.
All the other options will remain the same.
We have levels we want to put in a new worksheet.
And we'll click on Oggy.
So here is the result of multiple linear regression.
The R-squared value for our model is coming out three point seventy two, where the adjusted R-squared
is point seven one.
This is a pretty good value and it means that nearly 72 percent of the variation in the values of house
price are accounted for by this model.
In the table below, we have all the Beatles for all the independent variables to the first column contains
the name of all the independent variables, plus the intercept.
The second column is of the Capuchins.
The third column is giving us a standard error corresponding to those coefficient.
Fourth column contains these statistic value.
Fifth column is the P value will be using the P value to determine which of the variables is significantly
impacting the dependent variable.
So a value of less than point zero five will be used as a threshold to identify the variables which
are significantly impacting our dependent variable.
So if you look at the values of P for air quality and what room number and for other such variables,
you can see these are very small values.
It is written in scientific format that is in the exponential format.
So this value is actually eight point two four multiplied by ten to one minus zero five.
So this is a very small number.
So whatever the number is smaller than point zero five, that is, we are more than 95 percent confident
that that particular variable is impacting our dependent variable.
We will use only those variables and we will correspondingly see their capuchins.
When we are looking at their coefficient.
We have to look at two things.
First is the sign of that coefficient, and second is the magnitude of that collision.
If the sign is positive, that means increasing that particular variable will increase the Osprey's,
for example, in Rubner and getting plus four point zero one.
This means that if I increase the number one unit, keeping other things constant, house price will
increase by four units.
Whereas for every distance, the coefficient is negative, it is minus one point two, which means that
if I increase average distance from the employment hubs by one unit, the price of houses will decrease
by one point two units.
So it is important to look at the sign, which will tell you whether increasing the variable increases
the response variable or decreasing the variable increases the response variable.
And the second thing is magnitude, that is how big is that particular cooperation, if it is for that
means increasing it by one unit increases response variable by four units.
And if it is zero point zero zero five, it means increasing age by one unit will have negligible impact
on the response variable.
So we will look at two things of all those variables which are significantly impacting the house price
variable.
One is saying and the other is magnitude.
So in this way, whenever you have your marketing problem, collecting data for that problem, you can
run a linear regression analysis just the way we have demonstrated a law.
And using this final table, you can identify which all variable is important by looking at the p value
and what is the impact of that particular variable using the coefficient value once you have this column.
You can create the relationship between these dependent and independent variables and you can predict
the value of price using these coefficient.
So let us see how to protect the value of house price using the coefficient that we have predicted.
Let us bring one observation for which we are going to predict the house price.
So for this last observation.
Will predict the house price, so I'm going to paste it.
It interests me, so I had the data, although I listed it as transpose, that is why now I have this
data vertically now as per the equation.
The predicted price is going to be intercept, plus the value of this.
Crime rate coefficient multiplied by the value of crime rate plus value of resod area coefficient multiplied
by the value of residential and so on.
So in this column, I'm going to get the product of commission and the value.
I dragged down to the lassalle.
So this is giving us the impact of.
Those variables for these particular values.
Now, if I add all these cells and get the estimated price of Holth.
So my model is predicting a value of 24 units for the house, the actual price for the house was 19
units.
Similarly, we can predict the price of any other house for which we have the value of all these variables
and we want to predict the house price.
So this is all using the coefficient, we multiply the corporations with the value of a particular observation
and add them up to get defined and protected place.