Project 5 - Interpolation of Vehicle Stopping Distances Using Least Squares Regression


The following table contains vehicle stopping distances as a function of speed.

V (mph)

D (ft)

0

0

20

42

25

56

30

75

35

95

40

116

45

143

50

175

55

210

60

248

65

295

70

343

75

401

80

464

A) Use the MATLAB 'polyfit' function to find the equation of the least squares regression line:

D = a0 + a1V

    through the data points.

Display the following results:
  1. The numerical values of a0 and a1.
  2. The following sum of squares: SST, SSE, and SSR.
  3. The coefficient of determination r2 and the correlation coefficient r.
  4. The standard deviation sy and the standard error of the estimate sy|x.
B) Fill in the numerical values in the table below.

i Di Vi Vi2 Vi3 Vi4 ViDi Vi2Di
0 0            
20 42            
25 56            
30 75            
35 95            
40 116            
45 143            
50 175            
55 210            
60 248            
65 295            
70 343            
75 401            
80 464            
åVi= åDi= åVi2= åVi3= åVi4= åViDi= åViDi= åVi2Di=

C) In MATLAB, solve the normal equations to find a0, a1, and a2 in the least squares quadratic:

D = a0 + a1V + a2V2

    through the data points.

D) Use the MATLAB 'polyfit' function to check your answers for a0, a1, and a2.

E) Calculate and output SST, SSE, SSR, r2, r, sy, sy|x.

F) Plot the given data points, the least squares line and the least squares quadratic on the same graph.