2
2

Yoshua Bengio wrote (p.c.):

My preferred style of moving average is the following. Let's say you have a series x_t and you want to estimate the mean m of previous (recent) x's:

m <-- m - (2/t) (m - x_t)

Note that with (1/t) learning rate instead of (2/t) you get the exact historical average. With a larger learning rate (like 2/t) you give a bit more importance to recent stuff, which makes sense if x's are non-stationary (very likely here). With a constant learning rate (independent of t) you get an exponential moving average.

What is an accurate technique for computing the moving variance?

You can estimate a running average of the variance, using the running averages of the mean and of the square of the difference to the moving mean. However, I read a blog post (can't find the URL, unfortunately) that argues that this estimate has high error.

Is there a better technique for computing the moving variance?

asked Jul 02 '10 at 03:11

Joseph%20Turian's gravatar image

Joseph Turian ♦♦
467541105126

edited Jul 02 '10 at 20:57


3 Answers:

Use Welford's method as documented on wikipedia here:

http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#On-line_algorithm

Stable. Accurate. On-line.

answered Jul 03 '10 at 03:08

Ted%20Dunning's gravatar image

Ted Dunning
606814

Thanks Ted!

(Jul 03 '10 at 03:57) Joseph Turian ♦♦

Has anyone ever seen a Welford-GARCH-type algorithm? http://en.wikipedia.org/wiki/Autoregressive_conditional_heteroskedasticity

(Jul 22 '10 at 13:48) Russell Hanson

I think you are dealing with an ARCH model here http://en.wikipedia.org/wiki/Autoregressive_conditional_heteroskedasticity

answered Jul 14 '10 at 09:03

dirknbr's gravatar image

dirknbr
1112

Actually, there is one important distinction which is that you recommend keeping all the samples around so that you can reset the estimate. One of the nice things about Welford's method is that it doesn't need resetting.

You are absolutely correct, however, that the page you referenced does give Welford's method.

answered Jul 04 '10 at 19:50

Ted%20Dunning's gravatar image

Ted Dunning
606814

Your answer
toggle preview

powered by OSQA

User submitted content is under Creative Commons: Attribution - Share Alike; Other things copyright (C) 2010, MetaOptimize LLC.