+ Reply to Thread
Results 1 to 3 of 3

Create a polynomial regression formula that can be updated on the fly?

  1. #1
    Registered User
    Join Date
    10-23-2007
    Posts
    1

    Create a polynomial regression formula that can be updated on the fly?

    I have a data set with that I want to expand from 5 numbers to fifty numbers. The five known numbers represent positions 5, 15, 25, 35, and 45 in the set.
    x y
    5 400
    15 500
    25 700
    35 1000
    45 1400

    I know I can get a polynomial best fit equation to expand this to cover all of 1-50, (in this case y = 0.00833333x^3 %2B 0.0178571x^2 %2B 7.64881x %2B 358.839) but if any of the 5 original numbers changes then the equation must be recreated. The five numbers are the product of another formula elsewhere in XLS and so can be changed frequently. Is there any way to create a polynomial regression type formula automatically so that no matter what I do to those 5 numbers my 1-50 can be recalculated automatically?

    Completely lost on this one, any help would be hugely appreciated! Thanks.

  2. #2
    Forum Contributor
    Join Date
    08-22-2005
    Location
    Denmark
    MS-Off Ver
    Excel 365
    Posts
    349
    This example has sampled x-values in cells A2 to A6, y-values in B2 to B6 and puts your coefficients in cells C3 to F3.
    In C3 write
    Please Login or Register  to view this content.
    Mark cells C3 to F3
    Press F2
    Press CTRL+SHIFT+ENTER

    The cells C3 to F3 now contain an array with the coefficients a to d and your equations goes y=ax3+bx2+cx+d
    If you change the sampled values in A2 to B6 the array also changes
    I've read that Excel can handle up to 16'th degree, but I've never tried it.

    Check semicolons and commas in the formula, as my Excel is not in english and I'm not sure how the american versions work.
    The spreadsheet in the attached zip file contains also other, perhaps easier solutions - arrays can sometimes be a nuisance...


    NSV
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    08-22-2005
    Location
    Denmark
    MS-Off Ver
    Excel 365
    Posts
    349
    - and note also that X and Y are switched around in the two sheets.
    - and by the way, I have only one alternative solution, ie. the one with the TREND function. Takes up more space, but you don't have the array
    - I attach a new zip where the difference between sampled and calculated values is more clear
    Attached Files Attached Files

+ 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