Calculate Fitting second degree parabola - Curve fitting using Least square method
X | Y |
1996 | 40 |
1997 | 50 |
1998 | 62 |
1999 | 58 |
2000 | 60 |
Solution:The equation is
y=a+bx+cx2 and the normal equations are
∑y=an+b∑x+c∑x2∑xy=a∑x+b∑x2+c∑x3∑x2y=a∑x2+b∑x3+c∑x4X | y | x=X-1998 | x2 | x3 | x4 | x⋅y | x2⋅y |
1996 | 40 | -2 | 4 | -8 | 16 | -80 | 160 |
1997 | 50 | -1 | 1 | -1 | 1 | -50 | 50 |
1998 | 62 | 0 | 0 | 0 | 0 | 0 | 0 |
1999 | 58 | 1 | 1 | 1 | 1 | 58 | 58 |
2000 | 60 | 2 | 4 | 8 | 16 | 120 | 240 |
--- | --- | --- | --- | --- | --- | --- | --- |
9990 | 270 | 0 | 10 | 0 | 34 | 48 | 508 |
Substituting these values in the normal equations
270=5a+0b+10c48=0a+10b+0c508=10a+0b+34cSolving these 3 equations using inverse matrix method,
Here
5a+10c=270 10b=48 10a+34c=508Now converting given equations into matrix form
[5010010010034][abc]=[27048508]Now, A =
[5010010010034], X =
[abc] and B =
[27048508]∴AX=B∴X=A-1B=5×(10×34-0×0)+0×(0×34-0×10)+10×(0×0-10×10)=5×(340+0)+0×(0+0)+10×(0-100)=5×(340)-+0×(0)+10×(-100)=1700+0-1000=700Here, |A|=700≠0∴A-1 is possible. = | | +(10×34-0×0) | -(0×34-0×10) | +(0×0-10×10) | | | -(0×34-10×0) | +(5×34-10×10) | -(5×0-0×10) | | | +(0×0-10×10) | -(5×0-10×0) | +(5×10-0×0) | |
| T |
|
= | | +(340+0) | -(0+0) | +(0-100) | | | -(0+0) | +(170-100) | -(0+0) | | | +(0-100) | -(0+0) | +(50+0) | |
| T |
|
Now, A-1=1|A|×Adj(A)Here, X=A-1×B∴X=1|A|×Adj(A)×B = | 1700 × | | 340×270+0×48-100×508 | | | 0×270+70×48+0×508 | | | -100×270+0×48+50×508 | |
|
∴[abc]=[4107245-167]∴a=4107,b=245,c=-167Now substituting this values in the equation is
y=a+bx+cx2, we get
y=4107+245x-167x2y=4107+245(X-1998)-167(X-1998)2
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then