Polynomial function

Duane

Board Regular
Joined
Mar 14, 2002
Messages
229
Hey gang.

Excel can give us linear, exponential and polynomial trendlines.

To forecast unknown Ys based on known Xs, I've used
  • for linear, =ROUND(FORECAST and the plot points perfectly land where Excel would have put them by adding a linear trendline
  • for Exponential =GROWTH, and the plot points perfectly land where Excel would have put them by adding an exponential trendline (both for true and false)
  • for polynomial (order 2), ...??
What formula can I use to give me the plot points that land under the trendline that Excel provides by adding the polynomial order 2 trendline?
 

Attachments

  • Trend Table.JPG
    Trend Table.JPG
    42.3 KB · Views: 13

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
I'm not quite sure that I understand what you want. If you perform a 2nd order regression, you can extract the coefficients of the curve as shown here and then use them to determine any set of (Xreg,Yreg) points on the regression curve.
MrExcel20210209.xlsx
BCD
1XY
22378
3171629
4191038
5225065
6
7
8
92nd order regression
10x2xb
112.73624E-05-0.0399715.96755
12
13XregYreg
145002.824295
1510003.362224
16150017.58134
17200045.48163
Duane
Cell Formulas
RangeFormula
B11:D11B11=LINEST(C2:C5,B2:B5^{1,2},1,0)
C14:C17C14=$B$11*B14^2+$C$11*B14+$D$11
Press CTRL+SHIFT+ENTER to enter array formulas surrounded with curly braces.

1612928462176.png
 
Upvote 0
Hey, thanks for your help.

So, what I'm looking for is, if you look at my column of known Xs and known Ys, you'll see I have known Xs of 2,390 and ,2530 - based on the known Ys from 8 to 65, I used FORECAST to do that for the linear (in yellow); and GROWTH for the Exponential (in green and red), but I need to know what formula will give me the Ys will be for X=2390 and X=2530 based on a polynomial forecast formula. (the green-shaded cells).
 
Upvote 0
Have a look at this...based on my previous post, the LINEST function will return the coefficients. But you can leave those coefficients in an array and multiply them by another array containing {x^2, x^1, x^0} and then sum using the SUMPRODUCT function. See the blue input cells and the resulting green output cells. The yellow table shows another less compact approach.
MrExcel20210209.xlsx
BCD
1XY
22378
3171629
4191038
5225065
6239076.7413393
7253089.9930603
8
92nd order regression
10x2xb
112.73624E-05-0.039967715.96755
12
13XregYreg
145002.82429475
1510003.36222418
16150017.5813365
17200045.4816318
18239076.7413393
19253089.9930603
Duane
Cell Formulas
RangeFormula
C6:C7C6=SUMPRODUCT(LINEST($C$2:$C$5,$B$2:$B$5^{1,2},1,0)*(B6^{2,1,0}))
B11:D11B11=LINEST(C2:C5,B2:B5^{1,2},1,0)
C14:C19C14=$B$11*B14^2+$C$11*B14+$D$11
Press CTRL+SHIFT+ENTER to enter array formulas surrounded with curly braces.
 
Upvote 0
Solution
Have a look at this...based on my previous post, the LINEST function will return the coefficients. But you can leave those coefficients in an array and multiply them by another array containing {x^2, x^1, x^0} and then sum using the SUMPRODUCT function. See the blue input cells and the resulting green output cells. The yellow table shows another less compact approach.
MrExcel20210209.xlsx
BCD
1XY
22378
3171629
4191038
5225065
6239076.7413393
7253089.9930603
8
92nd order regression
10x2xb
112.73624E-05-0.039967715.96755
12
13XregYreg
145002.82429475
1510003.36222418
16150017.5813365
17200045.4816318
18239076.7413393
19253089.9930603
Duane
Cell Formulas
RangeFormula
C6:C7C6=SUMPRODUCT(LINEST($C$2:$C$5,$B$2:$B$5^{1,2},1,0)*(B6^{2,1,0}))
B11:D11B11=LINEST(C2:C5,B2:B5^{1,2},1,0)
C14:C19C14=$B$11*B14^2+$C$11*B14+$D$11
Press CTRL+SHIFT+ENTER to enter array formulas surrounded with curly braces.

That's it! THANK YOU!!!
 
Upvote 0
Have a look at this...based on my previous post, the LINEST function will return the coefficients. But you can leave those coefficients in an array and multiply them by another array containing {x^2, x^1, x^0} and then sum using the SUMPRODUCT function. See the blue input cells and the resulting green output cells. The yellow table shows another less compact approach.
MrExcel20210209.xlsx
BCD
1XY
22378
3171629
4191038
5225065
6239076.7413393
7253089.9930603
8
92nd order regression
10x2xb
112.73624E-05-0.039967715.96755
12
13XregYreg
145002.82429475
1510003.36222418
16150017.5813365
17200045.4816318
18239076.7413393
19253089.9930603
Duane
Cell Formulas
RangeFormula
C6:C7C6=SUMPRODUCT(LINEST($C$2:$C$5,$B$2:$B$5^{1,2},1,0)*(B6^{2,1,0}))
B11:D11B11=LINEST(C2:C5,B2:B5^{1,2},1,0)
C14:C19C14=$B$11*B14^2+$C$11*B14+$D$11
Press CTRL+SHIFT+ENTER to enter array formulas surrounded with curly braces.

I needed the formula you provided in C6:C7, thanks much!

The conversation may continue to further explore the formulas in B11:D11...please stay tuned... :)
 
Upvote 0
I needed the formula you provided in C6:C7, thanks much!

The conversation may continue to further explore the formulas in B11:D11...please stay tuned... :)

Okay, we're done! The issue with getting the formulas in B11:D11 was a matter of ensuring the range does not have zero values which skew the calculation.

We're all good, many thanks!
 
Upvote 0
You're welcome...glad to help. As a side note, if there is any theory relating SMU Hrs to Wear, then it would make sense to examine the theory and choose a regression model that is consistent with the theory. You may be doing that--or lacking any theory, investigating which models appear to give the best fit.
 
Upvote 0
You're welcome...glad to help. As a side note, if there is any theory relating SMU Hrs to Wear, then it would make sense to examine the theory and choose a regression model that is consistent with the theory. You may be doing that--or lacking any theory, investigating which models appear to give the best fit.

Indeed. For SMU Hrs, it's the exponential curve that best reflects the reality - the more component wear, the faster components wear. My colleague, however, was looking for polynomial because costs have a sweet spot in the fat part of an inverted bell curve - client activity that is too low or too high are more costly than activity in the target zone.

What's fun is trying to understand the pure mathematics of it...and then looking for the tools (Excel, in this case) to correctly illustrate.

Many thanks!
 
Upvote 0

Forum statistics

Threads
1,214,584
Messages
6,120,387
Members
448,956
Latest member
JPav

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