06.08.2013 Views

Introduction to regression

Introduction to regression

Introduction to regression

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

118 Further Mathematics<br />

THINK WRITE/DISPLAY<br />

4<br />

5<br />

Find the gradient and y-intercept of the leastsquares<br />

<strong>regression</strong> line.<br />

Press STAT .<br />

Select CALC and 4:LinReg(ax+b).<br />

After LinReg(ax+b) appears, type L1, L2, Y1.<br />

(To type Y1, press VARS and select Y-VARS<br />

and 1:Function then 1:Y1. Press ENTER .<br />

Write the least-squares <strong>regression</strong>.<br />

y = −0.63x + 11.73<br />

Press GRAPH <strong>to</strong> view the data and <strong>regression</strong><br />

line. You may need <strong>to</strong> adjust the WINDOW<br />

settings.<br />

Using arithmetic<br />

Calculate the means.<br />

1<br />

2<br />

Draw up the required table and complete<br />

all calculations.<br />

Column 1: x-values<br />

Column 2: y-values<br />

Column 3: x-deviations from the x mean<br />

Column 4: x-deviations squared<br />

Column 5: y-deviations from the y mean<br />

Column 6: y-deviations squared<br />

Column 7: Product of x- and y-deviations<br />

Total each column.<br />

Note: Sum of columns 3 and 5 is 0.<br />

66<br />

x = -----<br />

8<br />

= 8.25<br />

x y ( )<br />

1 11 –7.25 56.5625 4.5 20.25 –32.625<br />

3 9 –5.25 27.5625 2.5 6.25 –13.235<br />

4 10 –4.25 18.0625 3.5 12.25 –14.875<br />

7 6 –1.25 1.5625 –0.5 0.25 0.625<br />

10 8 1.75 3.0625 1.5 2.25 2.625<br />

12 4 3.75 14.0625 –2.5 6.25 –9.375<br />

14 3 5.75 33.0625 –3.5 12.25 –20.125<br />

15 1 6.75 45.5625 –5.5 30.25 –37.125<br />

66 52 0 195.5 0 90 –124<br />

3 Use the formula <strong>to</strong> calculate the gradient by Σ( x – x)<br />

( y– y)<br />

substituting values derived from the table.<br />

m =<br />

Σ( x – x)<br />

2<br />

------------------------------------<br />

52<br />

y = -----<br />

8<br />

= 6.5<br />

x – x ( x – x)<br />

2 y– y ( y– y)<br />

2 ( x – x)<br />

( y– y)<br />

4 Use the formula <strong>to</strong> calculate the y-intercept.<br />

– 124<br />

= ------------<br />

195.5<br />

= −0.6343.<br />

b = y − mx<br />

= 6.5 − (−0.6343)8.25<br />

= 11.733<br />

5 Write the equation of the least-squares linear<br />

<strong>regression</strong> line.<br />

y = −0.634x + 11.733

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!