Polynomial least squares fit

  • Thread starter Thread starter Mark Scholes
  • Start date Start date
M

Mark Scholes

Hi,
I have a graph of two values and I need to know, what the
formula is that connects all to points. The trend function
in the graph gives

y = 0.0557x4 - 51.355x3 + 18559x2 - 3E+06x + 2E+08

I need the last two terms too more places.

Is there a spread sheet function for this, a macro or
anything.

MarkS
 
Hi,
I have a graph of two values and I need to know, what the
formula is that connects all to points. The trend function
in the graph gives

y = 0.0557x4 - 51.355x3 + 18559x2 - 3E+06x + 2E+08

I need the last two terms too more places.

Is there a spread sheet function for this, a macro or
anything.

MarkS

Select the equation on the chart. Then right-click and select Format Data
Labels. The Number tab allows formatting the numbers in the equation to more
decimal places (although Excel's precision limits makes formatting to more than
15 places meaningless).

You can also use the LINEST worksheet function if the above is not
satisfactory.

The LINEST function does not always return the right answer, although it works
pretty well most of the time. The algorithms used in the chart trendline
generator is more robust. For my limited uses, LINEST has been satisfactory.

If you search the archives using GOOGLE you will find techniques for not only
using LINEST, but for also extracting the equation from the chart.


--ron
 
Back
Top