For any given choice of the four parameters, we calculate the discrepancy (in other words, the error) between the sine-wave fit and the actual data at every one of the twenty-seven points recorded throughout the year. A natural criterion for choosing the best fit is that the total error, summed over all twenty-seven points, should be as small as we can make it. But total error is not quite the right concept, because we don’t want the negative errors to cancel the positive ones and give the false impression that the fit has less error than it does. Undershoots are just as bad as overshoots, and
...more