In: Statistics and Probability
Movies
3 | 6 | 0 | 9 | 14 | 5 | 7 | 12 | 2 | 1 | 7 | 0 | 5 | 11 | 4 |
Books
7 | 0 | 18 | 0 | 1 | 4 | 5 | 0 | 6 | 2 | 10 | 9 | 2 | 2 | 0 |
Find the line of best fit.
r =
What is the SSE for this problem?
The line of best fit is
Y’ = a + bx
Where a= [(?y )(?x2) – (?x)(?xy)] / [n(?x2)-(?x)2]
b = [n(?xy) – (?x)( ?y)] / [n(?x2)-(?x)2]
x y x2 y2 xy
3 |
7 |
9 |
49 |
21 |
||
6 |
0 |
36 |
0 |
0 |
||
0 |
18 |
0 |
324 |
0 |
||
9 |
0 |
81 |
0 |
0 |
||
14 |
1 |
196 |
1 |
14 |
||
5 |
4 |
25 |
16 |
20 |
||
7 |
5 |
49 |
25 |
35 |
||
12 |
0 |
144 |
0 |
0 |
||
2 |
6 |
4 |
36 |
12 |
||
1 |
2 |
1 |
4 |
2 |
||
7 |
10 |
49 |
100 |
70 |
||
0 |
9 |
0 |
81 |
0 |
||
5 |
2 |
25 |
4 |
10 |
||
11 |
2 |
121 |
4 |
22 |
||
4 |
0 |
16 |
0 |
0 |
||
86 |
66 |
756 |
644 |
206 |
||
Therefore a = 8.1592
b = -0.6557
the equation of line of regression is
y’ = 8.1592 - 0.6557 * x
r = [n(?xy) – (?x)( ?y)] /sqrt [{n(?x2)-(?x)2}. {n(?y2)-(?y)2}] = 0.5654
sse = ?(y-y’)2
x y y’=8.16-0.66x y-y’ (y-y’)2
3 |
7 |
6.1921 |
0.8079 |
0.652702 |
6 |
0 |
4.225 |
-4.225 |
17.85063 |
0 |
18 |
8.1592 |
9.8408 |
96.84134 |
9 |
0 |
2.2579 |
-2.2579 |
5.098112 |
14 |
1 |
-1.0206 |
2.0206 |
4.082824 |
5 |
4 |
4.8807 |
-0.8807 |
0.775632 |
7 |
5 |
3.5693 |
1.4307 |
2.046902 |
12 |
0 |
0.2908 |
-0.2908 |
0.084565 |
2 |
6 |
6.8478 |
-0.8478 |
0.718765 |
1 |
2 |
7.5035 |
-5.5035 |
30.28851 |
7 |
10 |
3.5693 |
6.4307 |
41.3539 |
0 |
9 |
8.1592 |
0.8408 |
0.706945 |
5 |
2 |
4.8807 |
-2.8807 |
8.298432 |
11 |
2 |
0.9465 |
1.0535 |
1.109862 |
4 |
0 |
5.5364 |
-5.5364 |
30.65172 |
240.5609 |
therefore
sse = 240.5609