
Consider the following graph:

At the point where the curve is the lowest, the slope of the line tangent to the curve has a slope of zero. Calculus is used to find the point where the function is a minimum, i.e., where the slope of the tangent line is zero.
Deriving the Least Squares Regression Coefficients:
The Regression Equation

Computational Simplification

From Calculus...
Derivation of the Constant

More Calculus...
Deriving the Regression Coefficient


In Deviation Score Form
