+ Reply to Thread
Results 1 to 5 of 5

Invert Trendline Formula

  1. #1
    Registered User
    Join Date
    05-09-2017
    Location
    Toronto, Canada
    MS-Off Ver
    Windows 7
    Posts
    5

    Question Invert Trendline Formula

    I have a set of data that I graphed and put a trendline through

    I’m looking to invert the formula so that instead of “y=…” I have “x…”

    The reason for this is that I want to be able to input a Y value into a new formula and have it spit out and X value

    y = 0.015148944696193x^6 - 0.247366569780115x^5 + 1.603305785101060x^4 - 5.692234929217150x^3 + 14.188270884610700x^2 - 30.860446329252900x + 51.534783142882400

    Please see the screenshot below

    2a.JPG

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,973

    Re: Invert Trendline Formula

    I think you've fallen into common trap when using trend line, looks like you are over-fitting the curve.

    https://www.ma.utexas.edu/users/mks/...vefitting.html

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,372

    Re: Invert Trendline Formula

    I will agree with CK76 -- you might be over-fitting this with a 6th order polynomial. Spend some time with his link and your assumptions and come up with a better choice of equation.

    As to the direct answer to your query -- 6th order polynomials (technically any polynomial 4th order and higher cannot be inverted, and, while cubics can be inverted, the inversion will usually require complex numbers even if the "roots" are real) cannot be directly inverted. Numerical methods (such as those used by Goal Seek and Solver) are required to get x at a given y for high order polynomials (and many other functions).
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  4. #4
    Forum Expert
    Join Date
    05-01-2014
    Location
    California, US
    MS-Off Ver
    Excel 2010
    Posts
    1,795

    Re: Invert Trendline Formula

    The simplest way to "invert" the trendline is to switch the dependent and independent variables. In other words, create a series with X1:X100 for the y-axis and Y1:Y100 for the x-axis. Choose the simplest trendline that has a reasonably good RSQ, albeit maybe not the best RSQ. The trendline will always read y=...x... Just "translate" x to mean Y1:Y100 and y to mean X1:X100.

    If you do choose a high-degree polynomial to fit your data, beware that it is probably only useful for interpolating data points. Such formulas tend to "blow up" when you try to extrapolate them.

  5. #5
    Registered User
    Join Date
    05-09-2017
    Location
    Toronto, Canada
    MS-Off Ver
    Windows 7
    Posts
    5

    Re: Invert Trendline Formula

    Hey guys,

    Thanks so much for all of your help. I looked at all of your options. For the time being I just switched my X and Y axis (how did I not think of that before lol)

    I will, however, look at the article about over fitting the trendline.

    Thanks so much again!

+ 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] Excel 2010 Trendline With Data labels or number on forward forecast trendline
    By camelight in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 10-15-2015, 08:35 AM
  2. [SOLVED] Dynamic Trendline Formula
    By khuemann in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-08-2014, 11:42 AM
  3. Trendline/formula
    By adhca in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 07-03-2014, 06:16 AM
  4. [SOLVED] error in trendline formula
    By chiidzzz in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 06-07-2014, 08:36 AM
  5. [SOLVED] Invert Results of an Array Formula
    By jeversf in forum Excel General
    Replies: 7
    Last Post: 03-20-2012, 08:59 PM
  6. How do invert a formula that transposes data across worksheets?
    By Mowglimann in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-15-2009, 06:44 AM
  7. [SOLVED] Using Trendline Formula
    By Maarten in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-11-2005, 11:06 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