Results 1 to 12 of 12

Thread: formula for this type of relation rate

  1. #1

    Thread Starter
    Frenzied Member System_Error's Avatar
    Join Date
    Apr 2004
    Posts
    1,111

    formula for this type of relation rate

    I need a formula for something, but I'm not sure exactly what it's called. The last time I did any of this math was two years ago in precal and I honestly don't remember it! I know there was some formula and if it weren't summer I would go to my teacher and ask.


    The problem is this:


    I have three times: 3.9,20.1,43.8

    and then their relation heats: 118.3,327.9,591.8


    I need to find the time where the heat is 700, but I don't remember the formula for finding the relation.

    If anyone can help me with this it would be much appreciated.

  2. #2
    Addicted Member Rassis's Avatar
    Join Date
    Jun 2004
    Location
    Lisbon
    Posts
    248

    Re: formula for this type of relation rate

    A polinomial of second degree will do perfectly (determination factor R^2 = 1).

    Y = 9.4723.X^2 - 214.4.X + 810.37

    Therefore, for Y = 700, you get X = 22.10736. Is this what you were expecting? Or did I missunderstand your problem?

    Regards,

    Rui
    Last edited by Rassis; Aug 12th, 2006 at 02:17 AM.
    ...este projecto dos Deuses que os homens teimam em arruinar...

  3. #3
    Member
    Join Date
    Jul 2006
    Posts
    49

    Re: formula for this type of relation rate

    If you rember once using a formula, it was probably for finding the lagrange polynomial

    http://mathworld.wolfram.com/Lagrang...olynomial.html

    I agree with Rassis - you have three points so a second degree polynomial will do fine. You know it will look like ' y = ax² + bx + c ' so all you have to do is plug in your x and corresponding y values (here x is time and y is relation heats) and you'll end up with 3 simultaneous equations to find a, b and c from.

    They are likely to be hideous numbers, but Mathematica or Maple etc will solve it for you (perhaps even VB!?).

    what would be even better is if you plugged the numbers into the formula for Newton's Law of cooling, which can also be found at MathWorld

    http://scienceworld.wolfram.com/phys...ofCooling.html

    (solve for T_s, T_0 and K)

    Of course, it's far harder to solve, but I bet you could do it...

    Good luck and all the best, Mattywoo

  4. #4

    Thread Starter
    Frenzied Member System_Error's Avatar
    Join Date
    Apr 2004
    Posts
    1,111

    Re: formula for this type of relation rate

    I REALLY appreciate the help, but I don't think a polynomial is 100% correct, because the answer should be more than 43.8... It should be more of a linear or logorithmic formula.


    ahhh I wish I could remember. I know we took something like this: (theoretically)


    n, n+1, n+2


    We had it's results and then was able to come up with a formula out of several sequences..

  5. #5
    Fanatic Member VBAhack's Avatar
    Join Date
    Dec 2004
    Location
    Sector 000
    Posts
    617

    Re: formula for this type of relation rate

    Here is the situation as I see it. You have 3 data points and want to extrapolate to a 4th. Curve fitting is a perfectly valid approach, but there are many possible functions (limited to 3 unknowns max) that could be used.

    Three data points can be fit perfectly with a parabola (as Rassis indicated), but that may or may not reflect the nature of the physical phenomenon you are trying to model. Just plotting and eye balling, it looks like the answer is around 55, assumming a smooth curve.

    Fitting a parabola might provide sufficient accuracy for your needs, but it is much better if you have some knowledge of the type of function that best models the physical behavior. You say the data is 'time' and 'heat', thus it would appear to be some sort of transient conductive, convective, or radiative heat transfer problem. Can you tell us more about the physical problem the data represents?
    Last edited by VBAhack; Aug 12th, 2006 at 12:11 AM.

  6. #6
    Fanatic Member VBAhack's Avatar
    Join Date
    Dec 2004
    Location
    Sector 000
    Posts
    617

    Re: formula for this type of relation rate

    To illustrate, I picked 3 functions to fit to the data:

    (1) y = a*x+ b (straight line)
    (2) y = a*x^2 + b*x + c (parabola)
    (3) y = a*ln(x) + b*x + c (just made it up)

    The result and extrapolated value for 700 is:

    (1) y = 0.0845*x - 6.6374 ==> 52.5
    (2) y = 2.64E-5*x^2 + 0.0655*x - 4.218 ==> 54.6
    (3) y = -4.7655*ln(x) + 0.1*x + 14.761 ==> 53.9

    In the case of (1) it is a least squares fit, but the other 2 functions fit the data points exactly.
    Attached Images Attached Images  
    Last edited by VBAhack; Aug 12th, 2006 at 12:13 AM.

  7. #7
    Addicted Member Rassis's Avatar
    Join Date
    Jun 2004
    Location
    Lisbon
    Posts
    248

    Re: formula for this type of relation rate

    I would like to add something more to what VBAhack wrote.

    A polynomial of second degree is the only one that fits perfectly: Y = -0.0452.X^2 + 14.023.X + 64.29 returning Y = 55.12899 when X = 700. I am sorry but the polynomial that I wrote in my previous post was not the right one – it just couldn’t be (no way…) because, being an extrapolation, it should result some number definitively higher than 43.8.

    I tried some more functions (linear, power, logarithmic and exponential) using best of fit algorithms based on the method of least squares coded in EXCEL and I came up with the results that you can see yourself on the attached spreadsheet. As you can see, all of them return a coefficient of determination R^2 less than 1. Therefore they are not so good as the polynomial.



    I hope you will find your “lost” expression sometime soon.

    Regards,
    Attached Files Attached Files
    ...este projecto dos Deuses que os homens teimam em arruinar...

  8. #8
    Fanatic Member VBAhack's Avatar
    Join Date
    Dec 2004
    Location
    Sector 000
    Posts
    617

    Re: formula for this type of relation rate

    Rassis,

    Actually, I did mine kind of backwards if you consider time to be the independent variable (i.e. I used time as y). But the methodology is still the same. I did it again using x as time and came up with the same parabolic equation as you.

    However, I disagree on one contention - that a parabola is the only function that will fit the data perfectly. In fact, there are many, if not infinitely many. The functions used in the spreadsheet analysis all have only 2 parameters (k1 and k2). That almost guarantees a less than perfect fit because there are fewer unknowns than data points. Actually, a parabola with only 2 parameters (e.g. a*x^2 + b) won't fit perfectly. Functions with 3 parameters can be made to fit the data exactly. A perhaps silly but illustrative example is y = a * sin(x) + b*x + c or not so silly y = a * (0.1*x)^3 + b*x + c. Both of these functions can fit the 3 data points exactly. Other examples are attached below. As can be seen, the value of x for y = 700 depends on the function used. Thus, the importance of knowing something about the phenomenon you are trying to model, as we both agree.

    System Error,

    If all of this is more than you bargained for, the only approach I can think of along the lines of your last post is something like the following:

    Code:
    x	y	dx	dy	slope	% chg
    3.9	118.3	16.2	209.6	12.94	
    20.1	327.9	23.7	263.9	11.14	0.86
    43.8	591.8	11.3	108.2	9.58	0.86
    55.1	700.0
    Analyzing the differences between the data point x's and y's and calculating slopes, the ratio of the slope of the line between data point 1 and 2 to the slope of the line between data points 2 and 3 is 86%. If you force that same slope ratio to the 4th (extrapolated) point, you get 55.1 for the value of time. If instead of forcing the same slope ratio you forced the same slope difference, the end result would be 55.4 for time. This is perhaps an easier approach than what has been discussed so far, but in the end it is the same thing - you are fitting an assummed function to the data and extrapolating, though it may not be obvious in this case.
    Attached Images Attached Images  
    Last edited by VBAhack; Aug 12th, 2006 at 02:35 PM.

  9. #9
    Addicted Member Rassis's Avatar
    Join Date
    Jun 2004
    Location
    Lisbon
    Posts
    248

    Re: formula for this type of relation rate

    Hi VBAhack,

    Thank you for taking the time and the effort to demonstrate that I was wrong when I said that a “polynomial of second degree would be the only one that fitted perfectly”. You are absolutely right. I am so much used to consider uniform, linear, power, logarithm, logistic, exponential and polynomials functions to describe relations among variables in operations engineering that I tend to forget that “there is more world out there…”.

    I am so sorry and thank you very much for your clear and convincing explanations.
    ...este projecto dos Deuses que os homens teimam em arruinar...

  10. #10
    Fanatic Member VBAhack's Avatar
    Join Date
    Dec 2004
    Location
    Sector 000
    Posts
    617

    Re: formula for this type of relation rate

    No worries. I just find topics like this fascinating. As a final note to emphasize the importance of knowing the nature of the function the data represents (touche Mattywoo2), consider this. A 3rd order polynomial can be fit exactly to 4 points (just like a 2nd order polynomial can be fit to 3 points). By choosing the answer we want for y = 700 (e.g. 55), we can construct a 3rd order polynomial that not only fits the first 3 data points, but yields whatever we want (within limits) for x corresponding to y = 700. In a sense this is no less valid than fitting a 2nd order polynomial to the 3 points and finding the value of x for y = 700, since we are arbitrarily choosing the fitting function anyway. It just highlights the caveat of extrapolating data w/o knowledge of the functional nature of the data points.
    Last edited by VBAhack; Aug 14th, 2006 at 12:24 AM.

  11. #11
    Member
    Join Date
    Jul 2006
    Posts
    49

    Re: formula for this type of relation rate

    Yes, that is a good point!

  12. #12
    Addicted Member Rassis's Avatar
    Join Date
    Jun 2004
    Location
    Lisbon
    Posts
    248

    Re: formula for this type of relation rate

    I couldn´t agree more.
    ...este projecto dos Deuses que os homens teimam em arruinar...

Posting Permissions

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



Click Here to Expand Forum to Full Width