Appendix 4.1: Formulas for Regression Calculations

When performing regression calculations by hand, there are other formulas that can make the task easier and are mathematically equivalent to the ones presented in the chapter. These, however, make it more difficult to see the logic behind the formulas and to understand what the results actually mean.

When using these formulas, it helps to set up a table with the columns shown in Table 4.7, which has the Triple A Construction Company data that were used earlier in the chapter. The sample size (n) is 6. The totals for all columns are shown, and the averages for X and Y are calculated. Once this is done, we can use the following formulas for computations in a simple linear regression model (one independent variable). The simple linear regression equation is again given as

Y^=b0+b1X

Slope of regression equation:

b1=ΣXYnXY¯ΣX2nX¯2b1=180.56(4)(7)1066(42)=1.25

Intercept of regression equation:

b0=Y¯b1X¯b0=71.25(4)=2

Sum of squares of the error:

SSE=ΣY2b0ΣYb1ΣXYSSE=316.52(42)1.25(180.5)=6.875

Estimate of the error variance:

s2=MSE=SSEn2s2=6.87562=1.71875

Estimate of the error standard deviation:

s=MSEs=1.71875=1.311

Table 4.7 Preliminary Calculations for Triple A Construction

Y X Y2 X2 XY
6 3 62=36 32=9 3(6)=18
8 4 82=64 42=16 4(8)=32
9 6 92=81 62=36 6(9)=54
5 4 52=25 42=16 4(5)=20
4.5 2 4.52=20.25 22=4 2(4.5)=9
9.5 5 9.52=90.25 52=25 5(9.5)=47.5
Y=42Y¯=42/6=7 X=24X¯=24/6=4 Y2=316.5 X2=106 XY=180.5

Coefficient of determination:

r2=1SSEΣY2nY¯2r2=16.875316.56(72)=0.6944

This formula for the correlation coefficient automatically determines the sign of r. This could also be found by taking the square root of r2 and giving it the same sign as the slope:

r=nXYXY[nX2(X)2][nY2(Y)2]r=6(180.5)(24)(42)[6(106)242][6(316.5)422]=0.833
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset