The second step is to calculate the difference between each value and the mean value for both the dependent and the independent variable. When calculating least squares regressions by hand, the first step is to find the means of the dependent and independent variables. How do you calculate a least squares regression line by hand? If we wanted to know the predicted grade of someone who spends 2.35 hours on their essay, all we need to do is swap that in for X. Now we have all the information needed for our equation and are free to slot in values as we see fit. The final step is to calculate the intercept, which we can do using the initial regression equation with the values of test score and time spent set as their respective means, along with our newly calculated coefficient. Slotting in the information from the above table into a calculator allows us to calculate b, which is step one of two to unlock the predictive power of our shiny new model: If we do this for the table above, we get the following results: The symbol sigma ( ∑) tells us we need to add all the relevant values together. Let's remind ourselves of the equation we need to calculate b.
By squaring these differences, we end up with a standardized measure of deviation from the mean regardless of whether the values are more or less than the mean. You should notice that as some scores are lower than the mean score, we end up with negative values.