Content deleted Content added
Line 228:
then you have an easy way to compute the variance as you go. You also have an easy way to combine the variances of two populations. Just add the sums (and sums of squares) and the counts. No divide-by-zeros. Very few math operations. What more can you ask for? :)
::: The connection to the second equation of the "naive algorithm" follows immediately from the definition of <math>E[X^2]</math> and <math>E[X]</math>. The "parallel algorithm" is an online algorithm that easily merges statistics from multiple population (as noted in the text), though a better heading might make this clear. The key point is that a parallel algorithm can be implemented as a repeated serial algorithm, and the merging part is identical in both. [[User:Markjamesabraham|Markjamesabraham]] ([[User talk:Markjamesabraham|talk]]) 22:45, 26 May 2010 (UTC)
▲:::: Ah, well the connection between the two wasn't spelled out to the satisfaction of my (possibly caffeine-deprived) mind. And, as far as I can tell, the online algorithm does not easily merge statistics from multiple populations, but rather updates the statistic one sample at a time. Correct me if I am wrong, or please add a suitable method to the page. [[Special:Contributions/209.237.23.36|209.237.23.36]] ([[User talk:209.237.23.36|talk]]) 22:56, 13 May 2009 (UTC)
==Pseudocode==
The numerically stable mean and variance computation works, but attempting something similar for skewness and kurtosis using the incremental moments computation code in the later section seems to fail. Is something missing in it ? Are there any reference implementations ? [[User:Shyamal|Shyamal]] ([[User talk:Shyamal|talk]]) 16:17, 14 July 2009 (UTC)
|