using linest function for 2nd order polynomial

balan

New Member
Joined
Jul 13, 2015
Messages
4
Hi All,

I am using linest function to get coefficient of 2nd order polynomial {y = (c2*x^2)+(c1*x) + c0 } for the following variable,
2501.3
5003.8
7507.2
100011.4
125016.2
150021.6
175027.6
200034.1
225041.1
250048.6

<colgroup><col width="64"><col width="64"></colgroup><tbody>
</tbody>
and using the following equation
c2 = index(linest(y,x^{1,2},1)
c1 = index(linest(y,x^{1,2},1,2)
c0 = index(linest(y,x^{1,2},1,3) and these do calculate values as
c2 = 0.0000048, c1 = 0.008 and c0 = -1.25. But when I keep input variables in row wise(as shown below), I am not able to use these equations. Looking for a help.
250.0 500.0 750.0 1000.0 1250.0 1500.0 1750.0 2000.0 2250.0 2500.0
1.3 3.8 7.2 11.4 16.2 21.6 27.6 34.1 41.1 48.6

<colgroup><col width="64"><col width="64"><col width="64"><col width="64"><col width="64"><col width="64"><col width="64"><col width="64"><col width="64"><col width="64"></colgroup><tbody>
</tbody>

Thanks in advance for any help someone may be able to give.

<colgroup><col width="97"></colgroup><tbody>
</tbody>
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Hello Aladin,

If I convert variables from row format to column format by using this transpose function, it works. But If I can able to use this linest function when these variables in row format, it will be better for me. Because this method I am using for finding optimum design point from 'n' set of design points.
 
Upvote 0
Hello Aladin,

If I convert variables from row format to column format by using this transpose function, it works. But If I can able to use this linest function when these variables in row format, it will be better for me. Because this method I am using for finding optimum design point from 'n' set of design points.

Vertical data...

Control+shift+enter, not just enter:

=INDEX(LINEST(A1:A10,B1:B10^{1,2}),1)

Horizontal data...

Control+shift+enter, not just enter:

=INDEX(LINEST(TRANSPOSE(A1:J1),TRANSPOSE(A2:J2)^{1,2}),1)

Both produce the same outcome.
 
Upvote 0
HI Aladin,

Thank You for your reply. It works well and saves lot of time during my optimization study.

Many thanks once again.
 
Upvote 0
Hi All,

I am using linest function to get coefficient of 2nd order polynomial {y = (c2*x^2)+(c1*x) + c0 } for the following variable,
2501.3
5003.8
7507.2
100011.4
125016.2
150021.6
175027.6
200034.1
225041.1
250048.6

<tbody>
</tbody>
and using the following equation
c2 = index(linest(y,x^{1,2},1)
c1 = index(linest(y,x^{1,2},1,2)
c0 = index(linest(y,x^{1,2},1,3) and these do calculate values as
c2 = 0.0000048, c1 = 0.008 and c0 = -1.25. But when I keep input variables in row wise(as shown below), I am not able to use these equations. Looking for a help.
250.0500.0750.01000.01250.01500.01750.02000.02250.02500.0
1.33.87.211.416.221.627.634.141.148.6

<tbody>
</tbody>

Thanks in advance for any help someone may be able to give.

<tbody>
</tbody>

Hi

Another option

Since the data and the exponents array must be orthogonal, if your data is in horizontal rows, like in the second table, use like:

c2 = index(linest(y,x^{1;2},1)
 
Upvote 0
Hi

Another option

Since the data and the exponents array must be orthogonal, if your data is in horizontal rows, like in the second table, use like:

c2 = index(linest(y,x^{1;2},1)

Good idea... Adding the missing paren:

=INDEX(LINEST(A1:J1,A2:J2^{1;2}),1)
 
Upvote 0

Forum statistics

Threads
1,215,390
Messages
6,124,667
Members
449,178
Latest member
Emilou

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
Back
Top