<?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: How to calculate correlation accurately</title>
	<atom:link href="http://www.johndcook.com/blog/2008/11/05/how-to-calculate-pearson-correlation-accurately/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.johndcook.com/blog/2008/11/05/how-to-calculate-pearson-correlation-accurately/</link>
	<description>The blog of John D. Cook</description>
	<lastBuildDate>Sat, 11 Feb 2012 22:42:11 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: browser</title>
		<link>http://www.johndcook.com/blog/2008/11/05/how-to-calculate-pearson-correlation-accurately/comment-page-1/#comment-13472</link>
		<dc:creator>browser</dc:creator>
		<pubDate>Tue, 17 Feb 2009 17:06:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=795#comment-13472</guid>
		<description>Great set of articles here!

I came across them looking for some justification for the &quot;numerically stable&quot; pseudocode given in the Wikipedia article on correlation.

However, the pseudocode is currently marked &quot;Citation needed&quot;. Anyone knows where that code comes from?</description>
		<content:encoded><![CDATA[<p>Great set of articles here!</p>
<p>I came across them looking for some justification for the &#8220;numerically stable&#8221; pseudocode given in the Wikipedia article on correlation.</p>
<p>However, the pseudocode is currently marked &#8220;Citation needed&#8221;. Anyone knows where that code comes from?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: flashman</title>
		<link>http://www.johndcook.com/blog/2008/11/05/how-to-calculate-pearson-correlation-accurately/comment-page-1/#comment-10876</link>
		<dc:creator>flashman</dc:creator>
		<pubDate>Sat, 13 Dec 2008 04:46:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=795#comment-10876</guid>
		<description>Thank Mr.John for quick reply.
Now I have issues with the comparison macro block in two images so your information is very useful with me.
Thanks again &amp; best regards.</description>
		<content:encoded><![CDATA[<p>Thank Mr.John for quick reply.<br />
Now I have issues with the comparison macro block in two images so your information is very useful with me.<br />
Thanks again &amp; best regards.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.johndcook.com/blog/2008/11/05/how-to-calculate-pearson-correlation-accurately/comment-page-1/#comment-10874</link>
		<dc:creator>John</dc:creator>
		<pubDate>Sat, 13 Dec 2008 03:58:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=795#comment-10874</guid>
		<description>If sx is zero, all your x&#039;s are the same. If sy is zero, all your y&#039;s are the same. In either case, you have a degenerate situation. I suppose you could say the correlation is zero since a constant is independent of any random variable, but correlation coefficient implies there&#039;s a bivariate normal model in the background and that assumption is violated if one of the components is constant.</description>
		<content:encoded><![CDATA[<p>If sx is zero, all your x&#8217;s are the same. If sy is zero, all your y&#8217;s are the same. In either case, you have a degenerate situation. I suppose you could say the correlation is zero since a constant is independent of any random variable, but correlation coefficient implies there&#8217;s a bivariate normal model in the background and that assumption is violated if one of the components is constant.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: flashman</title>
		<link>http://www.johndcook.com/blog/2008/11/05/how-to-calculate-pearson-correlation-accurately/comment-page-1/#comment-10873</link>
		<dc:creator>flashman</dc:creator>
		<pubDate>Sat, 13 Dec 2008 03:53:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=795#comment-10873</guid>
		<description>Dear Mr.John
Thank for your entry.

What will happen if (sx==0) or (sy==0) in the first expression.
Example I want to calculate the correlation of two arrays, and with the first array, all elements are equal. Could I use the first expression.

Thanks!</description>
		<content:encoded><![CDATA[<p>Dear Mr.John<br />
Thank for your entry.</p>
<p>What will happen if (sx==0) or (sy==0) in the first expression.<br />
Example I want to calculate the correlation of two arrays, and with the first array, all elements are equal. Could I use the first expression.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ravi</title>
		<link>http://www.johndcook.com/blog/2008/11/05/how-to-calculate-pearson-correlation-accurately/comment-page-1/#comment-10325</link>
		<dc:creator>Ravi</dc:creator>
		<pubDate>Fri, 28 Nov 2008 13:46:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=795#comment-10325</guid>
		<description>Dear Karl and John,

I could not completely understand the problem in computation of averages. Can you please guide to understand these kinds of problems that arise in various computaional algorithm. 

Regards,

Gautam</description>
		<content:encoded><![CDATA[<p>Dear Karl and John,</p>
<p>I could not completely understand the problem in computation of averages. Can you please guide to understand these kinds of problems that arise in various computaional algorithm. </p>
<p>Regards,</p>
<p>Gautam</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.johndcook.com/blog/2008/11/05/how-to-calculate-pearson-correlation-accurately/comment-page-1/#comment-9105</link>
		<dc:creator>John</dc:creator>
		<pubDate>Fri, 07 Nov 2008 00:54:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=795#comment-9105</guid>
		<description>One of my favorite books on numerical computing is &lt;a href=&quot;http://www.amazon.com/gp/product/0883854503?ie=UTF8&amp;tag=theende-20&amp;linkCode=xm2&amp;camp=1789&amp;creativeASIN=0883854503&quot; rel=&quot;nofollow&quot;&gt;Numerical methods that work&lt;/a&gt; by Forman S. Acton. It&#039;s not specifically about statistics, and it&#039;s a little dated, but it&#039;s great on the fundamentals.</description>
		<content:encoded><![CDATA[<p>One of my favorite books on numerical computing is <a href="http://www.amazon.com/gp/product/0883854503?ie=UTF8&#038;tag=theende-20&#038;linkCode=xm2&#038;camp=1789&#038;creativeASIN=0883854503" rel="nofollow">Numerical methods that work</a> by Forman S. Acton. It&#8217;s not specifically about statistics, and it&#8217;s a little dated, but it&#8217;s great on the fundamentals.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karl Ove Hufthammer</title>
		<link>http://www.johndcook.com/blog/2008/11/05/how-to-calculate-pearson-correlation-accurately/comment-page-1/#comment-9095</link>
		<dc:creator>Karl Ove Hufthammer</dc:creator>
		<pubDate>Thu, 06 Nov 2008 18:37:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=795#comment-9095</guid>
		<description>Thanks for posting this. I enjoy reading about numerical issues in statistical computing. It’s surprising to many that calculating statistics from such simple formulas could be problematic.

Even something as simple as calculating the sum or average of a set of numbers can be done in numerical ‘not so smart’ ways. For instance, sorting the values before adding them (and then adding the smaller numbers before the larger ones) should give more accurate results.

I tried looking at source code for R, to find out how it calculated averages, and if it used this method. If I remember correctly (and read the code correctly), it first adds all the numbers and divides the sum by &lt;i&gt;n&lt;/i&gt; to get a ‘naïve’ average, and then adds the average difference between the numbers and this average (which mathematically of course should be zero) to get a final value. Seems very clever.

Do you know of any (easy to read, suitable for bedtime reading) books (or papers) on numerical calculations specifically for statistics?</description>
		<content:encoded><![CDATA[<p>Thanks for posting this. I enjoy reading about numerical issues in statistical computing. It’s surprising to many that calculating statistics from such simple formulas could be problematic.</p>
<p>Even something as simple as calculating the sum or average of a set of numbers can be done in numerical ‘not so smart’ ways. For instance, sorting the values before adding them (and then adding the smaller numbers before the larger ones) should give more accurate results.</p>
<p>I tried looking at source code for R, to find out how it calculated averages, and if it used this method. If I remember correctly (and read the code correctly), it first adds all the numbers and divides the sum by <i>n</i> to get a ‘naïve’ average, and then adds the average difference between the numbers and this average (which mathematically of course should be zero) to get a final value. Seems very clever.</p>
<p>Do you know of any (easy to read, suitable for bedtime reading) books (or papers) on numerical calculations specifically for statistics?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.385 seconds -->

