Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Rolling Average

1 view
Skip to first unread message

Rex

unread,
Mar 12, 2002, 6:47:19 PM3/12/02
to
I've run across the term rolling average and have no idea how to
calculate it. I know that it isn't the standards: mean, median or
mode. I would appreciate any help on how to calculate a rolling
average and/or where to find more information on the topic.

Nick Maclaren

unread,
Mar 13, 2002, 3:59:32 AM3/13/02
to
In article <1673fbd6.02031...@posting.google.com>,

Books on statistics. The term "moving average" is even more common.
There are dozens of standard forms, and you can invent your own.
One simple one is to merge a data value X into a mean M by the
formula M' = (1-P)M+PX, for some fixed P.


Regards,
Nick Maclaren,
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QH, England.
Email: nm...@cam.ac.uk
Tel.: +44 1223 334761 Fax: +44 1223 334679

David Wilkinson

unread,
Mar 13, 2002, 5:15:00 AM3/13/02
to
You probably mean the moving average, as used in Technical Analysis of
stock prices mainly. See any TA book on this, but it is quite simple.
For a time series of daily closing prices the n-point moving average is
the average of the last n days' prices. Tomorrow the MA changes because
you add today's price and delete the one n days ago and work out the
average again.

<ryo...@nandomail.com> writes

--
David Wilkinson

Lynn Killingbeck

unread,
Mar 13, 2002, 3:13:46 PM3/13/02
to

Entering "rolling average" into http://www.google.com/ came up with a
lot of matches. Perhaps one of those is what you want? I suspect what
you have is just the average of the last N values for an N-point
rolling average. Might be the median of the N value, also.

If none of this helps, perhaps giving some context of the useage of the
term might get a useful response. Or not!

Lynn Killingbeck

Fred Marshall

unread,
Mar 14, 2002, 1:27:06 AM3/14/02
to

"Rex" <ryo...@nandomail.com> wrote in message
news:1673fbd6.02031...@posting.google.com...

Here's how it's calculated:
Choose N to be the desired number of data points in the moving average.
Normally this will be the number of data points that covers some epoch in
time that's interesting for your application.
then for x(n) being the nth data point,
moving ave (k) = [1/N]*[Sum over n=N-k+1 to k of x(n)] where the first
value of k >=N
so for
k=N, moving ave(N) = [1/N]*Sum over n=1 to N of x(n)]
k=N+1, moving ave(N+1) = [1/N]*Sum over n=2 to N+1 of x(n)]
etc.
Note that rather than computing the sums over and over you can do this:
k=N+2, moving ave(N+2) =moving ave[N+1] + [1/N]*[x(N+2) - x(2)]
that is, you remove the oldest contribution and add the newest.

Nick Maclaren

unread,
Mar 14, 2002, 4:10:06 AM3/14/02
to
In article <%oXj8.10509$_m2.29...@feed.centurytel.net>,

Fred Marshall <fmar...@acm.org> wrote:
>
>"Rex" <ryo...@nandomail.com> wrote in message
>news:1673fbd6.02031...@posting.google.com...
>> I've run across the term rolling average and have no idea how to
>> calculate it. I know that it isn't the standards: mean, median or
>> mode. I would appreciate any help on how to calculate a rolling
>> average and/or where to find more information on the topic.
>
>Here's how it's calculated:

There are perhaps half a dozen major, common forms, each with many
hundreds of variations. And probably a few dozen other published
major forms that are rarely used.

Any competent mathematician should be able to invent a few plausible
ones without even reaching for pencil and paper. This is an area
that is rich in reinvention.

Fred Marshall

unread,
Mar 15, 2002, 12:34:50 AM3/15/02
to
No doubt.

At least now Rex has one or two to choose from that have been stated for
him.

------------

"When the marker hits the white board .... arm waving takes on new meaning."


"Nick Maclaren" <nm...@cus.cam.ac.uk> wrote in message
news:a6ppde$lp8$1...@pegasus.csx.cam.ac.uk...

al samuel

unread,
Aug 9, 2004, 8:49:21 AM8/9/04
to

Here's how I do a rolling average for my company. We get paid for
transcribing (typing) Doctor's dictated words about their meetings
with patients.
We get paid by the line of type. So we count "lines"

if we get 1000 lines on the first day of the year
900 lines on the second
1200 lines on the third etc until the 365th day we can
calculate the "average" number of lines per day by adding all the
lines for 356 days and dividing by 365. So let's say we take that
average on day 365 after we have accumulated 365 entries and come up
with an average of 1230 lines per day. (Note we may have added or lost
doctors so the lines on a typical day may be greater than at the
start.(or less)

BUT HOW IS THE AVERAGE CHANGING? YOU NEED A ROLLING AVERAGE TO
DETERMINE THAT> calculated as follows:

On day 366 you add JUST the 365 immediately previous days and divide
by 365 to get the avearage perhaps 1235 on DAY 366. on day 367 you
take the immediately previous 365 days and divide by 365 and maybe you
get 1237. you TAKE A NEW AVERAGE OF 365 days EVERY DAY as time rolls
along and you get an AVERAGE THAT CHANGES AS YOU DROP off THE LAST DAY
AND ADD A NEW ONE EACH DAY. so the aveage will change as it rolls
along. EVERY DAY YOU ASK "WHAT WERE MY AVERAGE LINES LAST YEAR"
EVERY DAY IS THE END OF A YEAR SO YOU CAN TAKE AN AVERAGE FOR THAT
YEAR and watch how the ROLLING AVERAGE CHANGES, Such an average
removes variation due to seasonality but that is another story

0 new messages