Trend line

Anupam Shrivastava

New Member
Joined
Apr 25, 2008
Messages
17
Hi,
I am unable to resolve this issue on trend line.

I have 71 points on x-axis starting from 0.8% ending at 150%. Yaxis values are y(80%) = 0.3, y(100%) = 0.6, y(120%) = 0.9 and y(150%) = 1.8.

if I fit a polynomial of degree three I get a nice curve with equation 4e-06x^3-0.0003x^2+0.019x+0.2813

however when I put this in formula I get completely different curve. Any idea why this is happening?:eek:
 

Some videos you may like

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,884
Hi Anupam

You should get the same curve.

For ex., for just those 4 points you posted what is the equation you get and what's the formula you use in the sheet to calculate the values?
 

joeu2004

Well-known Member
Joined
Mar 2, 2014
Messages
3,007
Office Version
  1. 2010
Platform
  1. Windows
if I fit a polynomial of degree three I get a nice curve with equation 4e-06x^3-0.0003x^2+0.019x+0.2813

however when I put this in formula I get completely different curve. Any idea why this is happening?

The error is due to the rounded coefficients. You need to format the trendline "label" (equation) so it displays more precision.

I like to always display 15 significant digits using the Scientific format. To do that: right-click on the trendline "label", clilck on Format Trendline Label, Number, Scientific, enter 14 into Decimal Places, and click on OK.

Then you can copy-and-paste each coefficient from the "label" into Excel cells. Be mindful of the sign of the coefficient. If the equation is of the form 4e-06x^3 - 0.0003x^2..., the second coefficient is -0.0003, not 0.0003.

(I assume you will use SUMPRODUCT or SERIESSUM to apply the coefficients to your data in Excel. Alternatively, you can write a formula that is similiar to the trendline equation, of course.)

Alternatively, you might consider using LINEST to derive the coefficients directly in Excel instead of relying on the chart trendline. Generally, for an order-3 polynomial, you would select 4 horizontal cells, then array-enter a formula of the following form (press ctrl+shift+Enter instead of just Enter):

=LINEST(Y1:Y71, X1:X71^{1,2,3})

If you want to use that approach, but you need more specifics, we need more specifics. The best thing to do is: upload an example Excel file to a file-sharing website, and post the public/share URL in a response here. The following is a list of some free file-sharing websites.

Dropbox: http://dropbox.com
Box.Net: http://www.box.net/files
MediaFire: http://www.mediafire.com
FileFactory: http://www.filefactory.com
FileSavr: http://www.filesavr.com
RapidShare: http://www.rapidshare.com
Windows OneDrive: http://onedrive.live.com
 

Watch MrExcel Video

Forum statistics

Threads
1,126,992
Messages
5,622,029
Members
415,874
Latest member
JockPC

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top