St. Lawrence University homepage SLU Physics homepage

 

Finding the Best-Fit Function
Instructor Notes

 

  • Computers are needed for lab this week – ideally, one computer per student!
  • More practice using KaleidaGraph, this time to analyze non-linear functions. Again, each student should have their own computer, if possible
    • A lab practical skill!
  • Three sets of data have been copied to the T: drive for analysis:
    • Data Set #1: Quadratic (2nd order polynomial); y = a+b*x+c*x^2
    • Data Set #2: Exponential (base e); y = a*exp(b*x) (the value of b is positive)
    • Data Set #3: Exponential (base e); y = a*exp(b*x)(the value of b is negative)
      • See "Important note for Data Sets #2 & #3" below!
  • When choosing a 2nd order polynomial from the built-in functions, KaleidaGraph always shows a 9th order polynomial in the results box. Annoying, but harmless; the values of a quadratic are correctly calculated
  • From this point on, students should express the model function they get from their graphs using the quantities from their data. This week they should get d = a + bt + ct2 and d = a·e(bt)
  • They get confused about the units they need for each parameter, as well as the residuals and SSR. Since they haven't yet covered kinematics in class, they have to figure out the units for the quadratic. Remind them that the quantities on the right side need to work out so that they equal the left side ('m' in all three cases). The two exponentials will also confuse them, but ask them what the units would have to be to make the power that e is raised to unit-less.
  • Important note for Data Sets #2 & #3:
    • The function can also be entered as y = a*e^(b*x), but not y = a*e(b*x); e is interpreted as a number in the second case
    • This data can also be fit by a power function: y = a*b^x. Either result is acceptable. Both functions yield the same SSR value (7.8993 m2 for Set #2). This is because bx = eln(b)·x
      • Example: 1.3x = eln(1.3)·x = e(0.26)·x = 1.3x
    • If students produce a log plot for data sets #2 or #3, they have plotted t vs. d!
  • Students will hand in a total of 6 graphs: 3 with the function fit for each data set, and 3 residuals plots. In the graphs below I have both the built-in and custom functions on each graph; students graphs should have only their custom fit. If a residuals plot does not match one that appears below, then students probably chose residuals using the built-in function, not the one that they defined:
    • Data Set 1: GraphResiduals Plot
      • d = a + bt + ct2
        • a = 3.16±4.54 m
        • b = 1.4±1.05 m/s
        • c = 0.256±0.051 m/s2
        • SSR = 256.2 m2
    • Data Set 2: GraphResiduals Plot
      • This graph has all the acceptable fits for Data Set 2: Graph
      • d = a*e(bt)
        • a = 2.12±0.24 m
        • b = 0.243±0.013 s-1
        • SSR = 7.899 m2
    • Data Set 3: GraphResiduals Plot
      • d = a*e(bt)
        • a = 2.09±0.072 m
        • b = -0.270±0.015 s-1
        • SSR = 0.0543 m2
  • While grading, check that
    • The uncertainty equals (std. error × 2); many still forget this
    • SSR has the correct units (m2 in all three data sets)
    • the graphs of d vs. t have only one fit (they should remove the built-in function before printing)
    • the residuals plots have units on the residuals axis
    • their model function uses d and t, not y and x!

Return to Setup


© St. Lawrence University Department of Physics
Revised: 14 Dec 2023 Canton, NY 13617