+ Reply to Thread
Results 1 to 4 of 4

Finding a Formula with a LINEST() Style-Function for a Curved Line

  1. #1
    Forum Contributor
    Join Date
    06-08-2008
    Location
    USA
    MS-Off Ver
    Mac Excel 2016
    Posts
    103

    Finding a Formula with a LINEST() Style-Function for a Curved Line

    Hello!

    I have about 35 (x,y) coordinates that I would like to figure out the best formula for. Here are the coordinates:

    Please Login or Register  to view this content.
    Pretty simple, right? As you can see, it essentially approaches 0 at the minimum and 100 at the maximum (with regards to these x coordinates). Here's the graph:

    Microsoft Excel Example.jpg

    Normally with these types of scatterplots, I just need a line of best fit. So I use the LINEST() function and it works beautifully; obviously, that way, if the values change, my formula changes along with it and it's less manual updating on my part. But the problem here is that I need a formula that very closely represents this graph so that I can find out easily (along with automatic updating) where an x value of 46, for example, would be -- or a -16. As you can also see, I'm missing some numbers, like, -3 and -4.

    So the main goal is to get a formula that will more closely represent these points than a LINEST() and give me the y values for the x values I don't have listed. Any help?

    Thanks!

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,431

    Re: Finding a Formula with a LINEST() Style-Function for a Curved Line

    You can use the LINEST function to return the components of a polynomial trendline
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819

    Re: Finding a Formula with a LINEST() Style-Function for a Curved Line

    So the main goal is to get a formula that will more closely represent these points than a LINEST() and give me the y values for the x values I don't have listed. Any help?
    The hardest part of this question as I see it isn't really an Excel question at all, and it's probably a question that we on this forum are not going to be able to answer for you. The question boils down to "what kind of equation will give a reasonable best fit?"

    A lot of people will try to use polynomials as Andy Pope suggested. We like to use polynomials for several reasons. 1) They are infinitely flexible, which means that, by choosing a higher order polynomial, we can "fit" most data sets. 2) Polynomials are always "linear" (I don't know if your math education extends to linear algebra, but here we are using the term as it is used in linear algebra. In short, this means that "linear" refers to more than just straight lines and that "linear" regression routines like LINEST() will be able to find the parameters for us). 3) The math around polynomials is fairly well understood, a staple of most math classes, which means we are "comfortable" with polynomials.

    There are downsides to using polynomials. 1) Because of their flexibility, each term you add increases the potential for stretches where the function is unreasonable. At higher orders, it will certainly not extrapolate reliably, and there could easily be regions where it does not interpolate reliably. For your specific example, it appears that the data approach 0 asymptotically (but y is never <0) as x gets smaller and approach 100 asymptotically as x gets larger. If this is truly how your function should behave, it will likely be very difficult to constrain a polynomial to these limits (y is never <0 and y is never > 100). 2) Polynomials may not provide any insight into the process behind the data.

    I think you will be better served to step away from Excel for a while and research what kind of function should be used for the data. One that shows up here occasionally is what users have called a "logistics" function http://en.wikipedia.org/wiki/Logistics_function Logistics functions are fairly common for these kind of S shaped curves and can usually fit the data with fewer parameters than a polynomial. Usually they cannot be made "linear" like polynomials, so the algorithms behind LINEST() will not be able to regress them. You can use Solver, and even automate it to occur automaticallly (though naturally this isn't as convenient as the linear algorithms in LINEST()). If you decide that polynomials are an acceptable solution, you can use Andy Pope's spreadsheet as your starting point. I would suggest that, in the long run, you might be better served to find a better equation form that is better suited to your data.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  4. #4
    Forum Contributor
    Join Date
    06-08-2008
    Location
    USA
    MS-Off Ver
    Mac Excel 2016
    Posts
    103

    Re: Finding a Formula with a LINEST() Style-Function for a Curved Line

    Perfect! Thanks so much.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Linest Function - Unable to get LinEst property of the WorksheetFunction class
    By fbs13 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 07-25-2013, 09:55 AM
  2. Replies: 0
    Last Post: 02-26-2012, 05:20 AM
  3. Code or formula help for the LinEst function
    By joeyheaf in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-03-2011, 01:18 PM
  4. Exponential Curved Graph Function
    By Sean Anderson in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 12-09-2008, 01:38 AM
  5. Linest function: data not being selected in formula
    By NathanG in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1