# regression equation

• Dec 2nd 2010, 09:53 AM
Manx
regression equation
What would be the "best fit" equation for the following data:
(0,1),(1,4),(2,13),(3,40)?
• Dec 2nd 2010, 09:40 PM
Mobius
What kind of degree is allowed? Since you've given 4 points, a cubic polynomial would fit perfectly: $2x^3-3x^2+4x+1$ (according to Wolfram Alpha)

Change cubic to quadratic or linear in the above link to get lower degree fits (quadratic also comes pretty close).
• Dec 3rd 2010, 05:55 AM
Manx
Mobius,
Thanks for your reply. I intentionally left it open for various options.
(0,1),(1,4),(2,13),(3,40),(4,121),(5,364) but not a polynomial equation,
since there is always one with perfect fit if the degree is not restricted and
the set is finite. (some variation of an exponential equation)
• Dec 3rd 2010, 04:07 PM
Mobius
Again, Wolfram Alpha is your friend :)

For that last data set you mentioned, it suggests $1.46281 e^{1.10339 x}$
• Dec 4th 2010, 06:51 AM
Manx
Thanks again, Mobius.
The equation given by Wolframalpha is good. Most of the error seems to be at small values of x, however.
Do you know of any software that will allow the user to get the equation y= (3^(x+1)-1)/2,
which is a perfect fit? :-)