Quandaries
and Queries 

hi I must keep statistical data (mean and variance) in 3 granularity levels depending on the age of the data (daily for older than 1 year, hourly for older than 1 month and quarterhour for older than 1 day). How can I calculate the resulting variance from a set of variances previously calculated supposing I have the count and mean for each member of the set? thank you 

Hi Carlos, There a number of equivalent expressions for the variance. The one I want to use is where is the mean of the xvalues. I want to change the notation to make it easier to type. Let
The expression for the variance is then
Assume that you have the calculations for n xvalues so you know n, V(n), M(n), and you receive a new xvalue, x_{n+1}. M(n) is the sum of the previous xvalues divided by n so you can recover the sum of the previous xvalues by n M(n). Thus
To evaluate V(n+1) all that remains is to find S(n+1). You know V(n), M(n) and n so solve
for S(n). Now calculate
and then V(n+1). Andrei and Penny 

