|
x |
1 |
2 |
4 |
5 |
8 |
Mean |
|
y |
20 |
19 |
34 |
30 |
47 |
Mean |
Formula:
y = a + bx

|
|
(1-4)(20-30) + |
(2-4)(19-30) + |
(4-4)(34-30) + |
(5-4)(30-30) + |
(8-4)(47-30) |
|
--------------------------------------------------------------------------------------------------------------- |
|||||
|
|
(1-4)2 + |
(2-4)2 + |
(4-4)2 + |
(5-4)2 + |
(8-4)2 |
|
|
(-3)(-10) + |
(-2)(-11) + |
(0)( 4) + |
(1)(0) + |
(4)(17) |
|
---------------------------------------------------------------------------------------------------------- |
|||||
|
|
(-3)2 + |
(-2)2 + |
(0)2 + |
(1)2 + |
(4)2 |
|
|
30+ |
22 + |
0 + |
0 + |
68 |
|
---------------------------------------------------------------------------------------------------------- |
|||||
|
|
9 + |
4 + |
0 + |
1 + |
16 |
|
|
120 |
|
------------------------------------ |
|
|
|
30 |
.b
= 4
![]()
|
|
30 –4(4) |
|
|
30 –16 |
.a
=14
y = a + bx
|
y = a + bx |
14 + 4x |
.y
=14 + 4x
The
regression line is y= 14 + 4x
Calculate the regression Coefficient for a and b:

![]()
|
|
(20-30)2 + |
(19-30) 2 + |
(34-30) 2 + |
(30-30) 2 + |
(47-30) 2 |
|
|
|||||
|
|
(-10) 2 + |
(-11) 2 + |
(4) 2 + |
(0) 2 + |
(17)2 |
|
|
|||||
|
|
100 + |
121 + |
16 + |
0 + |
289 |
Total Variation =
= 526
![]()
r = .9553
The
correlation coefficient is close to 1, indicating a strong positive correlation
Exactly the same result can be achieved using the formula for R2
|
x |
Fitted y value y = a + bx y =14 + 4x |
|
Explained variation
|
|
1 |
14
+ 4(1) =18 |
|
(18-30)2=144 |
|
2 |
14
+ 4(2) =22 |
|
(22-30)2= 64 |
|
4 |
14
+ 4(4) =30 |
|
(30-30)2= 0 |
|
5 |
14
+ 4(5) =34 |
|
(34-30)2= 16 |
|
8 |
14
+ 4(8) = 46 |
|
(46-30)2=256 |
|
|
|
|
Explained
variation=480 |
R2
= Explained variation / Total variation
![]()
R2
= .9125
Squaring
r = r2
![]()
![]()
Precisely equivalent to the
result obtained form the formula for R2
|
x |
y |
Fitted y value y = a + bx y
=14 + 4x |
Residual Act y – fit. y |
|
1 |
20 |
14
+ 4(1) = 18 |
20
– 18 = 2 |
|
2 |
19 |
14
+ 4(2) = 22 |
19
– 22 = -3 |
|
4 |
34 |
14
+ 4(4) = 30 |
34
– 30 = 4 |
|
5 |
30 |
14
+ 4(5) = 34 |
30
– 34 = -4 |
|
8 |
47 |
14
+ 4(8) = 46 |
47
– 46= 1 |
Find the linear regression line for the following table of numbers. Also find the correlation.
|
1: Clear Memory |
|
|
|
2: Enter Data |
1
|
|
|
3: Calculate the mean of x and mean of y |
|
mean x = 4 mean y = 30 |
|
4: Compute the slope of the regression line |
0 |
y
=14 + 4x |
|
5:
Compute the y-intercept of the regression line. |
0
|
|
|
6: Compute the correlation. |
|
R2 = .9553 r = .9553 |
You should get a slope of 14, a y-intercept of 4, and a
correlation of 0.9553, The regression
line would be: y = 14 +4x