SDSU

Math 121 - Calculus for Biology I
Spring Semester, 2009

 © 2001, All Rights Reserved, SDSU & Joseph M. Mahaffy
San Diego State University -- This page last updated 26-Jan-08

Least Squares Analysis

Outline of Chapter

  1. The C period forE. coli
  2. Least Squares Best Fit
  3. Worked Examples
  4. Juvenile Height Revisited
  5. Calculating Percent Error
  6. References

 

 

The most common technique for fitting a straight line to data is the linear least squares best fit or linear regression. (The term regression comes from a pioneer in the field of applied statistics who gave the least squares line this name because his studies indicated that the stature of sons of tall parents reverts or regresses toward the mean stature of the population.)

 

 

Finding the C period for E. coli

..

..

.

..

..

Click Image to Enlarge

 

Download the AVI movie

 

 

 

 

 

 

 

Pulse Labeling Experiment

t (min)

10

20

30

40

c (cpm)

7130

4580

2420

810

 

 

 

 

c = at + b

 

Alternate link

 

The least squares best fit to the data is given by the line

c = -211t + 9010.

The t-intercept is 42.7, so this model estimates the C period as 42.7 min.

 

 

Least Squares Best Fit

y(x) = ax + b.

 

 

|ei| = |yi - y(xi)| = |yi - (axi + b)|, i = 1,...n.

The least squares best fit is found by finding the minimum value of the function

The technique for finding the exact values of a and b uses Calculus of two variables. The formulae for finding a and b can be found in any book on statistics. A hyperlinked appendix is provided to give you these formulae, but this is only provided for completeness and not as part of this course. You will learn much more about this topic in your Biostatistics course (Biology 215).

 

 

Worked Example:

c(t) = -211t + 9010.

e1 = c1 - c(10) = 7130 - 6900 = 230.

e2 = c2 - c(20) = 4580 - 4790 = -210,

e3 = c3 - c(30) = 2420 - 2680 = -260,

e4 = c4 - c(40) = 810 - 570 = 240.

J(-211,9010) = 52900 + 44100 + 67600 + 57600 = 222,200.

 

 

Hyperlinked section to Worked Examples related to the homework problems.

 

 

 

Juvenile Height Revisited

 

Alternate Image - Alternate link

The resulting least squares best fit to the data is given by the line

h = 6.46a + 72.3.

The square of the error is found to be

J(m,b) = 41.5.

 

 

 

 

 

Calculating Percent and Relative Error

There are a number of techniques for computing the error in a measurement. Let Xe be an experimental measurement and Xt be the theoretical value. In this course, most often Xe will be the value from a model that we want to test, while Xt will be results from actual data that we acquire and assume is true. The actual error is simply the difference between the experimental (or model) value and the theoretical (or actual data) value. So the actual error is given by

Actual Error = Xe - Xt.

Often we only need the magnitude of the error or as in the case of the least squares best fit the error is squared making the sign of the error irrelevant. In this case, we use the absolute error, which is simply the absolute value of the difference between the experimental (or model) value and the theoretical (or actual data) value. So the absolute error is given by

Absolute Error = |Xe - Xt|.

More often the error is presented as either the relative error or percent error. This error allows a better comparison of the error between data sets or within a data set with large differences in the numerical values. The relative error is the difference between the experimental (or model) value and the theoretical (or actual data) value divided by the theoretical (or actual data) value, so

The percent error is closely related to the relative error, except that the value is multiplied by 100% to change the fractional value to a percent, so

 

 

 

 

 

References:

[1] J. L. Ingraham, O. Maaloe, and F. C. Neidhardt, Growth of the Bacterial Cell, Sinauer Assoc., Inc., Sunderland, MA, 1983.

[2] Ruth Kavenoff and Brian Bowen, Bluegenes #1, Designergenes Posters, ltd., 1989.

[3] F. C. Neidhardt, Escherichia coli and Salmonella typhimurium: Cellular and Molecular Biology, American Society of Microbiology, Washington, D.C., 1987.