Subluminal Messages

A science blog for all scientists, even amateurs.

Running Standard Deviations

My friend Dan at Invisible Blocks came up with a great way to compute a long-running mean from the count and mean:

count += 1
mean += (x - mean) / count

I remembered that I had come up with a similar thing for standard deviation back when I was developing clustering algorithms that could use that value. It uses a power sum average, where you track the power sum as an average (divide the power sum by n) in a similar way.

Read more »

July 31, 2008 Posted by jpmccusker | Computer Science, Science, Statistics, bioinformatics | , , , , , , | 3 Comments