You are on page 1of 4

Example of Calculation Simple Linear Regression Model

Student
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

Period of Exercice
(hour), x
1
1.2
2.5
2
3
3.5
2.5
1.5
4
3.5
4
1
1.5
5
0.5

Mathematics Score, y
30
35
60
55
75
80
65
40
90
85
91
23
34
98
17

Y a bx

a y bx

n xy x y
n x 2 x

Period of
Mathematics
Student Exercice
Score, y
(hour), x
1
1
30
2
1.2
35
3
2.5
60
4
2
55
5
3
75
6
3.5
80
7
2.5
65
8
1.5
40
9
4
90
10
3.5
85
11
4
91
12
1
23
13
1.5
34
14
5
98
15
0.5
17

36.7
878
Mean
2.45
58.53

x2

xy

1
1.44
6.25
4
9
12.25
6.25
2.25
16
12.25
16
1
2.25
25
0.25
115.19

30
42
150
110
225
280
162.5
60
360
297.5
364
23
51
490
8.5
2653.5

n xy x y
n x 2 x

152653.5 36.7 878


15115.19 36.7 2
19.90

a y bx

58.53 19.902.45
9.78

So, prediction equation of Mathematics score is

Y a bx
Y 9.78 19.90 x

This means that, for


every unit in x (hours of
practice/exercise) will
contribute 19.9 score in
Y.

For example, if there have a student want to make exercise for 4.2 hours a day, so the Mathematics
prediction score that he/she will get is

This means that, for 4.2 hours


in practicing/exercising
Mathematics, the student will
get score 93.36%.

Y 9.78 19.90 x
Y 9.78 19.904.2
93.36

Coefficient of Determination

Coefficien t of Determination, r 2

sum of squares explained by regression


total sum of squares

Y y

Period of
Mathematics
Student Exercice
Score, y
(hour), x
1
1
30
2
1.2
35
3
2.5
60
4
2
55
5
3
75
6
3.5
80
7
2.5
65
8
1.5
40
9
4
90
10
3.5
85
11
4
91
12
1
23
13
1.5
34
14
5
98
15
0.5
17

36.7
878
Mean
2.45
58.53

n 1
2
y y
n 1

Prediction
Score,
29.68
33.66
59.53
49.58
69.48
79.43
59.53
39.63
89.38
79.43
89.38
29.68
39.63
109.28
19.73

(y-)^2

(-)^2

814.15
553.82
2.15
12.48
271.15
460.82
41.82
343.48
990.15
700.48
1054.08
1262.62
601.88
1557.62
1725.02
10391.73

832.51
618.68
0.99
80.16
119.83
436.67
0.99
357.34
951.52
436.67
951.52
832.51
357.34
2575.22
1505.70
10057.66

Y y

So, r 2

n 1
2
y y
n 1

10057.66
15 1
10391.73
15 1
0.9678
96.78%

We can conclude that, 96.78% variation on students Mathematics score


contribute by the total period of time that student spend to do
exercise/practice.

You might also like