Thread: Find an equation from this graph.

Hello,
Thanks,

2. Re: Find an equation from this graph.

Since there are 40 points, it would fit a polynomial of order 39 exactly.

Let $\displaystyle y = c_0 + c_1x + c_2x^2 + ... + c_{39}x^{39}$.

When you substitute each point, you'll get 40 equations in 40 unknowns which you can solve using technology or MUCH difficulty by hand.

3. Re: Find an equation from this graph.

Originally Posted by Prove It
Since there are 40 points, it would fit a polynomial of order 39 exactly.

Let $\displaystyle y = c_0 + c_1x + c_2x^2 + ... + c_{39}x^{39}$.

When you substitute each point, you'll get 40 equations in 40 unknowns which you can solve using technology or MUCH difficulty by hand.
Thanks for that. I should tell you that I am not a maths student nor any other student but I am using this equation for my own purposes. I'll give it a go though.

Could you show me the start of it and then I'll do the rest of the points?

Thanks much appreciated.

4. Re: Find an equation from this graph.

Originally Posted by pieman91
Hello,
Thanks,
That last point looks like an extreme outlier, do you need that one included?

Ignoring the last point a quadratic looks a reasonable fit:

$y=16.467+0.004939x+0.00002781x^2$

CB

5. Re: Find an equation from this graph.

Originally Posted by CaptainBlack
That last point looks like an extreme outlier, do you need that one included?

Ignoring the last point a quadratic looks a reasonable fit:

$y=16.467+0.004939x+0.00002781x^2$

CB
Thanks for that. I don't want to seem nit-picky or ungrateful but y=16.467+0.004939x+0.00002781x^2 is just a bit too high for it to match the trendline and therefore I can't use it. I have attached a new graph that shows y=16.467+0.004939x+0.00002781x^2, the trendline and the actual tax percentage. And if that last data becomes an extreme outlier just get rid of it.

I really appreciate everyone's help with this and Captain Black, if you don't want to do it (fair enough), you can show me how to do it and then I can do it.

6. Re: Find an equation from this graph.

Originally Posted by pieman91
Thanks for that. I don't want to seem nit-picky or ungrateful but y=16.467+0.004939x+0.00002781x^2 is just a bit too high for it to match the trendline and therefore I can't use it. I have attached a new graph that shows y=16.467+0.004939x+0.00002781x^2, the trendline and the actual tax percentage. And if that last data becomes an extreme outlier just get rid of it.

I really appreciate everyone's help with this and Captain Black, if you don't want to do it (fair enough), you can show me how to do it and then I can do it.
Well if it does not match there is probably a typo in my typing since it passed straight through the data when I was doing the fitting, unfortunately I am not on the machine with the file at present so I cannot check.

However the red curve in your document is not a plot of the quadratic (which is smooth)

Checking my notes, the typo is a wrong sign, it should be:

$y=16.467-0.004939x+0.00002781x^2$

Also since you already have the equation of the trend line why are you continuing with this thread?

CB

7. Re: Find an equation from this graph.

You could use interpolation polynomial in the Lagrange form:

Lagrange polynomial - Wikipedia, the free encyclopedia.

For example:

For k=2: $x_0y_0 \quad x_1y_1 \quad x_2y_2$

$p(x)=y_0\frac{(x-x_1)(x-x_2)}{(x_0-x_1)(x_0-x_2)}+y_1\frac{(x-x_0)(x-x_2)}{(x_1-x_0)(x_1-x_2)}+y_2\frac{(x-x_0)(x-x_1)}{(x_2-x_0)(x_2-x_1)}$

$p(x_0)=y_0\;\cdot 1+y_1\;\cdot 0+y_2\;\cdot 0=y_0$

$p(x_1)=y_0\;\cdot 0+y_1\;\cdot 1+y_2\;\cdot 0=y_1$

$p(x_0)=y_0\;\cdot 0+y_1\;\cdot 0+y_2\;\cdot 1=y_2$.

For p(x) you don't need to find k coefficients but you have k+1 terms of order k.
You could write a little program for p(x).

8. Re: Find an equation from this graph.

Originally Posted by CaptainBlack
Well if it does not match there is probably a typo in my typing since it passed straight through the data when I was doing the fitting, unfortunately I am not on the machine with the file at present so I cannot check.

However the red curve in your document is not a plot of the quadratic (which is smooth)

Checking my notes, the typo is a wrong sign, it should be:

$y=16.467-0.004939x+0.00002781x^2$

Also since you already have the equation of the trend line why are you continuing with this thread?

CB
The trendline is from excel but the polynomial of the trendline that excel gives me does not fit the data. The trendline fits but its the wrong polynomial. The polynomial is the same shape but it does not fit the data. I would use it if it was the actual equation but its not.

9. Re: Find an equation from this graph.

Originally Posted by CaptainBlack
Well if it does not match there is probably a typo in my typing since it passed straight through the data when I was doing the fitting, unfortunately I am not on the machine with the file at present so I cannot check.

However the red curve in your document is not a plot of the quadratic (which is smooth)

Checking my notes, the typo is a wrong sign, it should be:

$y=16.467-0.004939x+0.00002781x^2$

Also since you already have the equation of the trend line why are you continuing with this thread?

CB
I just checked your equation and it fits just fine. Thanks again for doing that. It is muchly appreciated.