I add these two methods to the math functions protocol of the Collections class:
variance
^(self - self average) squared average
and
standardDeviation
^self variance sqrt.
Be careful with large collections integers as these methods will invoke fraction arithmetic which is rather slow. In most cases it would be better to force floating point.
-- View this message in context: http://forum.world.st/statistics-standard-deviation-tp4655159p4658151.html Sent from the Squeak - Dev mailing list archive at Nabble.com.