X |
Y |
XY |
X^2 |
Y^2 |
10 |
9.15 |
91.5 |
100 |
83.72 |
8 |
8.15 |
65.2 |
64 |
66.42 |
13 |
8.74 |
113.62 |
169 |
76.39 |
9 |
8.77 |
78.93 |
81 |
76.91 |
11 |
9.25 |
101.75 |
121 |
85.56 |
14 |
8.09 |
113.26 |
196 |
65.45 |
6 |
6.13 |
36.78 |
36 |
37.58 |
4 |
3.11 |
12.44 |
16 |
9.67 |
12 |
9.12 |
109.44 |
144 |
83.17 |
7 |
7.25 |
50.75 |
49 |
52.56 |
5 |
4.73 |
23.65 |
25 |
22.37 |
99 |
82.49 |
797.32 |
1001 |
659.81 |
The last row is the total of the figures in each column. I'll use the symbol S followed by the column number to show where the totals are used in the calculation. There are 11 XY pairs of data, shown as n below.
r=(nS3-S1S2)/sqrt((nS4-S1^2)(nS5-S2^2))=
(11*797.32-99*82.49)/sqrt((11*1001-9801)(11*659.81-6804.60))=
604.01/740.61=0.816 approx.
This figure suggests a good linear correlation, since a perfect correlation is given by r=1. The critical value table for a=0.05 and 9 degrees of freedom (df=n-2=9), confirms this, because the minimum r value according to the table is 0.602 and we have calculated r to be 0.816 (to a confidence of 95%).
To plot the scatter diagram or graph, use the X and Y values in the same way as you would plot the graph of a function. The range of X is 4 to 14 and of Y it's 3.11 to 9.25. To plot the linear regression line, the standard equation is A+BX, where B is the slope and A the Y intercept. B=(nS3-S1S2)/(nS4-S1^2)=0.50 approx., and A=(S2-BS1)/n=3.01 approx. Therefore the line Y=3+0.5X should be a fair approximation to the regression line and provide best fit for the points in the scatter diagram. Putting X=7 gives Y=6.5 (actual Y is 7.25).