Regression 6. Finding Unknown Parameters with OLS - Solved Manual Example
You can learn how to perform linear regression by watching my YouTube video. Numeric Example A hypothetical dataset about how online gaming habits affects marks involving children in the age group of 10-15 is tabulated. The first feature is the number of hours in a day spent in gaming. The second feature gives the average marks of the students who spend so many hours in gaming. Problem Statement Find the regression coefficients m and c in the linear regression model using Least Squares Approach: y = c+ m*x Step 1: We need to check if there is linearity between the dependent and independent variables by plotting the scatter plot. We see that there is a linear relationship between the data and so we can apply linear regression. From the blog on OLS, we know to calculate c and m as : This can be easily calculated by hand with a table as follows: So, the regression equation representing the relationship between 'Hours Spent' and 'Marks (%)' is: Marks = 89.0 − 5.5 × Hours Sp...