|
Math 121 - Calculus for Biology I |
| |
|---|---|---|
|
|
San Diego State University -- This page last updated 02-Feb-09 |
|

with y increasing with increasing x.

with y decreasing with increasing x.
Solution:

10.89
10.89
Solution:
The average of the x data values:

The slope a of the best fit line is calculated as follows:

The intercept b of the best fit line can then be calculated.

The equation of the best fit line is:


The sum of square errors with this model compared to the data is 8.167, which is lower than the sum of square errors from either Model A or Model B.
Note that since the best fit model shows y increasing with x, Researcher A actually has a more appropriate model than Researcher B. However, more data points are necessary in order to develop a more accurate model of the data.
You can also use Excel to find the best fit line.
Example 3: Often data sets have points that are clearly erroneous due to problems with the experiment (say contamination) or simply a poorly recorded value. If these points are included in the model, then they can result in misleading models.
We saw that growth rates are determined by the slope of a line from our example on juvenile height.
a. Consider the following data set:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The least squares best fit to this data set is given by
Determine the growth rate for this model and find the sum of squares error. Graph the data and the least squares best fit line.
b. Which point is most likely erroneous? When this point is removed, then the new least squares best fit model is given by
Determine the growth rate for this model and find the sum of squares error for this model. What is the percent error (taking the growth rate from the model in Part b. as the actual one) between the computed growth rates?
Solution:
a. The growth rate is represented by the slope of the best fit line, or 0.437 cm/week. The sum of squares error is calculated as follows:
J (a, b) = e12 + e22 + e32 + e42 + e52 + e62 + e72, where:
So the sum of squares error J =1.0008.

b. From the squares of the errors calculated above, the point with the most error is (7, 4.9), or the second to last point in the data table. Eliminating this point from the data set yields a new best fit line, and a smaller sum of squares error, as shown below.
which is only 9% of the sum of squares error from Part a.
Percent error is calculated as follows:

If the new best fit growth rate is assumed to be the theoretical value, and the old best fit growth rate is the experimental value, the percent error is
