Talk:Algorithms for calculating variance: Difference between revisions

Content deleted Content added
Supect a formulae error....
JBrusey (talk | contribs)
Line 182:
Pascal P.
[[Special:Contributions/90.37.121.130|90.37.121.130]] ([[User talk:90.37.121.130|talk]]) 13:52, 17 November 2008 (UTC)
 
===Division by zero problem?===
The online algorithm should work with n=1 since it needs to progress through that stage to get to n=2, n=3, etc. Therefore, it would be incorrect to calculate the variance as
 
variance = M2 / (n-1)
 
A possible fix is:
 
if n > 1 then
variance = M2 / (n-1)
else
variance = 0
end if
 
Does any one have any objections to me updating this? [[User:JBrusey|JBrusey]] ([[User talk:JBrusey|talk]]) 14:06, 9 April 2009 (UTC)