Part 1.
Consider the data set
Part 2.
Consider the data set . How does the line of best change compared to Part 1?
Part 3
Find the line of best fit for the points .
Part 4
An experiment produces the data . Solve the equation to find the least-squares curve to fit the data, where the curve has the form .
Part 5
Part 6
Data:
Curve:
Part 7
Data:
Curve:
Part 8
Write a 1-2 paragraph summary of what you learned in this lab. Make sure to include both mathematics and coding (Sage and Latex), and be specific.
The main idea we explored was how to associate a data set to a curve using a matrix. We then translated the matrix equation into Python code:
We also learned about several new utility functions for this lab. First, we learned that defining a symbolic function is just like defining a normal python function. We explored plotted functions and data points with the plot()
function. We also learned about Pythons anonymous lambda functions which we used to generate the large Matrix in part 7 with the command