<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Warren Seen &#187; blog</title>
	<atom:link href="http://warrenseen.com/blog/category/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://warrenseen.com/blog</link>
	<description>freelance software developer</description>
	<lastBuildDate>Wed, 03 Jun 2009 23:54:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Finally&#8230;.</title>
		<link>http://warrenseen.com/blog/2008/02/18/finally/</link>
		<comments>http://warrenseen.com/blog/2008/02/18/finally/#comments</comments>
		<pubDate>Mon, 18 Feb 2008 09:10:08 +0000</pubDate>
		<dc:creator>warren</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://warrenseen.com/blog/2008/02/18/finally/</guid>
		<description><![CDATA[After having signed up for slicehost six++ months ago, I&#8217;ve finally gotten around to migrating this site from my old shared host onto my new slice, so here it is. Everything appears to have come across smoothly, although it took more than a few hours to tweak everything to my liking.
In the end, I opted [...]]]></description>
			<content:encoded><![CDATA[<p>After having signed up for <a target="_blank" title="Slicehost" href="http://slicehost.com">slicehost </a>six++ months ago, I&#8217;ve finally gotten around to migrating this site from my old shared host onto my new slice, so here it is. Everything appears to have come across smoothly, although it took more than a few hours to tweak everything to my liking.</p>
<p>In the end, I opted not to host my own email, a strategic decision based on the time and effort required on my part to set up, configure and most importantly, secure and maintain a mail server. Instead, I spent fifteen minutes of my time setting up <a target="_blank" title="Google Apps" href="http://www.google.com/a/">Google Apps</a>. Being able to keep my personalised email address, with 6Gb of storage and full access via POP3 and IMAP (although it&#8217;s a tad quirky since GMail doesn&#8217;t support folders in the traditional sense) plus access via the GMail web UI on the go, it offers the best solution for my mail needs across multiple machines.</p>
<p>It&#8217;s been a busy time of year for me surprisingly, so much so that I&#8217;ve again picked up the<a target="_blank" title="GTD" href="http://www.davidco.com/store/catalog/Getting-Things-Done-Hardcover-p-16182.php"> GTD book</a> and made another, more concerted effort to get my &#8220;things&#8221; done. It really feels like I don&#8217;t have enough hours in the day with all these different things on the go, and I&#8217;ve really noticed the relief that comes from being able to &#8220;braindump&#8221; everything that&#8217;s on my mind and start tackling it in a sensible way.</p>
<p>I&#8217;ve never been one for new year&#8217;s resolutions, but I definitely have started making plans to be more proactive this year, rather than just letting all this &#8220;stuff&#8221; control me. So here&#8217;s to new beginnings&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://warrenseen.com/blog/2008/02/18/finally/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to calculate standard deviation</title>
		<link>http://warrenseen.com/blog/2006/03/13/how-to-calculate-standard-deviation/</link>
		<comments>http://warrenseen.com/blog/2006/03/13/how-to-calculate-standard-deviation/#comments</comments>
		<pubDate>Mon, 13 Mar 2006 08:03:41 +0000</pubDate>
		<dc:creator>warren</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[statistics]]></category>

		<guid isPermaLink="false">http://warrenseen.com/blog/2006/03/13/how-to-calculate-standard-deviation/</guid>
		<description><![CDATA[When I started this blog last month, I thought &#8220;Standard Deviation&#8221; was a snappy title. Of course, I also knew about standard deviation as a statistical tool, however I didn&#8217;t expect that this overlap would cause Google search to drive 50+ visitors a month here looking for implementations of the standard deviation formula.
So as a [...]]]></description>
			<content:encoded><![CDATA[<p>When I started this blog last month, I thought &#8220;Standard Deviation&#8221; was a snappy title. Of course, I also knew about standard deviation as a statistical tool, however I didn&#8217;t expect that this overlap would cause Google search to drive 50+ visitors a month here looking for implementations of the <a href="http://en.wikipedia.org/wiki/Standard_Deviation#Definition_and_shortcut_calculation_of_standard_deviation">standard deviation formula</a>.</p>
<p>So as a &#8220;public service&#8221;, here is some code to figure standard deviation in Ruby and Java.</p>
<p>(disclaimer: no warranties as to correctness, particularly to the nth decimal place, don&#8217;t use this to run your home made nuclear reactor or air traffic control system, blah blah, etc, etc <img src='http://warrenseen.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> )</p>
<p><span id="more-29"></span>The algorithm I&#8217;ll be using is &#8220;borrowed&#8221; from wikipedia&#8217;s entry on <a href="http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance">Algorithms to calculate variance</a>. Specifically, I&#8217;ll be using a variant of algorithm II, which is sourced from Knuth, except we&#8217;ll calculate the standard deviation for the population, rather than a sample. </p>
<p>As you should probably know, standard deviation is defined as the square root of the variance. If you didn&#8217;t know this, maybe you should go read about <a href="http://en.wikipedia.org/wiki/Standard_Deviation">standard deviation</a> first.</p>
<div class="synthi_code" style="display:none;" id ="plain_synthi_4c8575fe7e57c">
<div class="synthi_header" style="font-weight:bold;"> Java <span  class="synthi_button"style="font-weight:lighter;font-size:smaller;">[<a href="#" onClick="javascript:document.getElementById('styled_synthi_4c8575fe7e57c').style.display='block';document.getElementById('plain_synthi_4c8575fe7e57c').style.display='none';return false">Show Styled Code</a>]:</span></div>
<pre style="width:100%;overflow:auto;">
/**
 * @param population an array, the population
 * @return the variance
 */
public double variance(double[] population) {
	long n = 0;
	double mean = 0;
	double s = 0.0;

	for (double x : population) {
		n++;
		double delta = x - mean;
		mean += delta / n;
		s += delta * (x - mean);
	}
	// if you want to calculate std deviation
	// of a sample change this to (s/(n-1))
	return (s / n);
}

/**
 * @param population an array, the population
 * @return the standard deviation
 */
public double standard_deviation(double[] population) {
	return Math.sqrt(variance(population));
}
</pre>
</div>
<div class="synthi_code" style="display:block;" id ="styled_synthi_4c8575fe7e57c">
<div class="synthi_header" style="font-weight:bold;"> Java <span  class="synthi_button"style="font-weight:lighter;font-size:smaller;">[<a href="#" onClick="javascript:document.getElementById('plain_synthi_4c8575fe7e57c').style.display='block';document.getElementById('styled_synthi_4c8575fe7e57c').style.display='none';return false">Show Plain Code</a>]:</span></div>
<div class="java" style="font-family: monospace;">
<ol>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/**</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> * @param population an array, the population</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> * @return the variance</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> */</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">double</span> variance<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">double</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> population<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333;">long</span> n = <span style="color: #cc66cc;">0</span>;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333;">double</span> mean = <span style="color: #cc66cc;">0</span>;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333;">double</span> s = <span style="color: #cc66cc;">0.0</span>;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #993333;">double</span> x : population<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; n++;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333;">double</span> delta = x &#8211; mean;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mean += delta / n;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; s += delta * <span style="color: #66cc66;">&#40;</span>x &#8211; mean<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// if you want to calculate std deviation</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// of a sample change this to (s/(n-1))</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #66cc66;">&#40;</span>s / n<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/**</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> * @param population an array, the population</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> * @return the standard deviation</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> */</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">double</span> standard_deviation<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">double</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> population<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> <a href="http://www.google.com/search?q=allinurl%3AMath+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Math</span></a>.<span style="color: #006600;">sqrt</span><span style="color: #66cc66;">&#40;</span>variance<span style="color: #66cc66;">&#40;</span>population<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
<p>example usage:</p>
<div class="synthi_code" style="display:none;" id ="plain_synthi_4c8575fe8546f">
<div class="synthi_header" style="font-weight:bold;"> Java <span  class="synthi_button"style="font-weight:lighter;font-size:smaller;">[<a href="#" onClick="javascript:document.getElementById('styled_synthi_4c8575fe8546f').style.display='block';document.getElementById('plain_synthi_4c8575fe8546f').style.display='none';return false">Show Styled Code</a>]:</span></div>
<pre style="width:100%;overflow:auto;">
double[] arr = { 1, 3, 24, 17, 12, 6, 14};
System.out.printf(&#034;%f&#034;, standard_deviation(arr));
  // prints 7.596992
</pre>
</div>
<div class="synthi_code" style="display:block;" id ="styled_synthi_4c8575fe8546f">
<div class="synthi_header" style="font-weight:bold;"> Java <span  class="synthi_button"style="font-weight:lighter;font-size:smaller;">[<a href="#" onClick="javascript:document.getElementById('plain_synthi_4c8575fe8546f').style.display='block';document.getElementById('styled_synthi_4c8575fe8546f').style.display='none';return false">Show Plain Code</a>]:</span></div>
<div class="java" style="font-family: monospace;">
<ol>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333;">double</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> arr = <span style="color: #66cc66;">&#123;</span> <span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">3</span>, <span style="color: #cc66cc;">24</span>, <span style="color: #cc66cc;">17</span>, <span style="color: #cc66cc;">12</span>, <span style="color: #cc66cc;">6</span>, <span style="color: #cc66cc;">14</span><span style="color: #66cc66;">&#125;</span>;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.google.com/search?q=allinurl%3ASystem+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">out</span>.<span style="color: #006600;">printf</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;%f&quot;</span>, standard_deviation<span style="color: #66cc66;">&#40;</span>arr<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #808080; font-style: italic;">// prints 7.596992 </span></div>
</li>
</ol>
</div>
</div>
<div class="synthi_code" style="display:none;" id ="plain_synthi_4c8575fe8a017">
<div class="synthi_header" style="font-weight:bold;"> Ruby <span  class="synthi_button"style="font-weight:lighter;font-size:smaller;">[<a href="#" onClick="javascript:document.getElementById('styled_synthi_4c8575fe8a017').style.display='block';document.getElementById('plain_synthi_4c8575fe8a017').style.display='none';return false">Show Styled Code</a>]:</span></div>
<pre style="width:100%;overflow:auto;">
  def variance(population)
    n = 0
    mean = 0.0
    s = 0.0
    population.each { |x|
      n = n + 1
      delta = x - mean
      mean = mean + (delta / n)
      s = s + delta * (x - mean)
    }
    # if you want to calculate std deviation
    # of a sample change this to &#034;s / (n-1)&#034;
    return s / n
  end

  # calculate the standard deviation of a population
  # accepts: an array, the population
  # returns: the standard deviation
  def standard_deviation(population)
    Math.sqrt(variance(population))
  end
</pre>
</div>
<div class="synthi_code" style="display:block;" id ="styled_synthi_4c8575fe8a017">
<div class="synthi_header" style="font-weight:bold;"> Ruby <span  class="synthi_button"style="font-weight:lighter;font-size:smaller;">[<a href="#" onClick="javascript:document.getElementById('plain_synthi_4c8575fe8a017').style.display='block';document.getElementById('styled_synthi_4c8575fe8a017').style.display='none';return false">Show Plain Code</a>]:</span></div>
<div class="ruby" style="font-family: monospace;">
<ol>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">def</span> variance<span style="color:#006600; font-weight:bold;">&#40;</span>population<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; n = <span style="color:#006666;">0</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; mean = <span style="color:#006666;">0.0</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; s = <span style="color:#006666;">0.0</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; population.<span style="color:#9900CC;">each</span> <span style="color:#006600; font-weight:bold;">&#123;</span> |x|</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; n = n + <span style="color:#006666;">1</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; delta = x &#8211; mean</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; mean = mean + <span style="color:#006600; font-weight:bold;">&#40;</span>delta / n<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; s = s + delta * <span style="color:#006600; font-weight:bold;">&#40;</span>x &#8211; mean<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#008000; font-style:italic;"># if you want to calculate std deviation</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#008000; font-style:italic;"># of a sample change this to &quot;s / (n-1)&quot;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF; font-weight:bold;">return</span> s / n</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#9966CC; font-weight:bold;">end</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#008000; font-style:italic;"># calculate the standard deviation of a population</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#008000; font-style:italic;"># accepts: an array, the population</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#008000; font-style:italic;"># returns: the standard deviation</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#9966CC; font-weight:bold;">def</span> standard_deviation<span style="color:#006600; font-weight:bold;">&#40;</span>population<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; Math.<span style="color:#9900CC;">sqrt</span><span style="color:#006600; font-weight:bold;">&#40;</span>variance<span style="color:#006600; font-weight:bold;">&#40;</span>population<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#9966CC; font-weight:bold;">end</span> </div>
</li>
</ol>
</div>
</div>
<p>example usage:</p>
<div class="synthi_code" style="display:none;" id ="plain_synthi_4c8575fe8c729">
<div class="synthi_header" style="font-weight:bold;"> Ruby <span  class="synthi_button"style="font-weight:lighter;font-size:smaller;">[<a href="#" onClick="javascript:document.getElementById('styled_synthi_4c8575fe8c729').style.display='block';document.getElementById('plain_synthi_4c8575fe8c729').style.display='none';return false">Show Styled Code</a>]:</span></div>
<pre style="width:100%;overflow:auto;">
 puts standard_deviation([1, 3, 24, 17, 12, 6, 14])
 # prints 7.59699188589047
</pre>
</div>
<div class="synthi_code" style="display:block;" id ="styled_synthi_4c8575fe8c729">
<div class="synthi_header" style="font-weight:bold;"> Ruby <span  class="synthi_button"style="font-weight:lighter;font-size:smaller;">[<a href="#" onClick="javascript:document.getElementById('plain_synthi_4c8575fe8c729').style.display='block';document.getElementById('styled_synthi_4c8575fe8c729').style.display='none';return false">Show Plain Code</a>]:</span></div>
<div class="ruby" style="font-family: monospace;">
<ol>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0066; font-weight:bold;">puts</span> standard_deviation<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">1</span>, <span style="color:#006666;">3</span>, <span style="color:#006666;">24</span>, <span style="color:#006666;">17</span>, <span style="color:#006666;">12</span>, <span style="color:#006666;">6</span>, <span style="color:#006666;">14</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;<span style="color:#008000; font-style:italic;"># prints 7.59699188589047 </span></div>
</li>
</ol>
</div>
</div>
<p>If you found this at all useful, (or have spotted a bug), please leave a comment to that effect&#8230;
</p>
<p><!--d94bd1e207fd7b2827a6a2b9f29b6da5--></p>
]]></content:encoded>
			<wfw:commentRss>http://warrenseen.com/blog/2006/03/13/how-to-calculate-standard-deviation/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>On Blogcode and missing the mark</title>
		<link>http://warrenseen.com/blog/2006/02/23/on-blogcode-and-missing-the-mark/</link>
		<comments>http://warrenseen.com/blog/2006/02/23/on-blogcode-and-missing-the-mark/#comments</comments>
		<pubDate>Thu, 23 Feb 2006 12:43:17 +0000</pubDate>
		<dc:creator>warren</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[blogcode]]></category>
		<category><![CDATA[technorati]]></category>
		<category><![CDATA[web2.0]]></category>

		<guid isPermaLink="false">http://warrenseen.com/blog/2006/02/23/on-blogcode-and-missing-the-mark/</guid>
		<description><![CDATA[Noticed Blogcode last week, signed up and had a play, but haven&#8217;t really collected my thoughts on this one. I&#8217;ve been flat out with &#8220;real&#8221; work, etc., so have neglected to write anything this last week.
Anyway, precis on BlogCode is fairly straight forward, drop the name and url (not the feed tho) of the blog [...]]]></description>
			<content:encoded><![CDATA[<p>Noticed <a title="blogcode.com" href="http://www.blogcode.com/">Blogcode</a> last week, signed up and had a play, but haven&#8217;t really collected my thoughts on this one. I&#8217;ve been flat out with &#8220;real&#8221; work, etc., so have neglected to write anything this last week.</p>
<p>Anyway, precis on BlogCode is fairly straight forward, drop the name and url (not the feed tho) of the blog you want to code into the UI, then score the blog on a range of sliding scales covering content, tone, etc.</p>
<p>Neat, but essentially useless in and of itself.</p>
<p><span id="more-22"></span>The trick however is that the sliding scale scores allow statistical analysis to determine the blogs that match according to the criteria rated. eg <a title="blogcode.com" href="http://www.blogcode.com/lcompare.php?r=860">for this blog</a>, a range of sites are returned with a 72-78% &#8220;match&#8221;.</p>
<p>The underlying idea is that over time, as more people code a blog, the ratings will become a more accurate and democratic opinion of the blog in question.</p>
<p>I noticed that they do collect the country that the blogger appears to be from, however it doesn&#8217;t seem that you can use this to narrow searches, etc.</p>
<p>The problem I can see with this system however is this: there are a LOT of categories to rank, and although it doesn&#8217;t take long with sliding scales to do this, the novelty of assessing a blog over 15+ criteria is going to get old pretty fast.</p>
<p>Additionally, there&#8217;s no real incentive to come back to the site again and again. This feature would be more useful as an element of existing blog search (eg Technorati) or built into an aggregator (eg Rojo) as a value add. Imagine you add a blog to your feeds, and get suggestions for similar blogs, with sample content so you can decide whether you want to read them too. Not to mention being able to sort blogs according to their BlogCode &#8220;match&#8221; level.<br />
Alternatively, it could serve as the basis of a meme tracker in which you can influence the results you see based on blogs you&#8217;ve coded.</p>
<p>In short, an interesting statistical experiment, but the model (which has been carried over from storycode.com), doesn&#8217;t seem to be that tight a fit with the blogging state of the art. I mean, no RSS feeds, what were they thinking? <img src='http://warrenseen.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' />
</p>
<p><!--5115bbbcbb05cd58c683d72e2a8c44ee-->
</p>
<p><!--dbd05ebf2b3b65d97ccd0bfa1485e816-->
</p>
<p><!--d02531ea0abf12dab00c175cbf494a1e-->
</p>
<p><!--dbd05ebf2b3b65d97ccd0bfa1485e816-->
</p>
<p><!--5115bbbcbb05cd58c683d72e2a8c44ee--></p>
]]></content:encoded>
			<wfw:commentRss>http://warrenseen.com/blog/2006/02/23/on-blogcode-and-missing-the-mark/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Link love for authority-dissenters</title>
		<link>http://warrenseen.com/blog/2006/02/15/link-love-for-authority-dissenters/</link>
		<comments>http://warrenseen.com/blog/2006/02/15/link-love-for-authority-dissenters/#comments</comments>
		<pubDate>Tue, 14 Feb 2006 13:26:51 +0000</pubDate>
		<dc:creator>warren</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[technorati]]></category>
		<category><![CDATA[web2.0]]></category>

		<guid isPermaLink="false">http://warrenseen.com/blog/2006/02/15/link-love-for-authority-dissenters/</guid>
		<description><![CDATA[Quick follow up to the previous post  &#8211; I wanted to get my thoughts out before I was influenced by anyone else&#8217;s thoughts  

Steve Rubel takes the classic high school debate approach of defining the word and building an argument from there. Conclusion &#8211; yes, it&#8217;s not authority, it&#8217;s popularity, people.
Data mining agrees [...]]]></description>
			<content:encoded><![CDATA[<p>Quick follow up to the previous post  &#8211; I wanted to get my thoughts out before I was influenced by anyone else&#8217;s thoughts <img src='http://warrenseen.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<ul>
<li><a title="What is authority?" href="http://www.micropersuasion.com/2006/02/what_is_authori.html">Steve Rubel</a> takes the classic high school debate approach of defining the word and building an argument from there. Conclusion &#8211; yes, it&#8217;s not authority, it&#8217;s popularity, people.</li>
<li><a title="Technorati, Authority, and Getting Names Right" href="http://datamining.typepad.com/data_mining/2006/02/technorati_auth.html">Data mining</a> agrees with Steve, <em>&#8220;name things for what they are, not for what they are used for&#8221;. </em>That is quite obviously right out of Usability 101.</li>
<li>Jack Krupansky leaves an excellent comment on <a href="http://scobleizer.wordpress.com/2006/02/13/technorati-adds-authority-weighting/#comment-14405">Scobelizer</a>: &#8220;<em>to Technorati, â€œauthorityâ€ is simply popularity. That makes *no* sense.</em>&#8220;</li>
</ul>
<p>Consensus seems to be that tracking popularity but calling it &#8220;authority&#8221; muddies the waters&#8230; There is nothing wrong with the feature itself, it&#8217;s just the name that&#8217;s misleading.</p>
]]></content:encoded>
			<wfw:commentRss>http://warrenseen.com/blog/2006/02/15/link-love-for-authority-dissenters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Whose authority?</title>
		<link>http://warrenseen.com/blog/2006/02/15/whose-authority/</link>
		<comments>http://warrenseen.com/blog/2006/02/15/whose-authority/#comments</comments>
		<pubDate>Tue, 14 Feb 2006 13:12:15 +0000</pubDate>
		<dc:creator>warren</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[technorati]]></category>
		<category><![CDATA[web2.0]]></category>

		<guid isPermaLink="false">http://warrenseen.com/blog/2006/02/15/whose-authority/</guid>
		<description><![CDATA[It&#8217;s been a busy few days for me, but I&#8217;m back in time to notice this:
Technorati has just added &#8216;authority&#8217; filtering to their search (see Scoble, TechCrunch, Dave Sifry, et cetera).
My issue with this is simple &#8211; the number of inbound links does NOT necessarily qualify the source as being an &#8220;authority&#8221; on anything. This [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a busy few days for me, but I&#8217;m back in time to notice this:</p>
<p>Technorati has just added &#8216;authority&#8217; filtering to their search (see <a title="Scobelizer" href="http://scobleizer.wordpress.com/2006/02/13/technorati-adds-authority-weighting/">Scoble</a>, <a title="TechCrunch" href="http://www.techcrunch.com/2006/02/13/technorati-now-has-authority/">TechCrunch</a>, <a title="Dave Sifry" href="http://www.sifry.com/alerts/archives/000420.html">Dave Sifry</a>, et cetera).</p>
<p>My issue with this is simple &#8211; the number of inbound links does NOT necessarily qualify the source as being an &#8220;authority&#8221; on anything. This is nothing more than a popularity contest.</p>
<p>Ben Barren hits the nail on the head <a title="Bali 9 Death. Inbound Aussie/UK LinkLove Inequity" href="http://feeds.feedburner.com/blogspot/Fumd?m=3118">here</a>.</p>
<blockquote><p><em>So its very hard to determine relative popularity, on a regional basis</em></p>
</blockquote>
<p>Before pointing to this <a href="http://newyorkmetro.com/news/media/15967/index1.html">New York Metro</a> quote:</p>
<blockquote><p><em>In the blogosphere, the biggest audiencesâ€”and the advertising revenue they bringâ€”go to a small, elite few. Most bloggers toil in total obscurity.</em></p>
</blockquote>
<p>Popularity, that&#8217;s all it is. And that&#8217;s sad, because some of the people who deserve to be held as authorities in their field are lost amongst the noise, while the &#8220;blogosphere&#8221; (gack, I HATE that &#8220;word&#8221;) becomes more and more like a conversation between a panel of &#8220;A-list&#8221; bloggers with everyone else on the sideline. Then you&#8217;ve flipped from being &#8220;citizen&#8221; media to just media.</p>
<p>Disparate thoughts to follow&#8230;</p>
<p><span id="more-19"></span></p>
<ul>
<li>Blog search the way Technorati does it is fundamentally broken. Ranking based purely on &#8220;link love&#8221; is primitive at best. Calling it &#8220;Authority&#8221; filtering is inaccurate. That&#8217;s a big call to make, but I&#8217;m going to be dumb and stand by that one&#8230;</li>
<li>It&#8217;s broken because it causes new blogs to be put in a catch 22 &#8211; if you want to get noticed, you have to get links. If you want to get links you need to get noticed in the first place.</li>
<li>Even if you can get some traffic driven to your blog from eg Technorati, how do you make it sticky? The majority of my page views reported by awstats are in the 30 second region. The next highest is the 30-60 second. It tails off quickly after that.</li>
<li>Have you ever wondered about the great bloggers you haven&#8217;t read? How will you ever find them if no one links to them?</li>
<li>Don&#8217;t you wish you could find blogs similar to the ones you already read? Or ones that provide a counter-point? ie &#8220;Show more like this&#8230;&#8221;</li>
<li>I&#8217;m not talking about just keyword matching here, it&#8217;s a far more sophisticated problem than it appears. Memetrackers DON&#8217;T do this&#8230; bet you wish they could.</li>
<li>What if your aggregator sorted items from your feeds by relevance? Think a mutant cross between <a title="Reddit" href="http://reddit.com/">reddit</a> and <a title="amazon.com" href="http://amazon.com">amazon.com</a>&#8217;s &#8220;for you&#8221; for your feeds. Key word filtered &#8220;smart&#8221; folders are dumb by comparison.</li>
<li>What if technorati did the same? Why should I have to manually create my watch list, when technorati knows what I search for regularly? Hell, they know what I tag, that&#8217;s a BFC (big effing clue) right there&#8230;</li>
</ul>
<p>time for the (long) tail to wag the dog. <img src='http://warrenseen.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />
</p>
<p><!--c9a0aabed165a7cbdf3760929705547c--></p>
]]></content:encoded>
			<wfw:commentRss>http://warrenseen.com/blog/2006/02/15/whose-authority/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>del.icio.us bookmarks added to feed</title>
		<link>http://warrenseen.com/blog/2006/02/08/delicious-bookmarks-added-to-feed/</link>
		<comments>http://warrenseen.com/blog/2006/02/08/delicious-bookmarks-added-to-feed/#comments</comments>
		<pubDate>Wed, 08 Feb 2006 11:43:20 +0000</pubDate>
		<dc:creator>warren</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[web2.0]]></category>

		<guid isPermaLink="false">http://warrenseen.com/blog/2006/02/08/delicious-bookmarks-added-to-feed/</guid>
		<description><![CDATA[I&#8217;ve just added my del.icio.us bookmarks to my Feedburner feed, and I&#8217;ll be adding a sidebar del.icio.us component in the next day or so, so you can keep up with what I&#8217;m keeping up with online 


]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just added <a target="_blank" title="my del.icio.us" href="http://del.icio.us/warren_s">my del.icio.us</a> bookmarks to my Feedburner feed, and I&#8217;ll be adding a sidebar del.icio.us component in the next day or so, so you can keep up with what I&#8217;m keeping up with online <img src='http://warrenseen.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />
</p>
<p><!--5d096b5fc9306a48d6fbd1521f9ddc6b--></p>
]]></content:encoded>
			<wfw:commentRss>http://warrenseen.com/blog/2006/02/08/delicious-bookmarks-added-to-feed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dear Jeremy Zawodny &#8230;</title>
		<link>http://warrenseen.com/blog/2006/02/07/dear-jeremy-zawodny/</link>
		<comments>http://warrenseen.com/blog/2006/02/07/dear-jeremy-zawodny/#comments</comments>
		<pubDate>Mon, 06 Feb 2006 14:19:54 +0000</pubDate>
		<dc:creator>warren</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://warrenseen.com/blog/2006/02/07/dear-jeremy-zawodny/</guid>
		<description><![CDATA[It sounds like you could use one of these right about now&#8230; 


]]></description>
			<content:encoded><![CDATA[<p>It <a target="_blank" href="http://jeremy.zawodny.com/blog/archives/006238.html">sounds like</a> you could use one of <a target="_blank" href="http://www.coudal.com/shhh.php">these</a> right about now&#8230; <img src='http://warrenseen.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />
</p>
<p><!--ba43c691b0ce23a300574cb9f02e2d97--></p>
]]></content:encoded>
			<wfw:commentRss>http://warrenseen.com/blog/2006/02/07/dear-jeremy-zawodny/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Just unpacking a few things&#8230;</title>
		<link>http://warrenseen.com/blog/2006/02/03/just-unpacking-a-few-things/</link>
		<comments>http://warrenseen.com/blog/2006/02/03/just-unpacking-a-few-things/#comments</comments>
		<pubDate>Thu, 02 Feb 2006 14:05:16 +0000</pubDate>
		<dc:creator>warren</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://warrenseen.com/blog/2006/02/03/just-unpacking-a-few-things/</guid>
		<description><![CDATA[Sit tight, relax and take it easy while I finish moving into this wordpress install and getting it tweaked to my liking&#8230;


]]></description>
			<content:encoded><![CDATA[<p>Sit tight, relax and take it easy while I finish moving into this wordpress install and getting it tweaked to my liking&#8230;
</p>
<p><!--3c289fa8c8fc43c8feb11d8d40c50d51--></p>
]]></content:encoded>
			<wfw:commentRss>http://warrenseen.com/blog/2006/02/03/just-unpacking-a-few-things/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
