Y hat dance

Lyric ©2005, 2006, 2009 by Lawrence Mark Lesser
may sing to tune of "Mexican Hat Dance" (traditional)

For (X, Y) data pairs, we call the Y's
The values observed. Now, let's fit a line!
For each X, the value of Y where on the line you would hit
Is known as a fitted value-- the value we say we predict.

And those fitted Y's always wear a hat:
A caret or circumflex are other names for that.
Subtracting the Y hat from Y is (vertical) error defined;
The sum of the squares of all these we want to minimize.

And that is all done by the line of best fit,
But first make sure you plot the points you'd like to fit!
And when you go plot all the scatter, do you see linear trend?
And does everything all look random for errors versus the fits?