Polynomial Fit in EXCEL does not work as it should

Click For Summary
SUMMARY

The discussion focuses on extracting 2nd degree polynomial coefficients using the LINEST function in Excel. The user is attempting to apply the formula for a polynomial trendline but encounters errors or zero coefficients. The correct formula for a 2nd order polynomial trendline is provided, with specific Excel functions: c2, c1, and b calculated using INDEX and LINEST. A critical insight is the importance of correctly identifying the X and Y data columns, as reversing them can lead to incorrect results.

PREREQUISITES
  • Familiarity with Excel functions, specifically LINEST and INDEX.
  • Understanding of polynomial equations and their coefficients.
  • Basic knowledge of data visualization techniques in Excel.
  • Ability to interpret trendline equations in Excel charts.
NEXT STEPS
  • Research how to properly use the LINEST function in Excel for polynomial regression.
  • Learn about data visualization best practices in Excel, focusing on trendlines.
  • Explore troubleshooting common errors in Excel formulas and functions.
  • Investigate advanced Excel techniques for fitting curves to data sets.
USEFUL FOR

This discussion is beneficial for data analysts, Excel users involved in statistical analysis, and anyone looking to accurately fit polynomial trends to data sets in Excel.

Woland
Messages
18
Reaction score
0
Hello all,

I am trying to extract the 2nd degree polynomial coefficients from a curve of best fit applied in EXCEL. I know how to do it (http://spreadsheetpage.com/index.php/tip/chart_trendline_formulas)

2nd Order Polynomial Trendline

Equation: y = (c2 * x^2) + (c1 * x ^1) + b
c2: =INDEX(LINEST(y,x^{1,2}),1)
C1: =INDEX(LINEST(y,x^{1,2}),1,2)
b = =INDEX(LINEST(y,x^{1,2}),1,3)


Iv done it before, but for some reason it is not working out for my particular data set. I keep getting errors or zero for my coefficients. If I do the regular best fit using the trendline option, it works.

I get: y = 2E+16x2 + 1E+11x + 3.033

I am attaching my data set.

Does anyone know if there is something wrong with my method? Perhaps I am forgetting something.

Thanks.
 

Attachments

Physics news on Phys.org
You should pay attention to of the two columns represent Y and which represents X. I think you are reversing them between the trendline and the LINEST function.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
Replies
1
Views
4K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
8
Views
2K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 6 ·
Replies
6
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K