% -*-latex-*-
\documentclass[12pt,twoside]{article}
\usepackage[dvips]{epsfig}
\usepackage{html}
\usepackage{fullpage}
\pagestyle{myheadings}
\markright{{\bf Math 331, Spring 2002}}
%\topmargin = -.75in
%\textheight= 10in
%\oddsidemargin= -.6in
%\evensidemargin= \oddsidemargin
%\textwidth=7.5in
\begin{document}
\thispagestyle{empty}
\begin{center}
{\Large MAT 331, Fall 2002}\\[\baselineskip]
{\Large\bf Project 1: Least-Squares Fitting}\\[.25\baselineskip]
{\large\it Due Wednesday, October 9 (Rough Draft due in-class Mon 10/7)}
\end{center}
%
In this project, you are to fit a line to some data in three different
ways. First, by using the ``usual'' least squares method, which
minimizes the sums of the squares of the vertical distances between
the data and the line. Then, find the line given by assuming that the
$x$ variable may contain the errors, and minimizing the sums of
squares of the {\em horizontal} distances. Finally, you are to find the
line that minimizes the sum of the squares of the {\em absolute}
distances from the points to the line. (In this case, you may find it
convenient to write your line as $y=x\tan\theta + b$ instead of the
usual $y=mx+b$; you could write the other lines that way as well; it
makes no difference). See the three figures below.
\begin{figure}[h]
\centerline{\psfig {figure=lv.eps,width=.2\hsize} \hfil
\psfig {figure=lh.eps,width=.2\hsize} \hfil
\psfig {figure=le.eps,width=.2\hsize} }
\end{figure}
In the third case (minimizing the absolute Euclidean distance), the
equations you need to solve to find the minimum will be nonlinear, and
you will discover that there are two critical points. Only one is the
minimum; what line does the other critical point correspond to? You
might find it helpful to use {\tt plot3d} to draw a picture of the
surface that you are finding the minimum of. You should, of course,
also have Maple plot the 3 lines you find along with the data points.
Your project should be written as a paper which explains clearly each
step you take and why. In particular, you {\em must} give a careful
derivation of the functions you minimize--- you cannot merely quote
the formula for the distance from a point to a line. You may, of
course, assume that the formula for the distance between two points in
the plane is known to the reader. Your paper should be written so
that someone who has a good working knowledge of mathematics but has
never taken this class will understand what you are doing and why.
You should use Maple to do the actual computations. While it would
make for a more readable paper to intersperse your Maple calculations
along with your exposition, you may write your exposition first and
append the Maple at the back. However, {\em do not} include false starts,
mistakes, or irrelevant calculations in your finished product. Pay
attention to spelling, grammar, and sentence structure. The expository
part of this project counts as much as the actual calculations, and
should not be ignored.
\smallskip
You will find a file containing the data points at
\centerline{{\tt /home/mat331/www/projects/data1/{\it username}.txt},}
\noindent
where {\it username} is the username of your mathlab account. Use
Maple's {\tt read} command to load this data. Of course, this file is
also available from the class web page.
\end{document}
%
\bye