Polynomial Regression

Use MATLAB to

(1) Graph the set of points given in the form (year, gasoline price). Use t = 0 for 1995.

year
price (cents/gal)
1995
126.4
1996
115.5
1997
122.7
1998
130.1
1999
113.8
2000
137.0
2001
162.9
2002
110.0
2003
157.7
2004
161.7
2005
198.2

 

(2) Find the linear, cubic, and fifth order polynomials that model the data.

(3) Graph the linear, cubic and fith order polynomials on the same graph as the data points. Use different colors for the different graphs.

(4) Find the value predicted by each of the three models for the year 2006.

(5) Based on current prices, which model is most accurate? Explain.


Get help from http://www2.ohlone.edu/people2/bbradshaw/matlab/regression.html