Visualizing SSR as Optimized function of the Slope
Narrative for the exploration of the GeoGebra Applet
In this GeoGebra applet, we are exploring and experiencing the narrative of the Sum of Squared Residuals (SSR) as a function of the slope mmm or as a function of the y-intercept b.
We begin the process by plotting the data points in the spreadsheet to create the corresponding graph.
Next, we add sliders for m (slope) and yregy to manually derive the regression line, which is also computed by GeoGebra using the FitLine functionality. Please feel free to use these sliders to explore.
Then, we express the regression line as a function of m (the slope of the estimator) and yreg (the y-intercept of the estimator).
The most interesting part of this applet is the presentation of the SSR function as the sum of squared residuals, represented by the component h(m).
Here is the notation for the SSR function:
Next, we compute the derivative of h(m) by simply typing h′(m) in GeoGebra.
To optimize the slope, we set the derivative h′(m) equal to zero using the Root functionality in GeoGebra.
We obtain the root of h′(m) using the command Root(h'(m)), and we get the point (0.28, 0).
Thus, when the derivative h′(m)=0, we find the optimized value for the slope, which is 0.28.
This is true when the slider for yreg is set to 5.27, the optimized value for the y-intercept.
These optimized values for the slope and y-intercept can be validated by checking the linear function output from the FitLine functionality.
Above the data points, we can visualize the parabola graph representing the SSR function.
Additionally, the orange line represents the derivative of the SSR function.
Point B on this line passes through or near point A, which corresponds to the optimal value of the slope (0.28).
Please replicate this setup. Then, using the same logic and process flow, write the SSR function as a function of the y-intercept.
Enjoy and have fun!