+ Reply to Thread
Results 1 to 4 of 4

Determining x values from y values from a curve

  1. #1
    Registered User
    Join Date
    04-25-2014
    Location
    South Africa
    MS-Off Ver
    Excel 2013
    Posts
    2

    Determining x values from y values from a curve

    If I have the following data: 0 to 5 in increments of 0.5 for my x values and my y values are 4.9, 4.9, 4.6, 4.4, 4, 3.2, 1.2, 0.5, 0.2, 0. This set of data forms a curve. If I want to find the midpoint y being 4.9/2 = 2.45, how do I find the corresponding x value? And can you insert a line of some sort to show this point with respect to both axes?
    Last edited by JasonMcG; 04-25-2014 at 03:55 PM.

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

    Re: Determining x values from y values from a curve

    If I want to find the midpoint y being 4.9/2 = 2.45, how do I find the corresponding x value?
    2 basic approaches that can be used: fit the entire data set to a curve (probably a logistics type curve for something like this) or use linear interpolation. Linear interpolation is probably easier, and has been discussed many times. In post 18 of this thread (http://www.excelforum.com/excel-gene...of-curves.html) user shg has a sample spreadsheet with a UDF that may be useful for this purpose.

    And can you insert a line of some sort to show this point with respect to both axes?
    I think the easiest way to do this will be to add another series consisting of that point, then format it with appropriate error bars. http://office.microsoft.com/en-us/ex...310.aspx?CTT=1
    http://office.microsoft.com/en-us/ex...044.aspx?CTT=1
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,725

    Re: Determining x values from y values from a curve

    You have to do this with interpolation. There are two approaches to this.

    The simple approach is to take the two y values that bracket your target value, and do linear interpolation between those two points. In your case you have the two points (3.0, 3.2) and (3.5, 1.2). To interpolate 2.45, the answer is

    3.0 + (3.5-3.0)*(3.2-2.45)/(3.2-1.2)

    = 3.1875


    The difficult but more precise approach is to model your curve. For example, your data does not work well as a linear model. It looks like a third degree polynomial to me, and when I add a trendline Excel gives this equation:

    y = 0.1134x^3 - 1.0583x^2 + 1.4868x + 4.6252

    You want to start with y, and derive x. That's harder. That means you have to solve this equation for x and I don't know how to do that for anything higher than a quadratic. Someone else probably does.

    On review, I see MrShorty has beaten me with basically the same ideas.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  4. #4
    Registered User
    Join Date
    04-25-2014
    Location
    South Africa
    MS-Off Ver
    Excel 2013
    Posts
    2

    Re: Determining x values from y values from a curve

    Thanks for the answers

+ 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. Determining whether a value is within $1000 of a list of values
    By Earthtokarmen in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-15-2014, 04:40 PM
  2. Replies: 4
    Last Post: 10-04-2013, 02:00 PM
  3. Adding curve values
    By jeastman in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 03-21-2011, 10:39 AM
  4. Determining If Multiple Values Exist In Row
    By amsnss in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-11-2008, 08:20 AM
  5. Determining longest 'run' of zero values
    By TheRobsterUK in forum Excel General
    Replies: 3
    Last Post: 04-05-2005, 04:13 PM

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