## Least Squares Method

Posted: February 23, 2016 in Calculus: An Introduction
Tags: , , ,

The Least Squares Method is based upon the square of the vertical distance (error) from each point given to a general function; this function can be linear, quadratic, cubic, etc. in nature.

Squaring the errors mentioned above alleviates the “+/-” issue that arises from the fact that some points are above and others below the desired function. The sum of these “errors^2” (E) must then be differentiated with respect to each of the parameters found in the general function being used.

There will be two partial derivatives for linear functions, three for quadratic functions, and so. Each partial derivative is then set equal to zero, since our objective is to minimize the error. For linear regression, the result will produce two equations, each in two variables; quadratic regression yields three equations in three variables, etc., etc., etc…… These equations must be solved in such a way as to find values of all parameters that meet, simultaneously, the objectives set forth (minimizing the error).

Students will recognize very quickly from their work in Math 20-1 the systems of equations in two variables that emerge from the linear regression shown below. By exploiting matrix operations on their graphing calculators, students can make quick work of solving simultaneous equations in three (or more) variables. This would be a perfect spot from which to launch the study of linear combinations of vectors; a completely different perspective on minimizing errors awaits here.

Partial Derivatives:  When differentiating with respect to a particular parameter, all other parameters are considered as constants.

Linear Regression

Click on the link provided to explore linear regression.

In the spirit of consistency, I’ve included a quadratic regression below for comparison to the previous linear counterpart.

As mentioned earlier, the subject of this entry provides a very nice point from which to commence the study of linear combinations; that perspective will eventually be linked here.

## Math Project Idea

Posted: February 15, 2016 in Differential Calculus
Tags: , ,

Grade 10 class would be split into two groups. Each group would then select a linear function and determine 3 ordered pairs that satisfy their function.

Those ordered pairs would be handed off to Math 31 students who would then use Method of Least Squares and partial differential equations to develop a system of linear equations in two variables for each set of points they received.

These systems of linear equations would then be sent back to the Grade 10 class to the opposing group. The solution to each system would reveal the parameters from the original function of the rival gang. Members would then “guess” the original equation of the other group.

The same “contest” would occur between Grade 11’s and Math 31. This time, however, quadratic functions would be the subject and 4 ordered pairs produced for each group.  The systems of equations received back from Math 31 would be quadratic in nature, containing three variables.