+ Reply to Thread
Results 1 to 8 of 8

Thread: how to calculate co-efficients

  1. #1
    Points: 40, Level: 1
    Level completed: 80%, Points required for next Level: 10

    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts

    how to calculate co-efficients




    Hi all,
    This is my first post on this forum.

    Lets say I have,
    x vectors (-0.0028, 5.0028, 10.0085, 15.0085, 20.0028)
    y vectors (0, 5, 10, 15, 20)

    Order = 4

    y = b0 + b1x + b2x + b3x^3 + b4 x^4

    Is there any equation to calculate b0, b1, b2, b3, b4 values?

    Thanks and Regards,
    Hemnath.D

  2. #2
    Omega Contributor
    Points: 38,289, Level: 100
    Level completed: 0%, Points required for next Level: 0
    hlsmith's Avatar
    Location
    Not Ames, IA
    Posts
    6,992
    Thanks
    397
    Thanked 1,185 Times in 1,146 Posts

    Re: how to calculate co-efficients

    Ordinary least squares?


    When you say "Order=4", you mean to the 4 power?

  3. #3
    Points: 40, Level: 1
    Level completed: 80%, Points required for next Level: 10

    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: how to calculate co-efficients

    I want to calculate the co-efficients of fourth order equation. since i have 5 data points.

  4. #4
    Devorador de queso
    Points: 95,540, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,930
    Thanks
    307
    Thanked 2,629 Times in 2,245 Posts

    Re: how to calculate co-efficients

    You could just use any software that fits linear models to get the coefficients. But if you want to do this by hand you might want to read this: https://en.wikipedia.org/wiki/Polynomial_interpolation
    I don't have emotions and sometimes that makes me very sad.

  5. The Following User Says Thank You to Dason For This Useful Post:

    hemnath (09-25-2015)

  6. #5
    Points: 40, Level: 1
    Level completed: 80%, Points required for next Level: 10

    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: how to calculate co-efficients

    Yes I have tried with software and manually calculated by putting matrices to calculate the co-efficients. Both the results are same.

    But the thing is, Is anyone evaluated the equation to find the co-efficients. Because I'm developing an application that doesn't support matrices. Only arithmetic calculations. If there is equation to find the co-efficients, I can easily put into my application. Can you please take me in the right path.

    Thanks in Advance.

  7. #6
    TS Contributor
    Points: 12,227, Level: 72
    Level completed: 45%, Points required for next Level: 223
    rogojel's Avatar
    Location
    I work in Europe, live in Hungary
    Posts
    1,470
    Thanks
    160
    Thanked 332 Times in 312 Posts

    Re: how to calculate co-efficients

    Hi,
    depending on what you want, this couild be useful: https://mat.iitm.ac.in/home/sryedida.../lagrange.html
    regards

  8. The Following User Says Thank You to rogojel For This Useful Post:

    hemnath (09-30-2015)

  9. #7
    Super Moderator
    Points: 13,151, Level: 74
    Level completed: 76%, Points required for next Level: 99
    Dragan's Avatar
    Location
    Illinois, US
    Posts
    2,014
    Thanks
    0
    Thanked 223 Times in 192 Posts

    Re: how to calculate co-efficients

    Quote Originally Posted by hemnath View Post
    Hi all,
    This is my first post on this forum.

    Lets say I have,
    x vectors (-0.0028, 5.0028, 10.0085, 15.0085, 20.0028)
    y vectors (0, 5, 10, 15, 20)

    Order = 4

    y = b0 + b1x + b2x + b3x^3 + b4 x^4

    Is there any equation to calculate b0, b1, b2, b3, b4 values?

    Thanks and Regards,
    Hemnath.D
    I don't think you realize what it is you are actually really doing. Specifically, you are using curvilinear regression analysis using the highest-degree polynomial possible, which will make your R^2 equal to eta^2 - your accounting for both linear and non-linear effects - since both analyses permit as many bends in the curve as there are degrees of freedom minus one for the between-sums of squares.

    In short, you are doing nothing more than conducting a regression analysis using "dummy coding". Thus, the coefficients associated with your model are straight forward to compute: b0=20 (value of y asssigned 0's), b1=-20 (0-20), b2=-15 (5-20), b3=-10 (10-20), and b4=-5 (15-20).

    As such, the coefficients are nothing more that the differences between the value assigned "zeroes" and the other values of y.

    Note: One of the goals of scientific research, however, is parsimony. The interest is not so much in the highest-degree polynomial equation possible - but rather - in the highest-degree polynomial equation necessary to describe a set of data.

    I hope this helps.

  10. #8
    Points: 40, Level: 1
    Level completed: 80%, Points required for next Level: 10

    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: how to calculate co-efficients


    Thanks guys. Used the Lagrange's Interpolation formula.

    I have Y vectors = (0, 5, 10, 15, 20)
    At Condition1, x Vectors = (-0.0056, 5.0000, 10.0057, 15.0057, 20.0000)
    At Condition2, x vectors = (-0.0028, 5.0028, 10.0085, 15.0085, 20.0028)
    At Condition3, x vectors = ( 0.0000, 5.0056, 10.0113, 15.0113, 20.0056)

    There can happen many conditions between condition1 and condition2 or between condition2 and condition3.

    I calculated the co-efficients for conditon2.

    When I apply x = 10.0085 for condition1, I get y = 10.0000
    When I apply x = 10.0057 for condition2, I get y = 9.99720
    When I apply x = 10.0113 for condition3, I get y = 10.002798

    To get y = 10.0000 for any condition, Do I have to calculate co-efficients individually? Or is there any mathematical model or which regression technique should i use?

    Please guide me.
    Thanks in advance.

+ Reply to Thread

           




Posting Permissions

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






Advertise on Talk Stats