Professional Documents
Culture Documents
clc
Dist=[2.4 1.5 2.4 1.8 1.8 2.9 1.2 3 1.2];
width=[2.9 2.1 2.3 2.1 1.8 2.7 1.5 2.9 1.5];
Standard_error_of_estimate = sqrt(SSE/(n-2))
Standard_error_of_estimate =
0.236108935136509
scaled residual
y1 = polyfit(Dist,width,1);
predict_width = (Dist.*y1(1) + B(1)); % width predicted
Residual = width - predict_width
Residual =
Columns 1 through 3
Columns 4 through 6
0.062998215348007 -0.237001784651993 -0.143842950624628
Columns 7 through 9
coefficient of determination
coefficient_of_determination = Sxy^2/(Sxx*Syy)
coefficient_of_determination =
0.837403331350387
X = 2;
ycalc=B(2)*X+B(1);
Lane_width = ycalc
Lane_width =
2.183700178465199
Discuss the adequacy of your regression
There is a linear relationship between y and x variables. This is shown from the
scatterplots.
Tolerance, T = 1-R2
R2 = 0.8374
T = 1-0.8374 = 0.1626
With T > 0.1 there is no multi-collinearity in the data hence this assumption is met