ELEC 471
Prof. Rich Kozick

Class Example: Least-Squares Fit of Line Slope



Suppose that X and Y are two variables that can be approximately described by the linear function Y = a X for some value of the constant a. Your job is to determine or "estimate" the value of a from the following five pairs of measurements of (X, Y):
   X         Y
  ---       ---

 1.00     0.688
 1.78     0.849
 3.16     2.152
 5.62     3.024
10.00     5.453
A MATLAB program lsline.m is linked to this assignment on the Web. The MATLAB program plots the data values, and it also allows you to plot the "fit" provided by the equation Y = a X for values of the parameter a that you set in the program.

What do you think is the "best" estimate of the parameter a to fit the given data with the relation Y = a X? Justify your answer as quantitatively as you can. Explain exactly how you arrived at your choice of a. Note that there is not a single correct answer, but there are many incorrect answers!