<div class="gmail_quote">On Mon, Nov 23, 2009 at 8:33 AM, Conoscenza Silente <span dir="ltr">&lt;<a href="mailto:abruzzoforteegentile@gmail.com">abruzzoforteegentile@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

I would like to calculate the covariance of 2 variables.<br></blockquote><div>�</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I did not really understand how to setup the accumulators �for 2 or<br>
more variables.<br>
<br>
What role plays the covariate here and where to pick up or feed the<br>
values for the second variable?<br></blockquote><div><br></div><div>I&#39;m not sure if it accomplishes exactly what you want, but the attached sample may be useful. �It is a little program to compute some stats from an input file. �It includes covariance details.</div>

<div><br></div><div>It uses autoconf and assumes you&#39;re on a un*x-ish system or Cygwin, so you&#39;ll want to use ./bootstrap &amp;&amp; ./configure &amp;&amp; make. �The file you&#39;re after is src/stat.cc.</div><div>

<br></div><div>- Rhys</div><div><br></div><div><br></div></div>