<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Comparing three methods of computing standard deviation</title>
	<atom:link href="http://www.johndcook.com/blog/2008/09/26/comparing-three-methods-of-computing-standard-deviation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.johndcook.com/blog/2008/09/26/comparing-three-methods-of-computing-standard-deviation/</link>
	<description>The blog of John D. Cook</description>
	<lastBuildDate>Sat, 13 Mar 2010 14:22:54 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jaime</title>
		<link>http://www.johndcook.com/blog/2008/09/26/comparing-three-methods-of-computing-standard-deviation/comment-page-1/#comment-17846</link>
		<dc:creator>Jaime</dc:creator>
		<pubDate>Fri, 22 May 2009 12:02:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=449#comment-17846</guid>
		<description>John,

This has to be one of the coolest algorithms ever!!! I need to work out the math, but it seems that it should also be possible to keep a running mean and variance while removing data. Wouldn&#039;t that allow to do real-time elimination of outliers, and give a more accurate running average of the data stream?

I&#039;m thinking of stuff like a bicycle&#039;s speed&#039;o&#039;meter, or a heart rate monitor: along your ride or run the sensor moves, or something odd happens, and suddenly the readings drop to zero, or double... Maybe hardware is better now, but that used to happen very often when I did triathlons, some five years ago. Even if it ony lasts for a short while, it may mess your average readings big time, which may be the thing you wanted to base your day&#039;s training on.

I&#039;ll try to elaborate more on the idea, but meanwhile cast the question to ye, the statisticians: is there any fundamental theoretical flaw in the above idea?</description>
		<content:encoded><![CDATA[<p>John,</p>
<p>This has to be one of the coolest algorithms ever!!! I need to work out the math, but it seems that it should also be possible to keep a running mean and variance while removing data. Wouldn&#8217;t that allow to do real-time elimination of outliers, and give a more accurate running average of the data stream?</p>
<p>I&#8217;m thinking of stuff like a bicycle&#8217;s speed&#8217;o'meter, or a heart rate monitor: along your ride or run the sensor moves, or something odd happens, and suddenly the readings drop to zero, or double&#8230; Maybe hardware is better now, but that used to happen very often when I did triathlons, some five years ago. Even if it ony lasts for a short while, it may mess your average readings big time, which may be the thing you wanted to base your day&#8217;s training on.</p>
<p>I&#8217;ll try to elaborate more on the idea, but meanwhile cast the question to ye, the statisticians: is there any fundamental theoretical flaw in the above idea?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The 41st Carnival of Mathematics &#171; 360</title>
		<link>http://www.johndcook.com/blog/2008/09/26/comparing-three-methods-of-computing-standard-deviation/comment-page-1/#comment-7612</link>
		<dc:creator>The 41st Carnival of Mathematics &#171; 360</dc:creator>
		<pubDate>Sat, 11 Oct 2008 13:30:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=449#comment-7612</guid>
		<description>[...] the error in the central limit theorem, and how close an approximation we can really get. He also compares three methods of computing standard deviation - turns out they&#8217;re not all equally [...]</description>
		<content:encoded><![CDATA[<p>[...] the error in the central limit theorem, and how close an approximation we can really get. He also compares three methods of computing standard deviation &#8211; turns out they&#8217;re not all equally [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.johndcook.com/blog/2008/09/26/comparing-three-methods-of-computing-standard-deviation/comment-page-1/#comment-7238</link>
		<dc:creator>John</dc:creator>
		<pubDate>Wed, 01 Oct 2008 21:30:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=449#comment-7238</guid>
		<description>I understand what you&#039;re saying.  The way I think about is is that the y&#039;s are raw data. They happen to have been generated by this N + uniform process, but you could ignore that. Given the y&#039;s, to the precision we have them, go find their sample variance.</description>
		<content:encoded><![CDATA[<p>I understand what you&#8217;re saying.  The way I think about is is that the y&#8217;s are raw data. They happen to have been generated by this N + uniform process, but you could ignore that. Given the y&#8217;s, to the precision we have them, go find their sample variance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: EastwoodDC</title>
		<link>http://www.johndcook.com/blog/2008/09/26/comparing-three-methods-of-computing-standard-deviation/comment-page-1/#comment-7237</link>
		<dc:creator>EastwoodDC</dc:creator>
		<pubDate>Wed, 01 Oct 2008 21:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=449#comment-7237</guid>
		<description>Another thought: In your example here you are adding a large constant to demonstrate the inaccuracy of the sum of squares method. Isn&#039;t there also an issue here of the accuracy of the internal binary representation (mantissa) of the number? By adding 10^12 to a value between 0 and 1, you are increasing the mantissa by 12 digits (something else in binary), and likely causing the less significant ones to be truncated in the internal representation. This could also cause different results for the variance because the data may be inaccurately represented in the first place. (Did that make any sense? Forgive me but I&#039;ve been away from this sort of thing for a long time). 
This seems to be another reason why Welford&#039;s method is superior.</description>
		<content:encoded><![CDATA[<p>Another thought: In your example here you are adding a large constant to demonstrate the inaccuracy of the sum of squares method. Isn&#8217;t there also an issue here of the accuracy of the internal binary representation (mantissa) of the number? By adding 10^12 to a value between 0 and 1, you are increasing the mantissa by 12 digits (something else in binary), and likely causing the less significant ones to be truncated in the internal representation. This could also cause different results for the variance because the data may be inaccurately represented in the first place. (Did that make any sense? Forgive me but I&#8217;ve been away from this sort of thing for a long time).<br />
This seems to be another reason why Welford&#8217;s method is superior.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://www.johndcook.com/blog/2008/09/26/comparing-three-methods-of-computing-standard-deviation/comment-page-1/#comment-7120</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Sun, 28 Sep 2008 16:58:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=449#comment-7120</guid>
		<description>I&#039;ll second that. Nice work!</description>
		<content:encoded><![CDATA[<p>I&#8217;ll second that. Nice work!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gene</title>
		<link>http://www.johndcook.com/blog/2008/09/26/comparing-three-methods-of-computing-standard-deviation/comment-page-1/#comment-7073</link>
		<dc:creator>Gene</dc:creator>
		<pubDate>Sat, 27 Sep 2008 14:35:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=449#comment-7073</guid>
		<description>Welford&#039;s method corresponds closely to a similar calculation for Pearson&#039;s correlation coefficient that is accomplished in a single pass.
http://en.wikipedia.org/wiki/Correlation

Single pass computations that are numerically stable become important when thousands of combinations of overdetermined systems must be correlated and decomposed. The computational overhead of two pass algorithms becomes prohibitive with such problems.

Thanks for pointing out your tests on these methods.</description>
		<content:encoded><![CDATA[<p>Welford&#8217;s method corresponds closely to a similar calculation for Pearson&#8217;s correlation coefficient that is accomplished in a single pass.<br />
<a href="http://en.wikipedia.org/wiki/Correlation" rel="nofollow">http://en.wikipedia.org/wiki/Correlation</a></p>
<p>Single pass computations that are numerically stable become important when thousands of combinations of overdetermined systems must be correlated and decomposed. The computational overhead of two pass algorithms becomes prohibitive with such problems.</p>
<p>Thanks for pointing out your tests on these methods.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
