LINEAR REGRESSION APRIL 5, 2022 ADVANCED STATISTICS
SIMPLE LINEAR REGRESSION Regression analysis is simple statistical tool tool used to model the dependence of a variable on one (or more) explanatory variables. The functional relationship may then be formally stated as equation, with associated statistical values that describe how well this equation fits the data.
EXAMPLE Teacher Maria wants to find out if the number of absences of students affects their final grades. y Final Grade (Dependent Variable x Number of Absences (Independent Variable x 2 xy 65 9 81 585 70 11 121 770 90 3 9 270 92 75 7 49 525 84 4 16 336 476 34 276 2486
SCATTER PLOT
SOLUTION
USING EXCEL SUMMARY OUTPUT Regression Statistics Multiple R 0.93938813 R Square 0.88245005 Adjusted R Square 0.85306257 Standard Error 4.22468934 y’=93.704-2.536x Observations 6 ANOVA df SS MS F Significance F Regression 1 535.941333 535.941333 30.028089 0.00539936 Residual 4 71.392 17.848 Total 5 607.333333 Coefficients Standard Error t Stat P-value Lower 95% Upper 95% Lower 95.0% Upper 95.0% Intercept 93.704 3.13880487 29.8534009 7.4978E-06 84.9892806 102.418719 84.9892806 102.418719 number of absences -2.536 0.46279153 -5.4797891 0.00539936 -3.8209153 -1.2510847 -3.8209153 -1.2510847
EXERCISES: Advertising Expenditure (x) Sales (y) 100 500 200 700 300 900 400 1100 500 1300 600 1500 1. Suppose we want to predict the sales of a product based on the amount of money spent on advertising. We have collected data on the sales of the product and the corresponding advertising expenditures over the past few months, as shown in the table below: Using simple linear regression, we want to fit a line to the data that will allow us to make predictions about the sales of the product based on a given advertising expenditure.
EXERCISES: Credit Hours (x) Monthly Expenses (y) 12 1,200 15 1,500 18 1,800 21 2,100 24 2,400 27 2,700 30 3,000 33 3,300 36 3,600 39 3,900 2. Suppose we want to predict a student's monthly expenses in school based on the number of credit hours they are taking. We have collected data on the monthly expenses and the corresponding number of credit hours for 10 students, as shown in the table below: Using simple linear regression, we want to fit a line to the data that will allow us to make predictions about a student's monthly expenses based on the number of credit hours they are taking.
MULTIPLE LINEAR REGRESSION Definition: Multiple linear regression is a regression model that estimates the relationship between a quantitative dependent variable and two or more independent variables using a straight line .