+ Reply to Thread
Results 1 to 7 of 7

Curve fitting/goal seek problem

Hybrid View

  1. #1
    Registered User
    Join Date
    03-31-2008
    Posts
    17

    Curve fitting/goal seek problem

    Hi, I would be grateful if anyone could give me some ideas how to get round this problem I have.

    I have a large amount (~400) of data series, each consisting of about 900 X and Y values. For each set of X and Y values, I want to compare their plot to the equation Y=A*(X^(2/3)) , where A is a constant for that particular pair of series, and then choose the A value which has the smallest RMS (root mean square) error to the plot of X and Y.

    This is fine for one pair of X and Y values - I simply plot a table of of new Y values based on different A values (from 0 to -1) and choose the one with the lowest RMS error. However, just for one data series this takes at least 10 minutes - how can I at least partly automate this process? I have hardly any programming knowledge but am farily competant with forumlae in excel. I have been told goal seek might be the solution to my problem?

    Thanks in advance

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    If the x values are in A1:A400, and Y is in B1:B400, then in C1 and copy down =A1 ^ (2/3)

    Then in some vacant cell, =LINEST(B1:B400, C1:C400, FALSE) to get the value of the best-fit coefficient.

    Edit: The last argument results in the best fit for y = az (where z = x^(2/3) ). If the last argument is TRUE or omitted, it computes the best fit to y = az + b. LINEST also returns the value of b, along with other metrics of the fit, if it is array-entered.
    Last edited by shg; 03-31-2008 at 02:54 PM.

  3. #3
    Registered User
    Join Date
    03-31-2008
    Posts
    17
    Excuse my ignorance, what do you mean by 'array entered'?

    Thankyou very much for that forumlae, it has saved me alot of time already!

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Confirmed with Ctrl+Shift+Enter instead on Enter, and entered simutaneously in enough cells to show all the stats you want to see.

  5. #5
    Registered User
    Join Date
    03-31-2008
    Posts
    17
    Thanks.

    One more question - how can I make it so the forumla ignores empty cells? Or so the formula automatically includes data to the 'end' of the column - as my data column lengths differ.

    Edit: I've managed to use COUNTIF to return the total number of rows in a column, but how can I reference to this number in the LINEST forumla? For example if I have 400 rows, and the COUNTIF formula is in cell A1, I would want =LINEST(B1:B*(A1), C1:C*(A1), FALSE) but obviously this does not work.

    Thanks
    Last edited by rambochuck; 04-01-2008 at 11:58 AM.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Suggest you search on www.Ozgrid.com/forum for dynamic named ranges.

+ 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