In some situations, not all data points should be treated equally.
For instance, suppose you want your approximating function F(x) to
essentially interpolate the first and last data points, e.g., perhaps
you trust those values more, or you know for other reasons that
your approximation must pass directly through those points. A
simple way to cause this to happen is to weigh more heavily those
equations in the overdetermined linear system.
In this way, the solution that minimizes
the squares of the residuals will be sure to make those residuals
much closer to zero than the the residuals corresponding to the
other points.
Repeat the previous problem, but with the 1st and last equation in
the overdetermined linear system A*alpha = y scaled by
a factor of 10.