According to The Song of Insects by G.W. Pierce (Harvard College Press, 1948) the sound of striped ground crickets chirping, in number of chirps per second, is related to the temperature. So the number of chirps per second could be a predictor of temperature. The data Pierce collected is shown in Table., where is the (average) number of chirps per second and is the temperature in degrees Fahrenheit.
A scatterplot of the data would show that, while the relationship between and is not exactly linear, it looks to have a linear pattern. It could be that the relationship is really linear but experimental error causes the data to be slightly inaccurate. Or perhaps the data is not linear, but only approximately linear.
If we want to use the data to make predications, then we need to fit a curve of some kind to the data. Since the cricket data appears roughly linear, we will fit a linear function of the form to the data. We will do this in such a way that we minimize the sums of the squares of the distances between the values of the data and the corresponding values of the line defined by . This type of fit is called a least squares approximation. If the data is represented by the points , , , , then the square of the distance between and is . So our goal is to minimize the sum of these squares, of minimize the function defined by
Calculate and .
Solve the system and to show that the critical point satisfies
Use the Second Derivative Test to explain why the critical point gives a local minimum. Can you then explain why the critical point gives an absolute minimum?
Use the formula from part (b) to find the values of and that give the line of best fit in the least squares sense to the cricket data. Draw your line on the scatter plot to convince yourself that you have a well-fitting line.
Long, Keller & Schlicker, Active Calculus Multivariable, §11.10 Optimization, Exercise 40