+ Reply to Thread
Results 1 to 4 of 4

Determine formula for calculating values in a table.

  1. #1
    Registered User
    Join Date
    04-24-2013
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    2

    Determine formula for calculating values in a table.

    Hi,

    I have a table of values, and I need to determine the relationship between the values. Here is a sample from the table:

    Temp Pressure
    32 0.0886
    35 0.0999
    40 0.1217
    45 0.1475

    I need to use the LOOKUP function to look up pressure values in this table, but I run into the problem where I have a temperature of, for example, 34 degrees. I need the actual pressure for that temperature. Is there a formula I can use to calculate what that would be? Is there a way to calculate the relationship between a set of values?

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

    Re: Determine formula for calculating values in a table.

    Is there a way to calculate the relationship between a set of values?
    When I see a question like this, my first thought is to use curve fitting/regression. I don't know how familiar you are with regression techniques -- it might be worth visiting your favorite intro to stats text and review linear regression techniques.

    In Excel, I find the easiest way to curve fit data is to use the LINEST() function http://office.microsoft.com/en-us/ex...in=HA010277524

    Often the hardest part of curve fitting is deciding what form of equation to use. This will usually be based on your knowledge of the underlying physical process being modeled and the expected equation that should use.

    Your data look fairly linear, without more information I would suggest a simple straight line y=mx+b, for which examples are readily given in the help file.

    Once you have the equation and the parameters for the equation, it should be easy to create a block of cells where you can input any T and get any P.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    04-24-2013
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    2

    Re: Determine formula for calculating values in a table.

    Thank you. When I plot the entire data set a 4th order polynomial trend line fits best. The equation isn't giving me exactly the right #s, but it will have to do. Thank you for the response.

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

    Re: Determine formula for calculating values in a table.

    A 5 parameter polynomial will provide a better fit than a 2 parameter polynomial any day of the week. The difficult part is justifying those extra parameters.

    Whenever I end up needing a high order polynomial like that to fit my data, I wonder if there is a better choice of equation. For example, most of the time when I want to relate temperature and pressure, the data I get usually needs some kind of exponential equation (depending, of course, on what physical properties were measured). A polynomial will require 4 or more parameters to fit data that could easily be fit by a 2 parameter exponential equation. I guess my point is, it might be worth the effort to do a little research and see if there is something better than polynomials to fit your data.
    he equation isn't giving me exactly the right #s,
    In what way is it not giving you exactly the right numbers? As noted, perhaps a different choice of equation would be better. Or perhaps a completely different approach. Another approach I use for this sort of thing is linear interpolation. Unfortunately, Excel does not have a built in linear interpolation function, but they are easy enough to build. If you search the forum, there have been UDF's proposed for linear interpolation -- one of them may suit your problem.

+ 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