Curve Fitting

OCW Scholar

« Previous | Next »

Session Overview

Diagram of spring under tension.

This lecture is about how to use computation to help understand experimental data. It talks about using linear regression to fit a curve to data, and introduces the coefficient of determination as a measure of the tightness of a fit.

Session Activities

Lecture Videos

About this Video

Topics covered: Arrays, curve fitting, numpy, pylab, least squares fit, prediction.


Recitation Videos

About this Video

Topics covered: Data distributions, mean, standard deviation, Monte Carlo simulations, Monty Hall problem, Riemann sum method, data regressions, r^2 (r-squared), coefficient of termination, scientific applications of programming.

Check Yourself

What is an objective function?

View/hide answer

One that provides a quantitative assessment of how well the curve fits the data.



What method of curve fitting is used by polyfit?

View/hide answer

Linear regression.



What does curve fitting do?

View/hide answer

Relates an independent variable to an estimated value of a dependent variable.



What is the coefficient of determination?

View/hide answer

Coefficient of determination, R^2, is equal to 1 – (estimated error)/(variance of the actual data)



« Previous | Next »