+ Reply to Thread
Results 1 to 4 of 4

Math question: Creating a ratio?

  1. #1
    Registered User
    Join Date
    10-30-2006
    Posts
    30

    Math question: Creating a ratio?

    I need to develop a rough ratio based on the following data ...
    Please Login or Register  to view this content.
    I'd like to be able to then enter a number on the left, say 33, and get the corresponding value. Does anyone have experience solving a puzzle like this?

    Thank you.

    Layne

  2. #2
    Forum Contributor
    Join Date
    07-05-2006
    Location
    Canada
    MS-Off Ver
    2003, 2007
    Posts
    581
    You have two choices.

    1) Use the FORECAST() function. Pick a random X value, and it will generate a Y value based on your data. It is determined by linear regression. The ratio is Y/X.

    =FORECAST(33,B1:B10,A1:A10)

    2) Use the LINEST() function. The value it returns will be the slope of the line, aka, the ratio between the two values. (Uses least squares)

    =LINEST(B1:B10,A1:A10,TRUE,FALSE)

    If you want (0,0) to be a member of the set (ie. force the x,y-intercepts to be 0), change this to:

    =LINEST(A1:A10,B1:B10,FALSE,FALSE)

    Both of these methods will work; they will both give you different estimates of the ratio.

    Scott
    Last edited by Maistrye; 11-28-2006 at 01:48 PM.

  3. #3
    Forum Contributor
    Join Date
    10-27-2006
    Location
    United Kingdom
    MS-Off Ver
    EXCEL 2003 (2007 at home)
    Posts
    517

    Interpolation Verses Fit.

    If all you want is linear interpolation I would use FORECAST.

    If you want to get out the equation for a simple linear fit, I would use SLOPE and INTERCEPT rather than LINEST, the answer is the same, but LINEST can be awkward to use.

    I quickly copied down your values and tried a trendline in a chart, I note that your data seems to be basically quadratic.

    You could use LINEST to get a polynomial solution and actually try to get an equation that fits the data. As mentioned above LINEST can be awkward to use, but it can be worth the hassle if the circumstances dictate.

    Mark.

  4. #4
    Forum Contributor
    Join Date
    10-27-2006
    Location
    United Kingdom
    MS-Off Ver
    EXCEL 2003 (2007 at home)
    Posts
    517

    Furthermore

    If you are going to use linear interpolation I would select just the points either side of the one you want.

    Thus assuming your data is in Columns A and B; Rows 2 to 10:

    =FORECAST(A12,OFFSET($B$2,MATCH(A12,A2:A10,1),0,2),OFFSET($A$2,MATCH(A12,A2:A10,1),0,2))

    Enter the number to be interpolated into A12

    Mark.

    PS.
    Can anyone think of a neater way to find the addresses of the cells on either side of the required point?
    The above equation is aesthetically horrid!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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