+ Reply to Thread
Results 1 to 7 of 7

Trendline equation

  1. #1
    Registered User
    Join Date
    04-27-2005
    MS-Off Ver
    2003
    Posts
    16

    Trendline equation

    Hi experts, I have some data in ranges C2:C7, and B2:B7. Values are:

    for range B2:B7 we have this:
    B2: 100
    B3: 200
    B4: 300
    B5: 400
    B6: 500
    B7: 600

    and for range C2:C7 we have this:
    C2: 100.41
    C3: 200.842
    C4: 301.274
    C5: 401.706
    C6: 502.138
    C7: 602.57

    and resulting Trend line equation in the graph is the following:

    y = 6.50521E-19x3 - 6.39246E-16x2 + 1.00432E+00x - 2.20000E-02
    with R2 = 1.00000E+00

    I usually obtain directly the coefficients (6.50521E-19, -6.39246E-16, 1.00432E+00, -2.20000E-02) using something like this:

    =INDEX(LINEST(C2:C7,B2:B7^{1,2,3}),1)
    =INDEX(LINEST(C2:C7,B2:B7^{1,2,3}),2)
    =INDEX(LINEST(C2:C7,B2:B7^{1,2,3}),3)
    =INDEX(LINEST(C2:C7,B2:B7^{1,2,3}),4)

    (each value in a different cell)

    but I realized that numbers with so small power (E-16, E-19 for this case) the result coefficient is zero using the formula.

    Is there some way to see the correct small coefficient numbers (6.50521E-19 and -6.39246E-16 for this case), just like the graph shows?

    Thanks in advance.
    "Strong is who knows his own capacities, but is still stronger who also knows his own weaknesses". Deladier M.

  2. #2
    Registered User
    Join Date
    01-29-2010
    Location
    Sofia, Bulgaria
    MS-Off Ver
    Excel XP, Excel 2003, Excel 2007
    Posts
    27

    Re: Trendline equation

    so, you want to see zeros, right?

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Trendline equation

    Trendlines and LINEST compute coefficients in different ways, for some reason that escapes me, so I don't have a suggestion for that.

    However, there is no need to invoke LINEST (a very heavyweight function) four times to get four coefficients. Select a range 4 columns wide, and paste this in the formula bar:

    =LINEST(C2:C7, B2:B7^{1,2,3})

    Don't press Enter; instead, press and hold the Ctrl and Shift keys, then ppress Enter.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    04-27-2005
    MS-Off Ver
    2003
    Posts
    16

    Re: Trendline equation

    Not really, bstoyano. I only want to be able to see a very small number (that it is practically zero, but not zero, per example: 6.50521E-19) using the formula but I don't want just a simple zero instead.

  5. #5
    Registered User
    Join Date
    04-27-2005
    MS-Off Ver
    2003
    Posts
    16

    Re: Trendline equation

    Thanks, shg. That is what I thought about it. Is there some other way to get the coefficients without using LINEST function and be able to show even the smallest numbers?

  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

    Re: Trendline equation

    You could do your own matrix inversion, but why bother? The numbers are negligably different, considering the dynamic range of the coefficients, and the fact that you're doing a basis-function (here, polynomial) fit, which is, by definition, an approximation of an over-defined system.

  7. #7
    Registered User
    Join Date
    04-27-2005
    MS-Off Ver
    2003
    Posts
    16

    Re: Trendline equation

    Mmmh...Ok, shg. Let me see then what to do on the matter. Thanks a lot.

+ 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