 Dear student, today we are going to learn the application of the multiple regression analysis. This is the very important topic and here is the very important exercise and the example is the marks obtained by a student in the final examination are supposed to depend on his marks in the class test and the number of lectures he attended. Now, look at the important example we have. We have obtained the marks obtained by a student in the final examination and the final examination marks are depend on his class test and the number of lectures he attended. Basically, boys' data, number of lectures he attended. The following data shows the marks in the final examination, marks in the class test and marks and the number of lectures he attended by 8 students, total 8 students' data and what we have to examine in the data of 8 students, marks of his final examination. Which depends on the class test and the number of lectures he attended. This is the data, here we have the marks in the final examination so we can say that this is the y. Marks in the class test, so this is the x1 and number of lectures out of 50, this is the x2. Suppose that. Now the first part is, estimate the regression of final exams on the class test and the number of lectures he attended. We have to fit the regression line and we have to estimate the final marks and the final marks depend on the class test and the number of lectures attended. Second part, there is the overall significance of the regression. We have to check the overall significance of regression. Number third part, estimate the expected number of final examination on 85 marks in the class test and 35 lectures he attended. What we have to do in this? We will estimate the marks of his final examination when he had 85 marks in the class test and he attended the total 35 lectures. And number fourth part is, estimate the marks, then we have to estimate the final marks on the basis of the class test and the lectures attended. Or finally we have to determine the 90% confidence interval. This is the whole scenario of the example and the first part is the solution. It is clear that the response variable y, now we have to let dependent variable which is called the response variable that is y is the marks in the final examination and two explanatory variables. So, we have two independent variables. So, we can say that the explanatory variables are the marks in the class test. This is called the x2 and the number of lectures he attended, x3. Here, basically what we have done is this is the x2 and this is the x3. So, the regression line to be estimated is this. This is the y, y is the dependent variable, beta1 plus beta2 x2 plus beta3 x3. Basically, here we have y and I can call y as y which is equals to beta0 plus beta1 x1 plus beta2 x2 and plus error which we call epsilon. Now, I have written the previous one, I have written its cutting. But the model given here is this, beta1, beta2 x2, beta3 x3. It means that we have called the class test x2 and the lectures attended we are calling x3. This is the general equation and in the matrix form y which is equals to x beta plus e. We have developed all these mathematics earlier. We are using the same mathematics here. Here is the beta cap which is equals to x prime x whole inverse x prime y. Now, how is the beta cap value determined? Now, we have the vector x. So, matrix x which is equals to, this is the x, 1, 1 up to so on 1, x11, x12 up to so on x1n, x21, x22 up to so on x2n. This is the x. And here is the x transpose which is equal to the, 1, 1 up to so on 1, x11, x21, x12 up to so on x1n, x21, x22 up to so on x2n. This is the x prime. And now here, x transpose x which is equal to the, 1, 1 up to so on 1, x11, x12 up to so on x1n, x21, x22 up to so on x2n. 1, 1 up to so on 1, 1 for n times, x11, x12 up to so on x1n, x21, x22 up to so on x2n. Now, look at this. Here, you have how many rows in x? In x, you have how many rows? n rows. And how many columns? Now, we have three columns. And here, you have how many rows? We have three rows and n columns. Now, let's check here. What is the x transpose? You have three into n. And here is the order. We have the x of n into 3. So, what is the final order? 3 x 3. So, x transpose x's final order is 3 x 3. First row multiplied by first column. 1 multiplied by 1, how many times? n times. So, here, we can write this n. 1 multiplied by x1, x12, x1n. So, this is x1. 1 multiplied by x21, x22. So, this is x2. Similarly, you have x1, sum of x1. So, second row, second column, sum of x1 square, sum of x1, x2. This is the cross multiplication. x2, sum of x1, x2. And the last sum of x2 square. This whole procedure, when we have the two independent variables. So, we have x prime x. Similarly, x prime y. x prime. Now, we have x prime. We have seen what is x prime. Then, y column will come. We will multiply it. So, x prime is the 1, 1 up to so on 1. x11, x12 up to so on, x1n. x21, x22 up to so on, x2n. So, what is y? y, we have y1, y2 up to so on, yn. So, final, we have x prime y. 1 multiplied by y1, y2, yn. This is the sum of y. So, x1 multiplied by y. Second row multiplied by column. Sum of x1, y. Third row multiplied by column. Sum of x2, y. This is the general result. Now, in a particular example, we don't have x1. So, in a particular example, we are taking sum of x1. We have taken sum of x2. And we are replacing sum of x2 with sum of x3. In a particular example, here is the variable we have x2, x3. And we have solved it with x1. If we had this model, we could have solved it with this. Now, in a particular example, I have told you that we have put x1 instead of x2. Instead of x3, we have put x2. Now, we are solving it according to this. Now, this is x transpose x. And the total number of values was n and 613. This is sum of x, 293. This is sum of x1 and the x2. So, we can say that this is the sum x2 and this is the sum x3. And this is the n. And this value is the sum x2 square. And this value is the sum x2, x3. And the last, this is the x3 square. X transpose x values are going. Similarly, x transpose y, this value which is equals to sum of y, sum of x2y and this is the sum x3y. We have put the data in front of it. Now, next, we have beta. So, you know that the beta cap which is equal to x transpose x whole inverse x transpose y. Now, what have we done? This beta, x transpose x whole inverse. This is the x transpose y. First, we have to take its inverse. Then, we have to multiply it with x prime y. So, finally, we will get the answer of this. This is the beta cap. This is the beta. This is the beta 1. This is the beta 2. Estimated values. And this is the beta 3. So, the estimated regression line y on x2 and x3. This is the regression model. Here is the y. This is the response or the dependent variable. Equals to beta 1. What is beta 1? Minus 31.263.264. Plus beta 2. Beta 2. 1.020x2. And the last beta 3. 0.070x3. This is our regression equation. So, what was our first part? First is the estimate the regression of the final exam on the class test and the number of lectures he attended. So, first part, we solved this. And our first regression line developed. So, the next step, second part is the to test the overall significance of the regression. Overall significance of the regression. You know, we have to draw its inference. For inference, we have the six steps. First step, construct the hypothesis. First, I have constructed the hypothesis. Beta 2 equals to beta 3 equals to 0. And the alternative hypothesis. Either of beta 2 or beta 3 is not equals to 0. This is the hypothesis. Second step is the level of significance. So, alpha which is equal to 0.10. It means that we are 90 percent confident and we have alpha is 10 percent. And the third step is the test statistics to be used. This is the test statistics. If we recall a little bit, we developed its mathematics in our previous lecture. Now, the numerator is the regression sum of scale and the denominator is the error sum of scale. Or residual sum of scale over error sum of scale. And these are the degree of freedom which if H0 is true, the F distribution with K minus 1 and N minus K is the degree of freedom. So, this is the test statistic. And the fourth step is the computation. What did we do in the fourth step? We have this value. We added it directly. We solved this factor. Then we solved this factor. After subtracting it, we have the final result of numerator. We have to divide the degree of freedom in the numerator. But we have this result in the numerator. And denominator is the E prime E. Or you have the formula of E prime E. We solved it. Then we have the result. 372.8. Finally, F statistics. This is the F statistic. Now further, we have this factor divided by its degree of freedom and the error sum of scale divided by its degree of freedom. Then that means that the error will be converted when we divide it with the degree of freedom. So, basically what you had here. If you check here, K minus 1. How many parameters you have which we estimate. How many columns you can say or how many variables you have. So, we have three variables. That is called the 3 minus 1. How many values you have. This is the N minus K. How much total data we have. N minus K. And K we have 3. Now the final F which is equals to 7.1. This is the calculated F. And the next step is the critical region. So, the calculated F is greater than the critical value. So, we reject H naught. So, we reject H naught. Here you have alpha and we take alpha by 2 because we have taken two sided test. Alpha by 2, 10 percent alpha. We have 0.10 and alpha by 2 which is equals to 0.05. So, degree of freedom K minus 1, N minus K, 2 and 5. We check on the table. Here is the degree of freedom 1, 2 and this is the 5. 5.79. This is the table value. 5.79. Now put the value of this. 5.79. We have the calculated F. So, we have the calculated value 7.1 which is greater than the table value 5.786. So, what is the conclusion? Regarding this we know that the calculated value is greater than the critical value. So, we reject H naught. The final step is the conclusion since our calculated value F falls in the rejection region. So, we will reject H naught. Now, what we conclude that reject H naught means it may be concluded that the marks in the final examination depends on the marks in the class test and the number of lectures he attended. That is, the final marks that we have are depending on our class test and the number of lectures attended. So, we have an example of our daily life. If we suppose that our marks do not work in the final exam but we concluded that the marks in the final examination will depend on the class test and the number of lectures. We have such a good conclusion with this. And the third part we did the regression for the first part and the second part we did the testing regression and the third part which is very important to predict. It means that we check what are the responses the estimated mean value of the response variable Y this is the dependent variable and this is the final examination marks at x2 equals to 85 if the marks of the class test are 85 and we have attended 35 lectures in the class then we predict the marks of our final examination what we will get. Now, this is the formula expected value Y0 Y0 stand for we have predicted it given that x2 which is equals to 85 and x3 35 Now, what was the equation here? We had the equation Y which is equals to minus 31 point something plus beta's value was with us. Look at the equation what is the result of the equation? this is the equation minus 31 point 264 plus 1 point 0 2 0 x2 Now, what was x2? How many of the marks we have to take? Look here, what do you have in question? x2 is the 85 and x3 is the 35 this is the 85 plus 0.770 35 Now, we have predicted what will be the value of Y which means what will be the result of the final exam? which is equals to 82 point 386 If we work harder and take 85 marks in the class test and attend 35 lectures then our final marks will be 82.36 So, this is the prediction and also 100% confidence interval is given this. Further, now we have to check the confidence interval. What is the confidence interval? This is the formula of to find the confidence interval x0 prime beta cap plus minus t alpha by 2 this is the degree of freedom here is the standard deviation and this is the standard error square root. Now, s which is equals to e prime e divided by n minus k square root and where is this formula? We have derived this formula using this formula directly here. You have the value of standard deviation 8.635 and the x0 prime x prime x transpose x0 prime Now, we have x0 that is the 1 x2 x3 this is x0 Now, we will take the prime means we will transform the rows in columns then x transpose x inverse this so finally we have the within bracket values means we have this value within bracket which we have the result is 0.272 and you know that the 100% into 1 minus percent which is equals to 95% we have 95% confident that our mean values lie in this limit so alpha which is equals to 0.05 82 point this this is the value 82.386 this is the value 82.386 this is the x0 beta cap 82. this plus minus t alpha by 2 2 and 5 is the degree of freedom then this is the s value and here is the value of 0.272 so finally we have defined this after finding this we have taken the table value then we have multiplied this minus is the low limit plus we will have upper limit so we have 95% confident that the mean values lies between 70.8 to 93.64 how much we have we have concluded that if our 85 marks will come in class test and we will attend 35 lecture so our final examination marks will lies between 70.80 to 93.64 so we have solved such a good example which is the example of your routine routine is that your marks depend on class test and lectures attended