<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Some Math Things</title>
	<atom:link href="http://perlman.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://perlman.wordpress.com</link>
	<description>Numerical Methods, time series analysis of web traffic, statistical exploration of apache log files</description>
	<lastBuildDate>Sun, 19 Apr 2009 20:41:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='perlman.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Some Math Things</title>
		<link>http://perlman.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://perlman.wordpress.com/osd.xml" title="Some Math Things" />
	<atom:link rel='hub' href='http://perlman.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Lagrange Interpolating Polynomial: Basic Example</title>
		<link>http://perlman.wordpress.com/2009/04/19/lagrange-interpolating-polynomial-basic-example/</link>
		<comments>http://perlman.wordpress.com/2009/04/19/lagrange-interpolating-polynomial-basic-example/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 20:41:55 +0000</pubDate>
		<dc:creator>perlman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://perlman.wordpress.com/?p=190</guid>
		<description><![CDATA[The Lagrange polynomial of degree m is defined as: The interpolation happens like At the sampled points, the accuracy will be perfect. But at points inbetween, the accuracy of the constructed polynomial may suffer, especially for higher degree interpolations. The runge phenomena is a manifesation of this innaccuracy, when we interpolate functions that grow with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlman.wordpress.com&amp;blog=3610759&amp;post=190&amp;subd=perlman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The Lagrange polynomial of degree m is defined as:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cell_j%28x%29+%3A%3D+%5Cprod%5Climits_%7Bi%3D0%2C%5C%2C+i%5Cneq+j%7D%5E%7Bm%7D+%5Cfrac%7Bx-x_i%7D%7Bx_j-x_i%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;ell_j(x) := &#92;prod&#92;limits_{i=0,&#92;, i&#92;neq j}^{m} &#92;frac{x-x_i}{x_j-x_i} ' title='&#92;ell_j(x) := &#92;prod&#92;limits_{i=0,&#92;, i&#92;neq j}^{m} &#92;frac{x-x_i}{x_j-x_i} ' class='latex' /></p>
<p>The interpolation happens like</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Csum%5Climits_%7Bj+%3D+1%7D%5E%7BN%7D+y_j%2A%5Cell_j%28x_k%29+%3D+y_k&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;sum&#92;limits_{j = 1}^{N} y_j*&#92;ell_j(x_k) = y_k' title='&#92;sum&#92;limits_{j = 1}^{N} y_j*&#92;ell_j(x_k) = y_k' class='latex' /></p>
<p>At the sampled points, <img src='http://s0.wp.com/latex.php?latex=x_j&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='x_j' title='x_j' class='latex' /> the accuracy will be perfect. But at points inbetween, the accuracy of the constructed polynomial may suffer, especially for higher degree interpolations.</p>
<p>The runge phenomena is a manifesation of this innaccuracy, when we interpolate functions that grow with sucessive differentiation, we open ourselves up to this error, because the high order terms get large. This error appears at the boundrys, and it has been shown that using nodes with an asymptotic density to the boundrys, such as chebyshev nodes, will effectively solve this problem.</p>
<p>Chebyshev nodes <img src='http://s0.wp.com/latex.php?latex=x_k&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='x_k' title='x_k' class='latex' /> can be constructed like:</p>
<p><img src='http://s0.wp.com/latex.php?latex=x_k+%3D+cos%28%5Cpi%2A%5Cfrac%7Bk%7D%7BN%7D%29&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='x_k = cos(&#92;pi*&#92;frac{k}{N})' title='x_k = cos(&#92;pi*&#92;frac{k}{N})' class='latex' /></p>
<p>for <img src='http://s0.wp.com/latex.php?latex=k+%3D+0%2C1%2C2....N&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='k = 0,1,2....N' title='k = 0,1,2....N' class='latex' />, the result is on an interval of <img src='http://s0.wp.com/latex.php?latex=%5Cleft%5B-1%2C1%5Cright%5D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;left[-1,1&#92;right]' title='&#92;left[-1,1&#92;right]' class='latex' /></p>
<p>Here is a simple matlab function doing a lagrange interpolation for <img src='http://s0.wp.com/latex.php?latex=y&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='y' title='y' class='latex' /> on <img src='http://s0.wp.com/latex.php?latex=x&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='x' title='x' class='latex' /> to <img src='http://s0.wp.com/latex.php?latex=x2&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='x2' title='x2' class='latex' /></p>
<pre>
function y2 = lagrange(x,y,x2)
for m=1:numel(x2)
	y2(m) = 0;
	for j=1:numel(x)
		l = 1;
		for k=1:numel(x)
			if k ~= j
				l = l*(x2(m)-x(k))/(x(j)-x(k));
			end

		end

	y2(m) = y2(m) + l*y(j);
	end
end
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/perlman.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/perlman.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/perlman.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/perlman.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/perlman.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/perlman.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/perlman.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/perlman.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/perlman.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/perlman.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/perlman.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/perlman.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/perlman.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/perlman.wordpress.com/190/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlman.wordpress.com&amp;blog=3610759&amp;post=190&amp;subd=perlman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://perlman.wordpress.com/2009/04/19/lagrange-interpolating-polynomial-basic-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4e13f38185ffdfe9edb3b8992956f834?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">perlman</media:title>
		</media:content>
	</item>
		<item>
		<title>Crash Course in Perl for Data Processing: Chapter 2</title>
		<link>http://perlman.wordpress.com/2009/02/01/crash-course-in-perl-for-data-processing-chapter-2/</link>
		<comments>http://perlman.wordpress.com/2009/02/01/crash-course-in-perl-for-data-processing-chapter-2/#comments</comments>
		<pubDate>Sun, 01 Feb 2009 19:37:14 +0000</pubDate>
		<dc:creator>perlman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://perlman.wordpress.com/?p=18</guid>
		<description><![CDATA[Ok, now that you know some of the basics i can start to talk about useful things. This chapter is going to cover regular expressions. Regular expressions are the most useful thing in perl, very powerful for data processing, theyre really the whole reason why im even writing this guide. First type of regular expression: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlman.wordpress.com&amp;blog=3610759&amp;post=18&amp;subd=perlman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ok, now that you know some of the basics i can start to talk about useful things. This chapter is going to cover regular expressions.</p>
<p>Regular expressions are the most useful thing in perl, very powerful for data processing, theyre really the whole reason why im even writing this guide.</p>
<p>First type of regular expression: Matching</p>
<p>Regular expressions are enclosed in / signs.</p>
<p>$var =~ m/expr/; will return true if $var matches expr. Now, for some talk on how to craft &#8220;expr&#8221;</p>
<p>Character matches:</p>
<p>* &#8211; matches any character.</p>
<p>\w &#8211; matches whitespace character</p>
<p>\d &#8211; matches digits</p>
<p>Quantifiers:</p>
<p>-These specify how many times a character is going to be matched if you dont use one it will match it exactly 1 time.</p>
<p>. &#8211; any ammount of times</p>
<p>[n,m] &#8211; between n and m times</p>
<p>? &#8211; 0 or 1 times</p>
<p>Example:</p>
<p>$var =~ m/.*\d\d.*/;</p>
<p>will return true when it finds two digits somewhere in a string.</p>
<p>Useing matching to pull out data:</p>
<p>If you want to pull out characters according to a regular expression you encase the specified form in ( ) signs and you use the my() command.</p>
<p>my($age) = $ages =~ m/His age is: ([1,3]\d)/;</p>
<p>This line will fill the variable $age with the digits left in that form. We specified them as a digit between 1 and 3 characters.</p>
<p>Subsitutions:</p>
<p>if you want to subsitute all the characters of a specified type in some variable with another character you use subsitutions:</p>
<p>$string =~ s/a/A;</p>
<p>This changes all the lowercase a&#8217;s to captial A&#8217;s</p>
<p>Translations:</p>
<p>Translations are like substitutions only they work for a string, not just a single character. It allows you to substitute one string for another. Translations will only happen once per variable. so if there are multiple things in the same variable that need to be translated you are going to need to break that string up accordingly.</p>
<p>$string =~ tr/mike/Bob/;</p>
<p>if there is one mike in $string it will translate it to Bob. If there was more than one mike and you want them all translated your going to have to break the string up or hit it multiple times with the translation.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/perlman.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/perlman.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/perlman.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/perlman.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/perlman.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/perlman.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/perlman.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/perlman.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/perlman.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/perlman.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/perlman.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/perlman.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/perlman.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/perlman.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlman.wordpress.com&amp;blog=3610759&amp;post=18&amp;subd=perlman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://perlman.wordpress.com/2009/02/01/crash-course-in-perl-for-data-processing-chapter-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4e13f38185ffdfe9edb3b8992956f834?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">perlman</media:title>
		</media:content>
	</item>
		<item>
		<title>Calculating Phi</title>
		<link>http://perlman.wordpress.com/2008/10/13/calculating-phi/</link>
		<comments>http://perlman.wordpress.com/2008/10/13/calculating-phi/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 19:47:48 +0000</pubDate>
		<dc:creator>perlman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://perlman.wordpress.com/?p=139</guid>
		<description><![CDATA[Since we are on the topic of fixed point iterative methods for calculation of irrational numbers I have decided to talk about how to calculate one of my favorite irrational numbers: Also known as the golden ratio, is often the subject of psudoscientific conjecture and mysticism. This ratio has been used in greek architecture, under [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlman.wordpress.com&amp;blog=3610759&amp;post=139&amp;subd=perlman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Since we are on the topic of fixed point iterative methods for calculation of irrational numbers I have decided to talk about how to calculate one of my favorite irrational numbers: <img src='http://s0.wp.com/latex.php?latex=%5CPhi&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;Phi' title='&#92;Phi' class='latex' /></p>
<p>Also known as the golden ratio, <img src='http://s0.wp.com/latex.php?latex=%5CPhi&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;Phi' title='&#92;Phi' class='latex' /> is often the subject of psudoscientific conjecture and mysticism. This ratio has been used in greek architecture, under the belief that it produces aesthetically pleasing geometry. It would be used to construct golden rectangles, and as a ratio between various lengths in architecture.</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5CPhi&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;Phi' title='&#92;Phi' class='latex' /> is the ratio you get when you divide a line segment in two such that the ratio of the larger half to the smaller half is the same as the ratio of the whole line to the larger half. This is a pretty natural way to define it.</p>
<p>It also pops up in the Fibonacci sequence.</p>
<p>The fibonacci sequence is recursively defined as : <img src='http://s0.wp.com/latex.php?latex=x_0+%3D+1%3B+x_1+%3D+1%3B+x_%7Bn%2B1%7D+%3D+x_%7Bn%7D+%2B+x_%7Bn-1%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='x_0 = 1; x_1 = 1; x_{n+1} = x_{n} + x_{n-1}' title='x_0 = 1; x_1 = 1; x_{n+1} = x_{n} + x_{n-1}' class='latex' /> Numbers that appear in this sequence are called the fibonacci numbers. Let <img src='http://s0.wp.com/latex.php?latex=F%28n%29&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='F(n)' title='F(n)' class='latex' /> denote the <img src='http://s0.wp.com/latex.php?latex=n%5E%7Bth%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='n^{th}' title='n^{th}' class='latex' /> fibonacci number.</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Clim%5Climits_%7Bn+%5Cto+%5Cinfty%7D%5Cfrac%7BF%28n%2B1%29%7D%7BF%28n%29%7D+%3D+%5CPhi&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;lim&#92;limits_{n &#92;to &#92;infty}&#92;frac{F(n+1)}{F(n)} = &#92;Phi' title='&#92;lim&#92;limits_{n &#92;to &#92;infty}&#92;frac{F(n+1)}{F(n)} = &#92;Phi' class='latex' /></p>
<p>here is some code that will caulate it with matlab:</p>
<pre>
clear;
x(1) = 1;
x(2) = 1;
for j=3:1000
        x(j) = x(j-1) + x(j-2);
        phi = x(j)/x(j-1);
end
format long;
phi
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/perlman.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/perlman.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/perlman.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/perlman.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/perlman.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/perlman.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/perlman.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/perlman.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/perlman.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/perlman.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/perlman.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/perlman.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/perlman.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/perlman.wordpress.com/139/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlman.wordpress.com&amp;blog=3610759&amp;post=139&amp;subd=perlman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://perlman.wordpress.com/2008/10/13/calculating-phi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4e13f38185ffdfe9edb3b8992956f834?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">perlman</media:title>
		</media:content>
	</item>
		<item>
		<title>Bojeklification for optimization and exploration of fixed point iterative methods</title>
		<link>http://perlman.wordpress.com/2008/10/07/bojeklification-for-optimization-and-exploration-of-fixed-point-iterative-methods/</link>
		<comments>http://perlman.wordpress.com/2008/10/07/bojeklification-for-optimization-and-exploration-of-fixed-point-iterative-methods/#comments</comments>
		<pubDate>Tue, 07 Oct 2008 00:55:21 +0000</pubDate>
		<dc:creator>perlman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://perlman.wordpress.com/?p=118</guid>
		<description><![CDATA[Bojeklification and it&#8217;s Implementation Bojeklification is a numerical method for analysis of the convergence of iterative systems. This makes it useful for optimization of fixed point iterative methods. In order to use bojeklification one must know the attractor of the system, or in some fashion, be able to decide when a system has converged. For [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlman.wordpress.com&amp;blog=3610759&amp;post=118&amp;subd=perlman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="text-decoration:underline;"><strong>Bojeklification and it&#8217;s Implementation</strong></span></p>
<p>Bojeklification is a numerical method for analysis of the convergence of iterative systems. This makes it useful for optimization of fixed point iterative methods. In order to use bojeklification one must know the attractor of the system, or in some fashion, be able to decide when a system has converged. For a fixed point this is very easy:</p>
<p>For some sequence <img src='http://s0.wp.com/latex.php?latex=x_%7Bn%2B1%7D+%3D+f%28x_%7Bn%7D%29&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='x_{n+1} = f(x_{n})' title='x_{n+1} = f(x_{n})' class='latex' /> that converges to a fixed point we may decide that the sequence has converged when <img src='http://s0.wp.com/latex.php?latex=%7Cx_%7Bn%7D+-+x_%7Bn%2B1%7D%7C+%3C+%5Cepsilon&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='|x_{n} - x_{n+1}| &lt; &#92;epsilon' title='|x_{n} - x_{n+1}| &lt; &#92;epsilon' class='latex' /> where <img src='http://s0.wp.com/latex.php?latex=%5Cepsilon&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;epsilon' title='&#92;epsilon' class='latex' /> machine zero.</p>
<p>Bojeklification is when we keep track of <img src='http://s0.wp.com/latex.php?latex=n+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='n ' title='n ' class='latex' /> such that the above condition is satisfied. We always have some constant <img src='http://s0.wp.com/latex.php?latex=c&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='c' title='c' class='latex' /> in <img src='http://s0.wp.com/latex.php?latex=f%28x_n%29&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='f(x_n)' title='f(x_n)' class='latex' /> which we wish to vary, aswell as <img src='http://s0.wp.com/latex.php?latex=x_0+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='x_0 ' title='x_0 ' class='latex' />. We plot <img src='http://s0.wp.com/latex.php?latex=n+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='n ' title='n ' class='latex' /> as a function of <img src='http://s0.wp.com/latex.php?latex=c+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='c ' title='c ' class='latex' /> and <img src='http://s0.wp.com/latex.php?latex=x_0&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='x_0' title='x_0' class='latex' />. This gives us a simple way to see how initial conditions and some constant affects the rate of convergence.</p>
<p><span style="text-decoration:underline;"><strong>The Fixed Point method for calculating <img src='http://s0.wp.com/latex.php?latex=%5Csqrt%7B2%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;sqrt{2}' title='&#92;sqrt{2}' class='latex' /></strong></span></p>
<p>the following converges to <img src='http://s0.wp.com/latex.php?latex=%5Csqrt%7B2%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;sqrt{2}' title='&#92;sqrt{2}' class='latex' /> when <img src='http://s0.wp.com/latex.php?latex=c&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='c' title='c' class='latex' /> is less than about -1.5.</p>
<p><img src='http://s0.wp.com/latex.php?latex=x_%7Bn%2B1%7D+%3D+%5Cfrac%7B1%7D%7Bc%7D%2A%28x_%7Bn%7D%5E2+-+2%29+%2B+x_%7Bn%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='x_{n+1} = &#92;frac{1}{c}*(x_{n}^2 - 2) + x_{n} ' title='x_{n+1} = &#92;frac{1}{c}*(x_{n}^2 - 2) + x_{n} ' class='latex' /></p>
<p>It is a known result, by Aimee Ross, that the optimal value is <img src='http://s0.wp.com/latex.php?latex=c+%3D+-%5Csqrt%7B8%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='c = -&#92;sqrt{8}' title='c = -&#92;sqrt{8}' class='latex' /> i.e. the sequence converges the fastest for this value. Also, let it be obvious that, initial values close to the attractor will also lead to fast convergence. But we wish to construct a bojeklinn of this sequence anyways, for we would wish to see if there are any other interesting things here.</p>
<p>Let us present the bojeklinn of this sequence:</p>
<p><a href="http://perlman.files.wordpress.com/2008/10/bojeksqrt22.png"><img class="alignnone size-medium wp-image-131" title="bojeksqrt22" src="http://perlman.files.wordpress.com/2008/10/bojeksqrt22.png?w=300&#038;h=225" alt="" width="300" height="225" /></a></p>
<p>Blue regions converge quickly, green to yellow to red converges slowly.</p>
<p>The thick blue line is centered at <img src='http://s0.wp.com/latex.php?latex=-%5Csqrt%7B8%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='-&#92;sqrt{8}' title='-&#92;sqrt{8}' class='latex' /></p>
<p>The vertical line is at <img src='http://s0.wp.com/latex.php?latex=%5Csqrt%7B2%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;sqrt{2}' title='&#92;sqrt{2}' class='latex' /></p>
<p>The other line takes the form:</p>
<p><img src='http://s0.wp.com/latex.php?latex=c+%3D+-x_%7B0%7D+-+%5Csqrt%7B2%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='c = -x_{0} - &#92;sqrt{2}' title='c = -x_{0} - &#92;sqrt{2}' class='latex' /></p>
<p>this is a local minimum.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/perlman.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/perlman.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/perlman.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/perlman.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/perlman.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/perlman.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/perlman.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/perlman.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/perlman.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/perlman.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/perlman.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/perlman.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/perlman.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/perlman.wordpress.com/118/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlman.wordpress.com&amp;blog=3610759&amp;post=118&amp;subd=perlman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://perlman.wordpress.com/2008/10/07/bojeklification-for-optimization-and-exploration-of-fixed-point-iterative-methods/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4e13f38185ffdfe9edb3b8992956f834?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">perlman</media:title>
		</media:content>

		<media:content url="http://perlman.files.wordpress.com/2008/10/bojeksqrt22.png?w=300" medium="image">
			<media:title type="html">bojeksqrt22</media:title>
		</media:content>
	</item>
		<item>
		<title>Bifurcation of the Logistic Map</title>
		<link>http://perlman.wordpress.com/2008/09/30/bifurcation-of-the-logistic-map/</link>
		<comments>http://perlman.wordpress.com/2008/09/30/bifurcation-of-the-logistic-map/#comments</comments>
		<pubDate>Tue, 30 Sep 2008 21:41:45 +0000</pubDate>
		<dc:creator>perlman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://perlman.wordpress.com/?p=105</guid>
		<description><![CDATA[The logistic map is the system where bifurcation began, a man named Feigenbaund had the idea to plot the &#8220;stable values&#8221; of the system vs. values for the constant . The logistic map is recursively defined as: The most common example of a one dimensional chaotic system, the logistic map takes on varrying properties as [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlman.wordpress.com&amp;blog=3610759&amp;post=105&amp;subd=perlman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The logistic map is the system where bifurcation began, a man named Feigenbaund had the idea to plot the &#8220;stable values&#8221; of the system vs. values for the constant <img src='http://s0.wp.com/latex.php?latex=r&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='r' title='r' class='latex' />. The logistic map is recursively defined as:</p>
<p><img src='http://s0.wp.com/latex.php?latex=x_%7B0%7D+%5Cin+%5Cleft%5B0%2C1%5Cright%5D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='x_{0} &#92;in &#92;left[0,1&#92;right]' title='x_{0} &#92;in &#92;left[0,1&#92;right]' class='latex' /><br />
<img src='http://s0.wp.com/latex.php?latex=x_%7Bn%2B1%7D+%3D+x_%7Bn%7D%281-x_%7Bn%7D%29r&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='x_{n+1} = x_{n}(1-x_{n})r' title='x_{n+1} = x_{n}(1-x_{n})r' class='latex' /></p>
<p>The most common example of a one dimensional chaotic system, the logistic map takes on varrying properties as the value of <img src='http://s0.wp.com/latex.php?latex=r&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='r' title='r' class='latex' /> changes. For <img src='http://s0.wp.com/latex.php?latex=r+%5Cin+%5Cleft%5B-1%2C1%5Cright%5D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='r &#92;in &#92;left[-1,1&#92;right]' title='r &#92;in &#92;left[-1,1&#92;right]' class='latex' /> the system converges on zero. For <img src='http://s0.wp.com/latex.php?latex=r+%5Cin+%5Cleft%5B1%2C3%5Cright%5D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='r &#92;in &#92;left[1,3&#92;right]' title='r &#92;in &#92;left[1,3&#92;right]' class='latex' /> the attractor is the fixed point <img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Br-1%7D%7Br%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;frac{r-1}{r}' title='&#92;frac{r-1}{r}' class='latex' />. For <img src='http://s0.wp.com/latex.php?latex=r+%5Cin+%5Cleft%5B3%2C4%5Cright%5D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='r &#92;in &#92;left[3,4&#92;right]' title='r &#92;in &#92;left[3,4&#92;right]' class='latex' /> the attractor starts splitting into 2-cycles, 4-cycles, 8-cycles and so on into complete chaos.</p>
<p>A great picture illustrating this is the Feigenbaund diagram, an imaging technique otherwise known as bifurcation.</p>
<p>I decided to do this using the updated probabilistic method of bifurcation i developed for the lorenz attractor. Here it is:</p>
<p><a href="http://perlman.files.wordpress.com/2008/09/logmap.png"><img class="alignnone size-large wp-image-113" title="logmap" src="http://perlman.files.wordpress.com/2008/09/logmap.png?w=450&#038;h=332" alt="" width="450" height="332" /></a></p>
<p>Here is the code:</p>
<pre>
clear;
m = 1000;
M = 1000;

r = linspace(0,4,m);
N = 2000;

for k=1:numel(r)
clear x;
x(1) = 0.1;
for j=1:N
	x(j+1) = x(j)*(1-x(j))*r(k);
	X(k,j) = x(j);
end
k/(2*m)
end

draw = zeros(M,m);

xx = linspace(1,0,M);
st = round(N/10);
for j=1:m
	for k=1:M-1
		draw(k,j) = sum((xx(k) &gt;= X(j,300:end)).*(xx(k+1) &lt;= X(j,300:end)));
	end
(j+m)/(2*m)
end

imagesc(log10(draw+1))
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/perlman.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/perlman.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/perlman.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/perlman.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/perlman.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/perlman.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/perlman.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/perlman.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/perlman.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/perlman.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/perlman.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/perlman.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/perlman.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/perlman.wordpress.com/105/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlman.wordpress.com&amp;blog=3610759&amp;post=105&amp;subd=perlman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://perlman.wordpress.com/2008/09/30/bifurcation-of-the-logistic-map/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4e13f38185ffdfe9edb3b8992956f834?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">perlman</media:title>
		</media:content>

		<media:content url="http://perlman.files.wordpress.com/2008/09/logmap.png?w=450" medium="image">
			<media:title type="html">logmap</media:title>
		</media:content>
	</item>
		<item>
		<title>Biffurcation of the Lorenz Equation</title>
		<link>http://perlman.wordpress.com/2008/09/30/biffurcation-of-the-lorenz-equation/</link>
		<comments>http://perlman.wordpress.com/2008/09/30/biffurcation-of-the-lorenz-equation/#comments</comments>
		<pubDate>Tue, 30 Sep 2008 16:28:19 +0000</pubDate>
		<dc:creator>perlman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://perlman.wordpress.com/?p=64</guid>
		<description><![CDATA[Bifurcation is a way to draw the attractor of a chaotic system. You have some iterated system with a parameter, you vary the parameter and calculate the values the system takes. The goal is to plot the &#8220;stable values&#8221;, which is most easily achievable by simply iterating the sequence for a while and plotting a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlman.wordpress.com&amp;blog=3610759&amp;post=64&amp;subd=perlman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Bifurcation is a way to draw the attractor of a chaotic system. You have some iterated system with a parameter, you vary the parameter and calculate the values the system takes. The goal is to plot the &#8220;stable values&#8221;, which is most easily achievable by simply iterating the sequence for a while and plotting a number of values that the system takes after it has been allowed to stabilize.</p>
<p>I decided that while this method may be fine for some systems, it isn&#8217;t capable of getting a decent picture in a less predictable system with a very strange attractor. For this we want a more probabilistic approach. Some sort of probability cloud which contains the system.</p>
<p>How much time does the system spend on any given area? I set out to create an image that would answer this question to one extent or another. The motivation for me to develop such imaging was the lorenz equation. What is commonly referred to as the Lorenz attractor, is the lorenz equation with <img src='http://s0.wp.com/latex.php?latex=%5Ctau+%3D+28&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;tau = 28' title='&#92;tau = 28' class='latex' />, <img src='http://s0.wp.com/latex.php?latex=%5Cbeta+%3D+8%2F3&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;beta = 8/3' title='&#92;beta = 8/3' class='latex' /> and <img src='http://s0.wp.com/latex.php?latex=%5Csigma+%3D+10&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;sigma = 10' title='&#92;sigma = 10' class='latex' />. For these values the attractor is strange. This is one of the first examples of numerical chaos.</p>
<p>The lorenz equation is a coupled set of differential equations:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdx%7D%7Bdt%7D+%3D+%5Csigma+%28y+-x%29&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;frac{dx}{dt} = &#92;sigma (y -x)' title='&#92;frac{dx}{dt} = &#92;sigma (y -x)' class='latex' /></p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdy%7D%7Bdt%7D+%3D+x%28%5Ctau+-+z%29+-+y&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;frac{dy}{dt} = x(&#92;tau - z) - y' title='&#92;frac{dy}{dt} = x(&#92;tau - z) - y' class='latex' /></p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bdz%7D%7Bdt%7D+%3D+xy+-+%5Cbeta+z&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;frac{dz}{dt} = xy - &#92;beta z' title='&#92;frac{dz}{dt} = xy - &#92;beta z' class='latex' /></p>
<p>We can varry any of these constants, <img src='http://s0.wp.com/latex.php?latex=%5Cbeta&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;beta' title='&#92;beta' class='latex' />, <img src='http://s0.wp.com/latex.php?latex=%5Ctau&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;tau' title='&#92;tau' class='latex' />, <img src='http://s0.wp.com/latex.php?latex=%5Csigma&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;sigma' title='&#92;sigma' class='latex' /> and plot the values x, y, or z takes against them. This is a basic explanation of how standard bifurcation is done. This is also often referred to as a Feigenbaund diagram.</p>
<p>But to get a more complete picture, we want to take into account how often the system visits any given value.</p>
<p>So we divide the domain of the variable in question, x, y, or z up into discreet intervals. Then we count the number of values that fall in each bin. Just like a histogram. We tally these values up in a matrix for plotting. Every value is color coded. I use the MATLAB imagesc() command, which takes a matrix and plots it as an image, higher values on the matrix corresponding to hotter colors. I had to filter the image with a logarithm to make it more clear, without suck filtering it was very faint.</p>
<p>We plot the x values vs <img src='http://s0.wp.com/latex.php?latex=%5Ctau&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;tau' title='&#92;tau' class='latex' /> where x is the horizontal axis.</p>
<p>Here it is for <img src='http://s0.wp.com/latex.php?latex=%5Ctau+%5Cin+%5Cleft%5B1%2C60%5Cright%5D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;tau &#92;in &#92;left[1,60&#92;right]' title='&#92;tau &#92;in &#92;left[1,60&#92;right]' class='latex' /></p>
<p><a href="http://perlman.files.wordpress.com/2008/09/t20rk3tho160dt-2.png"><img class="alignnone size-medium wp-image-93" title="t20rk3tho160dt-2" src="http://perlman.files.wordpress.com/2008/09/t20rk3tho160dt-2.png?w=545&#038;h=407" alt="" width="545" height="407" /></a></p>
<p>i apologize, the axes are not labeled correctly. Here is a zoom in on the interface between the normal attractor and advent of the strange attractor.</p>
<p><a href="http://perlman.files.wordpress.com/2008/09/zoom.png"><img class="alignnone size-medium wp-image-95" title="zoom" src="http://perlman.files.wordpress.com/2008/09/zoom.png?w=542&#038;h=406" alt="" width="542" height="406" /></a></p>
<p>More interesting images to come. Here is the code i used to generate these images:</p>
<pre>m = 2000; % rho resolution
M = 2000; % X resolution
tf = 20; %final time
R = linspace(1,60,m);

for k=1:m
clear x y z;
x(1) = 3;
y(1) = 15;
z(1) = 5;
dt = 10^-2;
pran = 10;
ray = R(k);
phy = 8/3;
N = round(tf/dt);
dt = tf/N;
for j=1:N
    x1 = x(j) + dt*(pran*(y(j)-x(j)));
    x1 = 0.75*x(j) + 0.25*(x1 + dt*(pran*(y(j)-x1)));
        x(j+1) = (x(j) + 2*(x1 + dt*(pran*(y(j)-x1))))/3;

y1 = y(j) + dt*(x(j)*(ray-z(j))-y(j));
    y1 = 0.75*y(j) + 0.25*(y1 + dt*(x(j)*(ray-z(j))-y1));
        y(j+1) = (y(j) + 2*(y1 + dt*(x(j)*(ray-z(j))-y1) ))/3;

z1 = z(j) + dt*(x(j)*y(j) - phy*z(j));
    z1 = 0.75*z(j) + 0.25*(z1 + dt*(x(j)*y(j) - phy*z1));
        z(j+1) = (z(j) + 2*(z1 + dt*(x(j)*y(j) - phy*z1)))/3;

end
k/(2*m)
Z(k,:) = z;
Y(k,:) = y;
X(k,:) = x;
end

draw = zeros(M);

xmin = min(min(X));
xmax = max(max(X));

xx = linspace(xmax,xmin,M);
st = round(N/10);
for j=1:m
        for k=1:M-1
                draw(k,j) = sum((xx(k) &gt;= X(j,st:end)).*(xx(k+1) &lt;= X(j,st:end))
);
        end
(j+m)/(2*m)
end
imagesc(log10(draw+1))
%save 4000x4000t.30.rho.10.2.mat draw R X Y Z
print -dpng zoomindt22.png</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/perlman.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/perlman.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/perlman.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/perlman.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/perlman.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/perlman.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/perlman.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/perlman.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/perlman.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/perlman.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/perlman.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/perlman.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/perlman.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/perlman.wordpress.com/64/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlman.wordpress.com&amp;blog=3610759&amp;post=64&amp;subd=perlman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://perlman.wordpress.com/2008/09/30/biffurcation-of-the-lorenz-equation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4e13f38185ffdfe9edb3b8992956f834?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">perlman</media:title>
		</media:content>

		<media:content url="http://perlman.files.wordpress.com/2008/09/t20rk3tho160dt-2.png?w=300" medium="image">
			<media:title type="html">t20rk3tho160dt-2</media:title>
		</media:content>

		<media:content url="http://perlman.files.wordpress.com/2008/09/zoom.png?w=300" medium="image">
			<media:title type="html">zoom</media:title>
		</media:content>
	</item>
		<item>
		<title>The Lorenz Attractor</title>
		<link>http://perlman.wordpress.com/2008/09/24/the-lorenz-attractor/</link>
		<comments>http://perlman.wordpress.com/2008/09/24/the-lorenz-attractor/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 16:25:06 +0000</pubDate>
		<dc:creator>perlman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://perlman.wordpress.com/?p=72</guid>
		<description><![CDATA[I decided to write some code to draw trajectories in the lorenz system. Below is an image showing the trajectories of two very close initial conditions for the lorenz system. For some time they stay close, then then diiverge Here is the code i used clear; x(1) = 3; y(1) = 15; z(1) = 5; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlman.wordpress.com&amp;blog=3610759&amp;post=72&amp;subd=perlman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I decided to write some code to draw trajectories in the lorenz system. Below is an image showing the trajectories of two very close initial conditions for the lorenz system. </p>
<p>For some time they stay close, then then diiverge</p>
<p><a href="http://perlman.files.wordpress.com/2008/09/lorenz2.png"><img class="alignnone size-large wp-image-73" title="lorenz2" src="http://perlman.files.wordpress.com/2008/09/lorenz2.png?w=450&#038;h=337" alt="" width="450" height="337" /></a></p>
<p>Here is the code i used </p>
<pre>
clear;
x(1) = 3;
y(1) = 15;
z(1) = 5;
x1(1) = 3.02;
y1(1) = 15.01;
z1(1) = 5.02;
dt = 10^-3;
pran = 10;
ray = 28;
phy = 8/3;
N = 20/dt;
for j=1:N
        x1(j+1) = x1(j) + dt*(pran*(y1(j)-x1(j)));
    y1(j+1) = y1(j) + dt*(x1(j)*(ray-z1(j))-y1(j));
    z1(j+1) = z1(j) + dt*(x1(j)*y1(j) - phy*z1(j));

    x(j+1) = x(j) + dt*(pran*(y(j)-x(j)));
    y(j+1) = y(j) + dt*(x(j)*(ray-z(j))-y(j));
    z(j+1) = z(j) + dt*(x(j)*y(j) - phy*z(j));
	j/N
end
plot3(x,y,z);
hold on;
plot3(x1,y1,z1,'r');
</pre>
<p>This is just a small taste of what ive been up to. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/perlman.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/perlman.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/perlman.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/perlman.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/perlman.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/perlman.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/perlman.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/perlman.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/perlman.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/perlman.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/perlman.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/perlman.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/perlman.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/perlman.wordpress.com/72/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlman.wordpress.com&amp;blog=3610759&amp;post=72&amp;subd=perlman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://perlman.wordpress.com/2008/09/24/the-lorenz-attractor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4e13f38185ffdfe9edb3b8992956f834?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">perlman</media:title>
		</media:content>

		<media:content url="http://perlman.files.wordpress.com/2008/09/lorenz2.png?w=450" medium="image">
			<media:title type="html">lorenz2</media:title>
		</media:content>
	</item>
		<item>
		<title>Root Finding: The Bisection Method</title>
		<link>http://perlman.wordpress.com/2008/09/14/root-finding-the-bisection-method/</link>
		<comments>http://perlman.wordpress.com/2008/09/14/root-finding-the-bisection-method/#comments</comments>
		<pubDate>Sun, 14 Sep 2008 20:03:32 +0000</pubDate>
		<dc:creator>perlman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://perlman.wordpress.com/?p=38</guid>
		<description><![CDATA[If there is a sign change between and and is continuous then there exists a zero for somewhere in . This is easily proved by the Intermediate value theorum which states: If function is continuous on interval then there exists a value u between and and such that In our case zero is between and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlman.wordpress.com&amp;blog=3610759&amp;post=38&amp;subd=perlman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If there is a sign change between <img src='http://s0.wp.com/latex.php?latex=f%28a%29+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='f(a) ' title='f(a) ' class='latex' /> and <img src='http://s0.wp.com/latex.php?latex=f%28b%29+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='f(b) ' title='f(b) ' class='latex' /> and <img src='http://s0.wp.com/latex.php?latex=f+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='f ' title='f ' class='latex' /> is continuous then there exists a zero for <img src='http://s0.wp.com/latex.php?latex=f+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='f ' title='f ' class='latex' /> somewhere in <img src='http://s0.wp.com/latex.php?latex=%5Cleft%5Ba%2Cb%5Cright%5D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;left[a,b&#92;right]' title='&#92;left[a,b&#92;right]' class='latex' />. This is easily proved by the Intermediate value theorum which states:</p>
<p>If function <img src='http://s0.wp.com/latex.php?latex=f&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='f' title='f' class='latex' /> is continuous on interval <img src='http://s0.wp.com/latex.php?latex=%5Cleft%5Ba%2Cb%5Cright%5D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;left[a,b&#92;right]' title='&#92;left[a,b&#92;right]' class='latex' /> then there exists a value u between <img src='http://s0.wp.com/latex.php?latex=f%28a%29&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='f(a)' title='f(a)' class='latex' /> and <img src='http://s0.wp.com/latex.php?latex=f%28b%29&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='f(b)' title='f(b)' class='latex' /> and <img src='http://s0.wp.com/latex.php?latex=c+%5Cin+%5Cleft%5Ba%2Cb%5Cright%5D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='c &#92;in &#92;left[a,b&#92;right]' title='c &#92;in &#92;left[a,b&#92;right]' class='latex' /> such that <img src='http://s0.wp.com/latex.php?latex=f%28c%29+%3D+u&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='f(c) = u' title='f(c) = u' class='latex' /></p>
<p>In our case zero is between <img src='http://s0.wp.com/latex.php?latex=f%28a%29&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='f(a)' title='f(a)' class='latex' /> and <img src='http://s0.wp.com/latex.php?latex=f%28b%29&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='f(b)' title='f(b)' class='latex' /> so we know there is some value <img src='http://s0.wp.com/latex.php?latex=c+%5Cin+%5Cleft%5Ba%2Cb%5Cright%5D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='c &#92;in &#92;left[a,b&#92;right]' title='c &#92;in &#92;left[a,b&#92;right]' class='latex' /> such that   <img src='http://s0.wp.com/latex.php?latex=f%28c%29+%3D+0&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='f(c) = 0' title='f(c) = 0' class='latex' /></p>
<p>Using just this theorem it is easy to craft a numerical algorithm that will surely find the root we are looking for, given that there is only one root, and the function is continuous. We start by dividing the interval <img src='http://s0.wp.com/latex.php?latex=%5Cleft%5Ba%2Cb%5Cright%5D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;left[a,b&#92;right]' title='&#92;left[a,b&#92;right]' class='latex' /> in half, and checking for a sign change on each half. By the intermediate value theorem we can conclude that the zero is in the half that has the sign change, so we discard the other half. We continue this process until our interval is of the desired accuracy, typically <img src='http://s0.wp.com/latex.php?latex=10%5E%7B-15%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='10^{-15}' title='10^{-15}' class='latex' />.</p>
<p>Starting with stepsize <img src='http://s0.wp.com/latex.php?latex=d+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='d ' title='d ' class='latex' /> we will have a interval of size <img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bd%7D%7B2%5En%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;frac{d}{2^n}' title='&#92;frac{d}{2^n}' class='latex' /> at iteration <img src='http://s0.wp.com/latex.php?latex=n&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='n' title='n' class='latex' /></p>
<p>This relationship between step and accuracy is what we mean when we talk about convergence. This algorithm crafts a sequence that converges on the value we are looking for, and the above equation tells you how fast.</p>
<p>Here is some code the first one is a nice clean function called like bisect(f,a,b) where f is a string containing the function and a,b is the interval. example: bisect(&#8216;x.^2 + 3*x +1&#8242;,-1,1)</p>
<blockquote><p>%perform the bisection method on arbitrary function<br />
%written by Chris Bresten of Umass Dartmouth math dept.<br />
%example: bisect(&#8216;x.^2 + 3*x +1&#8242;,-1,1)</p>
<p>function z = bisect(funct,a,b);</p>
<p>f = inline(funct);</p>
<p>d = abs(b-a);<br />
while d &gt; 10^-15<br />
d = abs(b-a);<br />
c = a + ((b-a)/2);<br />
if f(a)*f(c) &lt; 0<br />
b = c;<br />
elseif f(c)*f(b) &lt; 0<br />
a = c;<br />
end<br />
if f(c) == 0<br />
break;<br />
end<br />
if f(a) == 0<br />
c = a;<br />
break;<br />
end<br />
if f(b) == 0<br />
c = b;<br />
break;<br />
end<br />
end<br />
z = c;<br />
end</p></blockquote>
<p>Here is a function that you call the same as the previous, this one is made as a demo to show the bisection method at work. It plots everything showing you the interval get smaller. you hit enter to make it iterate.</p>
<blockquote><p>function z = video(funct,a,b);<br />
f = inline(funct);<br />
ao = a;<br />
bo = b;<br />
d = abs(b-a);<br />
x = linspace(a,b);<br />
thr = .01;<br />
while d &gt; 10^-15<br />
d = abs(b-a);<br />
c = a + ((b-a)/2);<br />
hold off<br />
plot(x,f(x),&#8217;k');axis([ao bo f(ao) f(bo)]);<br />
if d &lt; thr<br />
x = linspace(a,b);<br />
ao = a;<br />
bo = b;<br />
thr = thr/100;<br />
end<br />
hold on<br />
plot(x,0,&#8217;m-&#8217;)<br />
plot(a,0,&#8217;g.&#8217;,'MarkerSize&#8217;,50)<br />
plot(b,0,&#8217;r.&#8217;,'MarkerSize&#8217;,50)<br />
plot(c,0,&#8217;y*&#8217;,'MarkerSize&#8217;,50)<br />
plot(a,f(a),&#8217;go&#8217;,'MarkerSize&#8217;,30)<br />
plot(b,f(b),&#8217;ro&#8217;,'MarkerSize&#8217;,30)</p>
<p>pause<br />
if f(a)*f(c) &lt; 0<br />
b = c;<br />
elseif f(c)*f(b) &lt; 0<br />
a = c;<br />
end<br />
if f(c) == 0<br />
break;<br />
end<br />
if f(a) == 0<br />
c = a;<br />
break;<br />
end<br />
if f(b) == 0<br />
c = b;<br />
break;<br />
end<br />
end<br />
z = c;<br />
end</p></blockquote>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/perlman.wordpress.com/38/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/perlman.wordpress.com/38/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/perlman.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/perlman.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/perlman.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/perlman.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/perlman.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/perlman.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/perlman.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/perlman.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/perlman.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/perlman.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/perlman.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/perlman.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/perlman.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/perlman.wordpress.com/38/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlman.wordpress.com&amp;blog=3610759&amp;post=38&amp;subd=perlman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://perlman.wordpress.com/2008/09/14/root-finding-the-bisection-method/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4e13f38185ffdfe9edb3b8992956f834?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">perlman</media:title>
		</media:content>
	</item>
		<item>
		<title>Comparison of Means: Traffic at 12pm vs traffic at 8pm</title>
		<link>http://perlman.wordpress.com/2008/05/22/comparison-of-means-traffic-at-12pm-vs-traffic-at-8pm/</link>
		<comments>http://perlman.wordpress.com/2008/05/22/comparison-of-means-traffic-at-12pm-vs-traffic-at-8pm/#comments</comments>
		<pubDate>Thu, 22 May 2008 15:44:28 +0000</pubDate>
		<dc:creator>perlman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://perlman.wordpress.com/?p=30</guid>
		<description><![CDATA[For comparison of means I decided to compare the number of hits durring one hour intervals at specific times durring the day. I randomly sampled 50 days, and for each day I counted the number of requests made to the site durring the specified intervals. The intervals I chose to use were 12-1pm and 8-9pm. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlman.wordpress.com&amp;blog=3610759&amp;post=30&amp;subd=perlman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>For comparison of means I decided to compare the number of hits durring one hour intervals at specific times durring the day. I randomly sampled 50 days, and for each day I counted the number of requests made to the site durring the specified intervals. The intervals I chose to use were 12-1pm and 8-9pm.</p>
<p>The data is paired, meaning that the values in each set are connected to the corresponding values in the other set(they are collected from the same day). So to compare means it is valid to simply find the difference between the sets and compute a confidence interval for the mean of  the difference.</p>
<p>The question we are trying to answer is weather or not there is a difference between the ammount of traffic from 12-1pm and the ammount of traffic from 8-9pm. We will compute several confidence intervals and see if any contain zero.</p>
<p>Here is a histogram of the differences between the ammount of traffic to the site between 12 and 1 pm and between 8 and 9 pm:</p>
<p><a href="http://perlman.files.wordpress.com/2008/05/diff12to8pm.png"><img src="http://perlman.files.wordpress.com/2008/05/ci2.png?w=327&#038;h=245" alt="" width="327" height="245" /></a></p>
<p>Summary Statistics are as follows:</p>
<ul>
<li>mean = 43.48</li>
<li>median = 37.5</li>
<li>skewness = 0.4640</li>
<li>kurtosis = 5.0638</li>
</ul>
<p>It appears approximately normal, low skewness, median is close to mean, kurtosis is not huge.  Normal enough that im going to go ahead and do a t-interval on it.</p>
<p>the resulting  t-interval of 95% confidence is: [21.0331   65.9269]</p>
<p>The confidence interval was constructed like :</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cmu+%5Cpm+t%5E%7B-1%7D_%7B49%7D%28%5Cfrac%7B%5Calpha%7D%7B2%7D%29+%2A+%5Cfrac%7Bs%7D%7B%5Csqrt%7B50%7D%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;mu &#92;pm t^{-1}_{49}(&#92;frac{&#92;alpha}{2}) * &#92;frac{s}{&#92;sqrt{50}} ' title='&#92;mu &#92;pm t^{-1}_{49}(&#92;frac{&#92;alpha}{2}) * &#92;frac{s}{&#92;sqrt{50}} ' class='latex' /></p>
<p>where <img src='http://s0.wp.com/latex.php?latex=%5Cmu+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;mu ' title='&#92;mu ' class='latex' /> is the mean <img src='http://s0.wp.com/latex.php?latex=s+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='s ' title='s ' class='latex' /> is the standard deviation and <img src='http://s0.wp.com/latex.php?latex=t%5E%7B-1%7D_%7Bn%7D%28%5Cfrac%7B%5Calpha%7D%7B2%7D%29++&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='t^{-1}_{n}(&#92;frac{&#92;alpha}{2})  ' title='t^{-1}_{n}(&#92;frac{&#92;alpha}{2})  ' class='latex' /> is the inverse t cdf of n degrees of freedom and confidence level <img src='http://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;alpha' title='&#92;alpha' class='latex' /></p>
<p>So, the confidence interval does not contain zero. I decided to try a few more samples with new intervals. Heres the rsulting t-intervals:</p>
<ul>
<li> [27.8191   84.9409]</li>
<li>[16.2736   73.7264]</li>
<li>[17.1049   66.2951]</li>
<li>[51.1875   97.2925]</li>
<li>[16.8320   66.8480]</li>
<li>[20.2286   80.7714]</li>
</ul>
<p>I guess we can safely conclude that there is generally more traffic from 12-1pm than from 8-9pm, perhaps people like to play on this site the most while theyre at work?</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/perlman.wordpress.com/30/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/perlman.wordpress.com/30/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/perlman.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/perlman.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/perlman.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/perlman.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/perlman.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/perlman.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/perlman.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/perlman.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/perlman.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/perlman.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/perlman.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/perlman.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/perlman.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/perlman.wordpress.com/30/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlman.wordpress.com&amp;blog=3610759&amp;post=30&amp;subd=perlman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://perlman.wordpress.com/2008/05/22/comparison-of-means-traffic-at-12pm-vs-traffic-at-8pm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4e13f38185ffdfe9edb3b8992956f834?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">perlman</media:title>
		</media:content>

		<media:content url="http://perlman.files.wordpress.com/2008/05/ci2.png" medium="image" />
	</item>
		<item>
		<title>Correlagram</title>
		<link>http://perlman.wordpress.com/2008/05/09/correlagram/</link>
		<comments>http://perlman.wordpress.com/2008/05/09/correlagram/#comments</comments>
		<pubDate>Fri, 09 May 2008 03:42:33 +0000</pubDate>
		<dc:creator>perlman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://perlman.wordpress.com/?p=24</guid>
		<description><![CDATA[So I did a correlagram for the 1 hour interval counts and the one day interval counts. Check it out: The red circles are 24, 48 and 72 hours consecutively. The peaks rest on these multiples of 24 and decay as time goes on, indicateing that the highest correlation happens when we look at it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlman.wordpress.com&amp;blog=3610759&amp;post=24&amp;subd=perlman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So I did a correlagram for the 1 hour interval counts and the one day interval counts. Check it out:</p>
<p><a href="http://perlman.files.wordpress.com/2008/05/corr1hour.png"><img class="alignnone size-medium wp-image-25" src="http://perlman.files.wordpress.com/2008/05/corr1hour.png?w=351&#038;h=263" alt="" width="351" height="263" /></a></p>
<p>The red circles are 24, 48 and 72 hours consecutively. The peaks rest on these multiples of 24 and decay as time goes on, indicateing that the highest correlation happens when we look at it as having a 24 hour period. This can be interpreted as the level of activity on this site being periodic with a period of one day.</p>
<p>Now check out the 1 correlagram for 1 day intervals</p>
<p><a href="http://perlman.files.wordpress.com/2008/05/corr1day.png"><img class="alignnone size-medium wp-image-26" src="http://perlman.files.wordpress.com/2008/05/corr1day.png?w=300&#038;h=225" alt="" width="300" height="225" /></a></p>
<p>You can see that the correlation decays, which really kinda shows that there is not much periodic behavior on a scale beyond 1 day. I may be able to show some periodicy by the week but that will be in another episode.</p>
<p>here is the definition of the correlagram for those who are interested:</p>
<p><img src='http://s0.wp.com/latex.php?latex=r%28k%29+%3D+%5Cfrac%7B1%7D%7Bv%7D%5Csum+%5Climits_%7Bi%3Dk%2B1%7D%5E%7BN%7D+%28x_i+-+%5Cmu%29%2A%28x_%7Bi-k%7D+-%5Cmu%29+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='r(k) = &#92;frac{1}{v}&#92;sum &#92;limits_{i=k+1}^{N} (x_i - &#92;mu)*(x_{i-k} -&#92;mu) ' title='r(k) = &#92;frac{1}{v}&#92;sum &#92;limits_{i=k+1}^{N} (x_i - &#92;mu)*(x_{i-k} -&#92;mu) ' class='latex' /></p>
<p>where <img src='http://s0.wp.com/latex.php?latex=v&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='v' title='v' class='latex' /> is the varience and N is half the size of the data set or less</p>
<p>r(k) is plotted as a function of k</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/perlman.wordpress.com/24/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/perlman.wordpress.com/24/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/perlman.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/perlman.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/perlman.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/perlman.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/perlman.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/perlman.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/perlman.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/perlman.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/perlman.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/perlman.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/perlman.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/perlman.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/perlman.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/perlman.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=perlman.wordpress.com&amp;blog=3610759&amp;post=24&amp;subd=perlman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://perlman.wordpress.com/2008/05/09/correlagram/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4e13f38185ffdfe9edb3b8992956f834?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">perlman</media:title>
		</media:content>

		<media:content url="http://perlman.files.wordpress.com/2008/05/corr1hour.png?w=300" medium="image" />

		<media:content url="http://perlman.files.wordpress.com/2008/05/corr1day.png?w=300" medium="image" />
	</item>
	</channel>
</rss>
