- #1
jjj888
- 23
- 0
I'm trying to understand the derivation of polynomial regression.
Given data points: [(-1,-1),(2,-1),(6,-2)]. So a 2nd degree curve will be a concave downward parabola. My calculator produces the equation: -0.0357x2+0.0357x-0.9285. Which fits the data good. But if I try to do it manually in matrix form I run into an error. My summed up matrix looks like this:
| 3 7 39| |a| = 0.3436
| 7 39 233| |b| = 0.1237
|39 233 1311| |c| = -0.1512
Which leads me to think the equation should look like: 0.3436x2+0.1237x-0.1512. Of course this is wrong. Obviously I must have set the matrix up wrong. Can anyone offer any clarification?
Thanks
Given data points: [(-1,-1),(2,-1),(6,-2)]. So a 2nd degree curve will be a concave downward parabola. My calculator produces the equation: -0.0357x2+0.0357x-0.9285. Which fits the data good. But if I try to do it manually in matrix form I run into an error. My summed up matrix looks like this:
| 3 7 39| |a| = 0.3436
| 7 39 233| |b| = 0.1237
|39 233 1311| |c| = -0.1512
Which leads me to think the equation should look like: 0.3436x2+0.1237x-0.1512. Of course this is wrong. Obviously I must have set the matrix up wrong. Can anyone offer any clarification?
Thanks