LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  moving/trailing average

    Employee
    Posted 07-29-2014 10:18

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ryeh

    A customer recently asked about calculating a moving/trailing average. Suppose that you have monthly data and you'd like to create a moving 3-month average. The following example takes the current month and two previous months (for a total of three months) and computes the average of the three values.

    Two slightly different flavors. The second implementation takes into account any gaps, i.e. missing values, in the data. If there are gaps, then the average will be taken of the available data (still only looking at current and two prior months).

    As expected, the line graph shows smoother data. There is, however, lag in the numbers as we are taking "old" data.
    Attachments:
    trailing_average.brg