# Thread: regression equation

1. ## regression equation

What would be the "best fit" equation for the following data:
(0,1),(1,4),(2,13),(3,40)?

2. 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).

3. Mobius,
Thanks for your reply. I intentionally left it open for various options.
How about this: Find the "best fit" equation for the data:
(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)

4. Again, Wolfram Alpha is your friend

For that last data set you mentioned, it suggests $1.46281 e^{1.10339 x}$

5. 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? :-)