 In this video, we will discuss what is multiple regression. So, again the same regression can be classified into simpler multiple, we will talk about multiple here. To tell you that multiple regression means it has one dependent variable and multiple independent variable. So, which means there are two so independent variable and dependent variable that is the final marks. This data we have seen previously multiple times you know examples. So, I am using same example so that we know how the same example can be used for different models, how it is be, how different models predict the score in a different you can compare that also. So, in attendance and midterm we already plotted this. Now we want to predict by using this what is the final marks out of 100 which we cannot show it in this simple plot you know two dimensional plot we cannot show that here. The data in the plot is not matching but consider this is the plot. We cannot show the final marks in it maybe you can do for each data. Say there is a data of say 45 percentage or 40 percent and 80 percent in midterm marks you might able to plot what will be the mark something like that maybe a 70 or 80 you can write the marks on top of it that might be good for classification algorithm not for regression algorithm. Let us see how it be used for regression algorithm. Y predict is equal to 31.45 plus 0.4 X1 and 0.2 Tx. So, that is the linear regression model for the data we gave attendance is in percentage and midterm marks is here is X2. So, the first variable is attendance in percentage and second variable is midterm marks and r equal to 0.85 r square is equal to 0.72. If you remember the correlation coefficient r that is what computed here the r square is this but it is not the correlation coefficient like we did with one variable and one X and one Y instead this is with the two variables. So, that is called regression coefficient. Let us see that if it is 0 it means no relationship between the variables X1 and X2 to Y if this near to 1 or 1 is a perfect relationship perfect linear fit between X1 and X2 to Y near to 1 is good. So, it is good. So, I plotted this linear regression in excel sheet using data analysis tool and here it considers only the midterm marks to predict the final map score final marks in the out of 100 and predicted value and the final actual marks you know this is the predicted value this is the actual marks is a predicted value the fit is kind of okay. If you consider only the attendance the fit is again it is good it is not very bad. So, individually each variable is doing good and we have seen that this variable as high correlation we discussed that in one of our correlation matrix video right we remember that. So, this is good. So, these two variables are correlated and they also fit best with the final marks out of 100. So, what that means in multiple regression is suppose you have this particular you have this particular prediction value that is the linear model learned from this 67 data right and you want to predict the future marks you can use this model to predict it. Let us see what is this predictive model do for the given data that is on the training set itself. For predicting a student 1 data I would add 3 at 1.45 plus 0.4 into x1 is 56 and 0.22 into x2 0.22 into x2 is 45 0.22 into x2 is 45 if you compute this the mark will be 63.75 the final mark is the actual mark is 70 the predicted mark is 65. So, the the error is 63.75 minus 70 into square that is the error and if you compute the error like that for all these values and average of that error is the least mean square error value. So, then we like the best fit model. So, this is how it is computed. Let us see how it works for if I compute that for all the models the answers like this. So, this value is a bit different you know 63.7584 it is because I ignore the values beyond the 2 decimal point right. So, the system computes all the values and this is a kite result. So, yeah. So, this says that this is best fit for some of the data for example, student number 4 it is good and also student number 6 it is good but others it is not so great or so perfect but that is fine this is the model we get it best fit model. Now, using this model if it is very interesting that if you want to predict if you want to predict some student you have no idea about the student if the student has say 75 percentage attendance also E squared midterm marks say 50 something like that. So, what will be that students performance? So, consider this data you got this particular data right this particular data this old table you know consider this old table kind of this old table data this old table data you got it from say this table you got it from historical data for last year last 2 years data kind of like 100 data you have or 200 students data and you created this model and this is the student 1 in a current semester. So, if the student 1 this is a student 1 in a current semester he has attendance and midterm marks. Now, do you want to predict what will be the students final score in the exam? So, you apply this model. So, the students final score in exam y predict equal to 31.45 plus 0.40 into 75 percentage that is you can use 75 acidas and plus and 0.22 into 50 midterm marks y s due to use acidas maybe that system would have used acidas. So, I used actually the same mark I did not put the convert that into up like 75 points on for something like that anyway. So, this is the mark if you compute this this is a mark the student want to get it you know in a current situation we may see that a lot of institutions campuses or universities are cancelling the enzyme exams the better way to do it let us take the students the current students who are in the class fourth year third year or the previous historical data on particular course take all this data and compute is there any fit by computing the midterm marks or term one marks and attendance or any other variable you can collect. Create a model and make that model is very accurate I precisely doing it then apply that model to predict the score that will be a better way to do it. However, given the current scenario things are not that way things were computed just based on 80 percent marks in last year's score or some university goes by midterm marks some value or the students performance still makes them students performance still makes them is still good you know why because that actually proved if you compute the last to 5 years data or something the midterm mark is actually called highly correlated with the enzyme marks. So, yeah, but this should be the right method to do if you are interested if you have a data access to the data you can go and take the data of last 5 years students data and compute the current students data and see how it works you know then you may not have the actual value that is fine but you can predict it as much as good. It is interesting that we saw in a simple linear regression also the in multiple regression does intercept like 31.45 in this equation or there is some other values in the previous equation what is this intercept means what is significance of this 31.45 what is this intercept take a moment you know this intercept is the line extended towards the 0 in x value that is the where it is crossing in a y scale that is a value good but what is that means take a moment think about it write down the answers after writing we do not rush in the video to continue. So, intercept means with no values of x 1 and x 2 why will predict the intercepts the y actually gives the if x 1 is no value 0 x 2 is equal to 0. So, what are the intercept plus that value is what given in a y mean value of vi with all independent values set to 0 is actually the intercept value if you have to compute it that is how you have to do it and it can be past you are negative that is very very important. So, it is very very important it can be possible do not try to interpret the meaning of the intercept that is not correct this intercept is very very important for linear regression to create a best fit model you know but there is no meaning to it do not try to identify the meaning of the intercept some model with a better intercept no not really true. In educational settings if the student is not attending the class also he got 0 mark in the mid-seminar than the class what will be the final score? So, institute may not even allow the student to write exam the final score be 0 but the model might say 31 marks it is not correct if we allow the student to do that he might get the 31 marks we do not know or some cases you know some particular examples there is a possibility that a person may not even come to work at all and a person may not able to perform the duty still he might get up some basic minimum wage you know as per the norms or something like that that kind of that is a minimum wage anyone can get it even if you work do not work that can be an intercept but do not try to interpret the meaning of this intercept that is the idea. So, maybe if the x values cannot be 0 I commit sames and items cannot be 0 then do not even try to interpret. So, in education the things do not do try to do that most important thing in linear regression or simple regression or multiple regression is the most important thing is y is say c plus x 1, w 1, x 2, w 2. So, now you thought I said do not interpret the meaning of c what is w 1 and what is w 2 what is the significance of w 1 and w 2 keeping the other value constant consider the x 2 is same keeping the other value constant how much the x 1 as relationship with y is defined in the y w 1. I said in the last video what is the advantage of using linear regression or regression model is to create the indicator of each variable with the y that is called the indicator. If you keep all other variable values constant except that variable x 1 all other x 2, x 3, x 4 all other variable keep constant. This particular relationship or relationship between x 1 and y is given in this weight. Similarly, if you keep all other things constant except w 2 relationship between x 2 and y is given in the weight w 2 that is how the relation varies if it varies by 1 this will vary by say if it is 0.8 if it is under this will be 80 something like that. The you can interpret the meaning of the weights not c in this indicates how strongly this particular variables correlated with the y keeping all other variables constant. That is the linear regression. Thank you.