MAT 331, Fall 1998
Project 1: Least-Squares Fitting
Due Tuesday, October 6
General Remarks. This project, like all in this class, has a significant component that is expository in nature. While writing your project report, please pay attention to organization, sentence structure, and so on. You will be graded on both the quality of your mathematical exposition and on the correctness of your computer work. You should treat this project as a paper, rather than as a typical homework assignment. A good paper should be complete and self-contained, surveying all the necessary background material.
While it is acceptable to discuss the project and how to solve it with your fellow students, the report you present must be your own. If you have significant discussions with others, it is appropriate to acknowledge who they are.
Your report can be a document produced by a word processor, a heavily annotated Maple worksheet, or even a hand-written paper (if your writing is legible). In any case, you should include the relevant graphics and Maple commands; these, of course, cannot be handwritten, but may be inserted via ``cut and paste''. Each of the two parts of the project should hang together as a single document, rather than as some discussion with a Maple session tagged on at the end.
Part 1.
In this part, you are given a collection of points,
,
,
,
,
which you believe to approximate a circle.
You are to find the circle that ``best fits'' these points,
using the technique of least squares.
In your report,
you should not only find the circle,
but also explain clearly what you are doing at each step and why.
As we saw in class,
the circle centered at
with radius
is the best fit
if the function
is minimized when
,
, and
.
Although Maple can find the critical points of this equation directly,
you should instead proceed as follows.
Defining
, express H(a,b,r) as a new function G(a,b,k).
Taking the partial derivatives with respect to the parameters a, b, and k
gives three linear expressions in the three variables,
so that G has a unique critical point, which is the desired minimum.
Give a complete explanation of this change of variables.
In your report, you should give a proof that the circle that gives a minimum for G always corresponds to the minimum for H. You could do this by showing that the equations
hold if and only if the equations
hold for some
.
In your report, you should discuss the general problem and its solution in full detail. Then you should discuss a particular example, using the Maple routine circle_pts() to generate some data points which approximate a circle. (This routine generates random data, so that each student has a different collection of data.)
Optionally, you can also discuss other possible means of measuring the
distance between a collection of points and a circle.
For example, what would be the disadvantage of using
the ``usual'' method of least squares to fit the relationship
?
Part 2.
Suppose that the data points
, i = 1,
, n
are assumed to approximate a line,
but that both the x-values and the y-values are viewed as approximate.
In this situation,
it makes sense to minimize the sum of the squares of the
shortest distance to the line instead of the vertical distance.
To do this, you first must find the shortest distance between
a point
and a line:
you minimize the quantity
as (x,y) varies along the line.
Note that there are several (equivalent) ways to represent the line
and compute the shortest distance.
You should choose whichever seems best to you.
You are to derive a least-squares fitting method for this problem and illustrate it by an example. Use the Maple routine line_pts() to generate some (random) data points which approximate a line. Compare the line you find in this example to the one given by ``usual'' least squares. Do they give essentially the same line? When do they differ? Explain.
You will not be able to reduce the equations for the best fit to linear ones; there is always be more than one critical point. Only one of them corresponds to the minimum. What is the geometric interpretation of the other one?
Be sure to describe the mathematics of
what you are doing in sufficient detail.
In particular, you must explain the derivation of your formula
for the shortest distance between a point
and a line.
Do not merely present the formula.