+ Reply to Thread
Results 1 to 8 of 8

Calculate average difference of a series.

  1. #1
    Registered User
    Join Date
    08-11-2014
    Location
    Wellington
    MS-Off Ver
    2013
    Posts
    28

    Question Calculate average difference of a series.

    Hi,

    can someone provide a formula to calculate the average of difference between a set of numbers. e.g 1,3,5,7,9. ((1-3)+(3-5)+(5-7)+(7-9))/4. Thankyou

  2. #2
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Calculate average difference of a series.

    So, basically, (1-9)/4, for your example above? All of the numbers between the first and the last cancel out.

    How dynamic does this need to be? The simplest is if the numbers are listed from A1:A5, then
    =(A1-A5)/4
    Pauley
    --------
    If I helped with your issue, I'd appreciate a rep bump (hit the '*' icon to the bottom left of this post).

  3. #3
    Registered User
    Join Date
    08-11-2014
    Location
    Wellington
    MS-Off Ver
    2013
    Posts
    28

    Re: Calculate average difference of a series.

    what about for a random series like this 19,23,43,54,20,13,19? i want to calculate the average change between numbers from left to right.

  4. #4
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Calculate average difference of a series.

    Try this..
    Assuming the source range is A1:A5
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    This will do...
    Regards,
    Vikas Gautam
    Excel-buzz.blogspot.com

    Excel is not a matter of Experience, its a matter of Application.

    Say Thanks, Click * Add Reputation

  5. #5
    Forum Expert boopathiraja's Avatar
    Join Date
    07-12-2013
    Location
    Coimbatore,TamilNadu, India
    MS-Off Ver
    Excel 2007, 2013, 2016, 365
    Posts
    1,455

    Re: Calculate average difference of a series.

    if the datas are in A1 to G1 try


    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Click just below left if it helps, Boo?ath?

  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,438

    Re: Calculate average difference of a series.

    For another approach, a little algebra will show that the average of the differences is the same as the difference of the averages:

    ((1-3)+(3-5)+(5-7)+(7-9))/4 -> (1+3+5+7)/4-(3+5+7+9)/4 -> =average(set1)-average(set2)
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  7. #7
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Calculate average difference of a series.

    Quote Originally Posted by avinkris View Post
    what about for a random series like this 19,23,43,54,20,13,19? i want to calculate the average change between numbers from left to right.
    It doesn't matter that your series is random or not. Mathematically-speaking, performing:

    =AVERAGE(x1-x2,x2-x3,x3-x4,...,xn-1-xn)

    is identical to performing:

    (x1-xn)/(n-1)

    as Pauleyb points out.

    Or, in Excel terms, the array formula**:

    =AVERAGE(A1:A5-A2:A6)

    is identical to the non-array:

    =(A1-A6)/(COUNT(A1:A6)-1)

    Regards
    Last edited by XOR LX; 09-25-2014 at 02:36 AM.
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  8. #8
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Calculate average difference of a series.

    Always enjoy a good math discussion. If @avinkris knows the amount of measurements and the quantity of measurements is always the same, then I think we all agree that
    (First Measurement - Last Measurement)/(Number of Measurements - 1)
    is the simplest solution, and then 'hard coding' it to something like
    =(A5-A1)/4
    No need for arrays.

    So, I wanted to know whether or not the number of measurements is dynamic. Here is my solution assuming the list starts in A1 and then goes across row 1:
    =(A1-INDEX(1:1,,MATCH(1E+99,1:1,1)))/(MATCH(1E+99,1:1,1)-1)

    Could use COUNT instead of MATCH, but the MATCH will ignore any blank cells between A1 and the last number (assuming that is a possibility).

    Any thoughts to improve? Maybe determining where the start of the numbers are (e.g. A1 is blank and the numbers start in A2?).
    Last edited by Pauleyb; 09-25-2014 at 10:51 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 8
    Last Post: 11-06-2013, 08:01 PM
  2. Calculate average difference between two columns of data [if criteria is met]
    By samcdavies in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-29-2013, 04:56 AM
  3. difference between numbers in a rolling series
    By irvgotti in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-10-2013, 10:14 AM
  4. Replies: 1
    Last Post: 12-14-2005, 11:10 PM
  5. [SOLVED] Can I add an average series to a chart with 2 or more series?
    By Yaniv in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 06-16-2005, 07:05 PM

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