MCA11: Mathematical Foundation For Computer Science 1: Example 2.13
MCA11: Mathematical Foundation For Computer Science 1: Example 2.13
MCA11: Mathematical Foundation For Computer Science 1: Example 2.13
Example 2.13:
Compute the quadratic regression equation of following data.
Check its best fitness.
x -3 -2 -1 0 1 2 3
y 7.5 3 0.5 1 3 6 14
Solution:
We prepare following table, Here N=7
x y x2 x3 x4 xy x2y
-3 7.5 9 -27 81 -22.5 67.5
-2 3 4 -8 16 -6 12
-1 0.5 1 -1 1 -0.5 0.5
0 1 0 0 0 0 0
1 3 1 1 1 3 3
2 6 4 8 16 12 24
3 14 9 27 81 42 126
Page 1 of 3
The equations are
0 + 28a1 + 0 = 28 ------eq2
7a0 + 28a2 = 35
Page 2 of 3
We get a1 = 1 using equation 2 Hence
y= 0.571429 + x + 1.107142 x2
The following plot is just for reference. If asked then only draw it.
Quadratic Regression
16
14
y= 0.571429 + x + 1.107142 x2
12
10
8
Series1
6
0
-4 -3 -2 -1 0 1 2 3 4
x
Page 3 of 3