Post Reply 
Accuracy of Quadratic Regression
08-21-2023, 05:52 PM (This post was last modified: 08-22-2023 11:15 AM by Albert Chan.)
Post: #3
RE: Accuracy of Quadratic Regression
(08-20-2023 05:07 PM)bernhardSA Wrote:  I am not sure if this is related to floating point accuracy

Yes, it is due to floating point precision. (HOME have only 12 decimals)

[Image: Snip20191206_1.png]

To solve for quadratic best fit, we need upto Σx²y (top-right, m=2)
Update: Worse, for quadratic fit, we need Σx4 (top-left, m=2)

Generalized mean, M4 ≥ M1

OP example, Σx4 ≥ ((2003+2012)/2)^4 * 10 ≈ 1.624E14      // 15 digits!

To get best fit coefficients, it may be better to reduce both x and y from its mean.

We can simply knock down year 2000, (2003 .. 2012) --> (3 .. 12)
APPS quadratic fits get Y = -5.4696969697*X^2+131.5*X+472.545454545

CAS> symb2poly(-5.4696969697*X^2+131.5*X+472.545454545 | X=x-2000

[−5.4696969697, 22010.2878788, −22141315.3333]

This matched Excel results, y = -5.46969697 x^2 + 22010.28788 x -22141315.33
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Accuracy of Quadratic Regression - Albert Chan - 08-21-2023 05:52 PM
RE: Accuracy of Quadratic Regression - jte - 09-05-2023, 11:28 PM



User(s) browsing this thread: 2 Guest(s)