next up previous
Next: Make predictions Up: Assignment 11: Data modeling Previous: Collect data

Fit models

Following the examples from class and the handout, fit three models to each dataset, linear, quadratic and log:

\begin{displaymath}t = \alpha + \beta s
\end{displaymath} (1)

\begin{displaymath}t = \alpha + \beta s^2
\end{displaymath} (2)

\begin{displaymath}t = \alpha + \beta s \log s
\end{displaymath} (3)

where t is the run time, s is the problem size, and $\alpha$ and $\beta$ are the parameters you are going to estimate.

You can use either the matrix form or the summation form to do the computation.

For each model, calculate the errors and the R2 values. Which model seems to fit the data best?

Allen B. Downey