<?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>Rip's Applied Mathematics Blog</title>
	<atom:link href="http://rip94550.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://rip94550.wordpress.com</link>
	<description>applications of mathematics</description>
	<lastBuildDate>Sat, 28 Jan 2012 22:56:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='rip94550.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Rip's Applied Mathematics Blog</title>
		<link>http://rip94550.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://rip94550.wordpress.com/osd.xml" title="Rip&#039;s Applied Mathematics Blog" />
	<atom:link rel='hub' href='http://rip94550.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Happenings – 2012 jan 28</title>
		<link>http://rip94550.wordpress.com/2012/01/28/happenings-2012-jan-28/</link>
		<comments>http://rip94550.wordpress.com/2012/01/28/happenings-2012-jan-28/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 18:37:42 +0000</pubDate>
		<dc:creator>rip</dc:creator>
				<category><![CDATA[diary]]></category>

		<guid isPermaLink="false">http://rip94550.wordpress.com/?p=8297</guid>
		<description><![CDATA[Mathematically speaking, it&#8217;s been a quiet week. I hope to put out a summary of multi-collinearity this Monday&#8230; but, if necessary, I already have a different post written – a sketchy introduction to group theory. Finishing it off last weekend didn&#8217;t leave much time for other mathematics. I did pick up chemical reactions again&#8230; namely, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&amp;blog=2063738&amp;post=8297&amp;subd=rip94550&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Mathematically speaking, it&#8217;s been a quiet week.</p>
<p>I hope to put out a summary of multi-collinearity this Monday&#8230; but, if necessary, I already have a different post written – a sketchy introduction to group theory. Finishing it off last weekend didn&#8217;t leave much time for other mathematics.</p>
<p>I did pick up chemical reactions again&#8230; namely, finding mechanisms – sequences of elementary reactions – that explain observed reaction rates&#8230; specifically, the dependence of rates on composition. It&#8217;s beginning to make sense, now that I&#8217;ve looked at it after a long layoff.</p>
<p>I also spent a little while looking through my books on spectrum analysis (that is, frequency domain analysis of time series). For this, I feel like one of the mythical 3 blind men trying to understand an elephant. I like having more than one way to come at something, but for spectrum analysis, there seem to be too many different ways of approaching it. (I know, first understand one, or maybe two together, and then move on to more.)</p>
<p>A 2nd book by Vladimir I. Arnold came in: &#8220;catastrophe theory&#8221;. The back of the book says that it &#8220;&#8230;provides a concise, non-mathematical review of the less controversial results in catastrophe theory.&#8221;</p>
<p>I beg to differ. One might call it &#8220;non-rigorous&#8221; but it is hardly nonmathematical.</p>
<p>The most significant thing I got out of it was: &#8220;On odd-dimensional manifolds there can be no symplectic structures, but instead there are contact structures.&#8221;</p>
<p>The point is that symplectic structures can only be defined on even-dimensional spaces – I knew that&#8230; the prototype is the even-dimensional phase space of Hamiltonian mechanics. And I have heard of contact structures&#8230; without realizing that there was any relationship. At this point, that&#8217;s about all I know. </p>
<p>So let me go learn some more about something.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rip94550.wordpress.com/8297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rip94550.wordpress.com/8297/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rip94550.wordpress.com/8297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rip94550.wordpress.com/8297/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rip94550.wordpress.com/8297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rip94550.wordpress.com/8297/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rip94550.wordpress.com/8297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rip94550.wordpress.com/8297/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rip94550.wordpress.com/8297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rip94550.wordpress.com/8297/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rip94550.wordpress.com/8297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rip94550.wordpress.com/8297/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rip94550.wordpress.com/8297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rip94550.wordpress.com/8297/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&amp;blog=2063738&amp;post=8297&amp;subd=rip94550&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rip94550.wordpress.com/2012/01/28/happenings-2012-jan-28/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eda25c1223d5c501eea15aab3feba8ac?s=96&#38;d=monsterid" medium="image">
			<media:title type="html">rip</media:title>
		</media:content>
	</item>
		<item>
		<title>Regression 1: ADM polynomials – 3 (Odds and Ends)</title>
		<link>http://rip94550.wordpress.com/2012/01/23/regression-1-adm-polynomials-3-odds-and-ends/</link>
		<comments>http://rip94550.wordpress.com/2012/01/23/regression-1-adm-polynomials-3-odds-and-ends/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 01:57:08 +0000</pubDate>
		<dc:creator>rip</dc:creator>
				<category><![CDATA[math OLS]]></category>
		<category><![CDATA[mathematics]]></category>
		<category><![CDATA[OLS ordinary least squares regression]]></category>
		<category><![CDATA[orthogonal polynomials]]></category>

		<guid isPermaLink="false">http://rip94550.wordpress.com/?p=8206</guid>
		<description><![CDATA[There are several things I want to show you, all related to our orthogonal polynomial fits. Can we fit a 7th degree polynomial to our 8 data points? Yes. We can do it using regression. We can do it using Lagrange Interpolation. Did Draper &#38; Smith use the same orthogonalized data? Yes, but not normalized. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&amp;blog=2063738&amp;post=8206&amp;subd=rip94550&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There are several things I want to show you, all related to our orthogonal polynomial fits.</p>
<ul>
<li>
Can we fit a 7th degree polynomial to our 8 data points? Yes.</li>
<li>
We can do it using regression.</li>
<li>
We can do it using Lagrange Interpolation.</li>
<li>
Did Draper &amp; Smith use the same orthogonalized data? Yes, but not normalized.</li>
<li>
How did Draper &amp; Smith get their values? They looked them up.</li>
<li>
Were their values samples of Lagrange polynomials? No.</li>
</ul>
<p>The bottom line is that starting with half-integral values of x, all I need is the Orthogonalize command, to apply Gram-Schmidt to the powers of x. <a href="http://rip94550.wordpress.com/2012/01/09/regression-1-adm-polynomials-2/">I did that here</a>. I don&#8217;t need to look up a set of equations or a pre-computed table of orthogonal vectors. Furthermore, I can handle arbitrary data which is not equally-spaced.</p>
<p><span id="more-8206"></span></p>
<h2>Can we fit a 7th degree polynomial to our 8 data points? Yes.<br />
We can do it using regression.</h2>
<p>Let me finish by showing you what happens if I add x^7. Here&#8217;s the result of centering the 8 years 1986..1993:</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-1.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-1.png?w=780" alt="" title="reg 1 23 1"   class="alignnone size-full wp-image-8252" /></a></p>
<p>Here&#8217;s the dependent variable again:</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-2.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-2.png?w=780" alt="" title="reg 1 23 2"   class="alignnone size-full wp-image-8251" /></a></p>
<p>Now compute powers of x, up through x^7, and append the y values&#8230; and set names:</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-3.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-3.png?w=780" alt="" title="reg 1 23 3"   class="alignnone size-full wp-image-8250" /></a></p>
<p>Run stepwise&#8230; (I&#8217;ll remark that I almost always run stepwise rather than a single specific model. It gives me context for the fit of interest, in general.)</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-4.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-4.png?w=780" alt="" title="reg 1 23 4"   class="alignnone size-full wp-image-8249" /></a></p>
<p>Oh, come on! That should work.</p>
<p>It did. We still get an error on the last regression, but we already know there is no problem with the first six fits (other than multicollinearity). Let&#8217;s check the inversion on the last fit: no warnings.</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-5.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-5.png?w=780" alt="" title="reg 1 23 5"   class="alignnone size-full wp-image-8248" /></a></p>
<p>What&#8217;s going on?</p>
<p>Let&#8217;s try to look at the details of this regression.</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-6.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-6.png?w=780" alt="" title="reg 1 23 6"   class="alignnone size-full wp-image-8247" /></a></p>
<p>Ah ha! That 1/0 occurs because n &#8211; k = 0: we have 8 observations and 8 variables. Notice the &#8220;1&#8243; sitting between two &#8220;Missing&#8221;? That&#8217;s the RSquared&#8230; it was computed just fine, thank you.</p>
<p>Since R^2 = 1, the sum of the squared errors must be zero, and if the sum of non-negative numbers is zero, then each one of them – each one of the squared errors – must be zero. We have a fitted equation with zero errors – but we also have n &#8211; k = 0 messing up many of our usual output results.</p>
<p>(I had originally run the previous posts using powers thru x^7&#8230; but the error message because n = k has nothing to do with the error messages that came from extreme multicollinearity, and I didn&#8217;t want to proliferate issues.)</p>
<p>We did indeed put a 7th degree polynomial exactly thru 8 points. Here&#8217;s the fitted equation&#8230; and replace Xi by X^i (and name the resulting polynomial &#8220;g&#8221;)&#8230;</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-7.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-7.png?w=780" alt="" title="reg 1 23 7"   class="alignnone size-full wp-image-8246" /></a></p>
<p>Let&#8217;s take a look at it.. and the data points, too:</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-8.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-8.png?w=780" alt="" title="reg 1 23 8"   class="alignnone size-full wp-image-8245" /></a></p>
<p>I wouldn&#8217;t really forecast using this&#8230; but let&#8217;s go four years out anyway. That is, instead of drawing the polynomial between -7/2 and +7/2, I go out to +15/2.</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-9.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-9.png?w=780" alt="" title="reg 1 23 9"   class="alignnone size-full wp-image-8244" /></a></p>
<p>Yikes! That&#8217;s what x^7 will do to you. The original data is completely blown away by the absurdly large (negative) growth of the high-degree polynomial.</p>
<p>In summary,<br />
	we can use LinearModelFit to exactly fit the data<br />
	n = k will mess up some of the usual outputs</p>
<p>Oh, I could have just called for the one fit:	</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-10.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-10.png?w=780" alt="" title="reg 1 23 10"   class="alignnone size-full wp-image-8243" /></a></p>
<p>We are spared the error messages&#8230; except that they&#8217;ll show up as soon as we call for anything involving n-k:</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-11.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-11.png?w=780" alt="" title="reg 1 23 11"   class="alignnone size-full wp-image-8242" /></a></p>
<p>(So it&#8217;s my fault they showed up at all: stepwise asks for information involving n-k, and that&#8217;s what generated the messages.)</p>
<h2>We can do it using Lagrange Interpolation.</h2>
<p>You may recall something called Lagrange Interpolation. It&#8217;s a formula for a polynomial that goes exactly thru a set of points. (It is crucial for Lagrange Interpolation that the x values be distinct. Similarly, the least-squares fit cannot go through all 8 points if the x values are not distinct.)</p>
<p>Mathematica® will do a Lagrange Interpolation for us. Here are the (x,y) pairs:</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-12.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-12.png?w=780" alt="" title="reg 1 23 12"   class="alignnone size-full wp-image-8241" /></a></p>
<p>And here&#8217;s the command and the output for a fitted polynomial&#8230; and the answer rewritten&#8230; and, for comparison, the answer from the OLS fit (that&#8217;s why I named it – so I could refer to it here):</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-13.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-13.png?w=780" alt="" title="reg 1 23 13"   class="alignnone size-full wp-image-8240" /></a></p>
<p>They are the same, as they should be.</p>
<p>Here is a <a href="http://www.youtube.com/watch?v=_zK_KhHW6og">a video showing Lagrange Interpolation</a>. (As I said in the diary post of Jan 21, I have found an error in a different video lecture by this speaker, so keep your eyes open.)</p>
<h2>Did Draper &amp; Smith use the same orthogonalized data? Yes, but not normalized.</h2>
<p>Let me show you what D&amp;S used. The following matrix is one of several tables; it&#8217;s specifically for 8 observations. It is accompanied by equations for &#8220;orthogonal polynomials&#8221;. Basically, someone sat down and worked out equations rather than simply orthogonalizing the powers of x numerically.</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-14.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-14.png?w=780" alt="" title="reg 1 23 14"   class="alignnone size-full wp-image-8239" /></a></p>
<p>It has mutually orthogonal – but not orthonormal – columns; computing Z&#8217;Z gets me all the dot products of the columns with each other&#8230; since all off-diagonal terms are zero, the columns are orthogonal to each other.</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-15.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-15.png?w=780" alt="" title="reg 1 23 15"   class="alignnone size-full wp-image-8238" /></a></p>
<p>We understand that the square roots of the diagonal entries are the lengths of the vectors. Its second column</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-16.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-16.png?w=780" alt="" title="reg 1 23 16"   class="alignnone size-full wp-image-8237" /></a></p>
<p>Is there any significant difference between their data matrix and mine?</p>
<p>Only the scaling. Take theirs and divide by mine, and square. Here is my orthogonal matrix from the previous post; its starting point was x = {-(7/2),-(5/2),-(3/2),-(1/2),1/2,3/2,5/2,7/2}&#8230;</p>
<p>The Orthogonalize command (applied to the transpose) gave us&#8230;</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-17.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-17.png?w=780" alt="" title="reg 1 23 17"   class="alignnone size-full wp-image-8236" /></a></p>
<p>Divide their matrix by my matrix, term by term, and then square the entries:</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-18.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-18.png?w=780" alt="" title="reg 1 23 18"   class="alignnone size-full wp-image-8235" /></a></p>
<p>Those values are precisely the diagonal elements we saw when we computed Zo&#8217;Zo: {8,168,168,264,616,2184,264}.</p>
<p>In other words, if I normalize their columns to unit vectors, I will get precisely the same matrix as if I orthogonalize my powers of x – provided I started with the centered data.</p>
<p>(There were any number of ways to show that relationship. The most straight-forward might have been to normalize each of their columns, and shown that the result matched my data&#8230;. Instead I chose to simply divide their data by my data, element by element.)</p>
<h2>How did Draper &amp; Smith get their values? They looked them up.</h2>
<p>They have gone to a lot of trouble to get equations. It turns out they are general in one respect – they work for any number of observations. But they suffer from two defects. One, we have only been given equations through degree 6: if we want higher degrees, we&#8217;ll have to work them out or look them up. Two, the equations require that the x values be evenly spaced. But orthogonalizing the data will work whether or not the values are evenly spaced.</p>
<p>Here are the equations they wrote. You will see that each has a multiplicative constant <img src='http://s0.wp.com/latex.php?latex=%5Clambda+%5C+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='&#92;lambda &#92; ' title='&#92;lambda &#92; ' class='latex' />. That&#8217;s part of what makes the equations general. (They cite many references for the following information, including a source of Fortran code; they might have computed it all themselves. In any case, I have scanned these equations and two subsequent tables from Draper &amp; Smith.)</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-19.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-19.png?w=780" alt="" title="reg 1 23 19"   class="alignnone size-full wp-image-8234" /></a></p>
<p>Here is the prescription for n = 8:</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-20.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-20.png?w=780" alt="" title="reg 1 23 20"   class="alignnone size-full wp-image-8232" /></a></p>
<p>The numbers on the last row are the <img src='http://s0.wp.com/latex.php?latex=%5Clambda+s%5C+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='&#92;lambda s&#92; ' title='&#92;lambda s&#92; ' class='latex' />. That &#8220;2&#8243; under their first column says that the column of integers was obtained from x (half-integers!) by multiplying by 2.</p>
<p>Here&#8217;s the code I wrote to implement the equations for n = 8. (It includes the <img src='http://s0.wp.com/latex.php?latex=%5Clambda+s%5C+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='&#92;lambda s&#92; ' title='&#92;lambda s&#92; ' class='latex' />, so don&#8217;t worry about reading them from the image.)</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-22.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-22.png?w=780" alt="" title="reg 1 23 22"   class="alignnone size-full wp-image-8231" /></a></p>
<p>(I chose to include the constant term.)</p>
<p>Here&#8217;s my output. First, each new power is a new row&#8230; then I transpose that answer so that each power is a column&#8230; then I compute Z&#8217;Z to confirm orthogonality of columns:</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-23.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-23.png?w=780" alt="" title="reg 1 23 23"   class="alignnone size-full wp-image-8230" /></a></p>
<p>Let me show you something very important. Although the equations are general in that they contain &#8220;n&#8221;, the number of observations, they are implicitly specific in that they require that the entries in X be separated by 1.</p>
<p>Huh?</p>
<p>What happens if we start with 2x (integers) instead of x (half-integers? The resulting matrix does not have orthogonal columns.</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-24.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-24.png?w=780" alt="" title="reg 1 23 24"   class="alignnone size-full wp-image-8229" /></a></p>
<p>So, not only do we have that list of <img src='http://s0.wp.com/latex.php?latex=%5Clambda+s%5C+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='&#92;lambda s&#92; ' title='&#92;lambda s&#92; ' class='latex' /> to pre-multiply the equations, but we have to start with integers for n odd, half-integers for n even.</p>
<p>I have a slightly better idea. I can get rid of the <img src='http://s0.wp.com/latex.php?latex=%5Clambda+s%5C+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='&#92;lambda s&#92; ' title='&#92;lambda s&#92; ' class='latex' /> – because I can figure out what they must be. (And I could let the code decide whether I need integers or half integers to start&#8230; and I could even let the code decide whether I already had half-integers! but I&#8217;m only going to show you how to figure out the <img src='http://s0.wp.com/latex.php?latex=%5Clambda+s%5C+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='&#92;lambda s&#92; ' title='&#92;lambda s&#92; ' class='latex' />.</p>
<p>For 7 observations, I need centered integers:</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-25.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-25.png?w=780" alt="" title="reg 1 23 25"   class="alignnone size-full wp-image-8228" /></a></p>
<p>Here&#8217;s the output: first with powers in rows, then transposed. In between, I multiplied by an identity matrix&#8230;. because I&#8217;m going to change some of the diagonal entries:</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-26.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-26.png?w=780" alt="" title="reg 1 23 26"   class="alignnone size-full wp-image-8227" /></a></p>
<p>Well, column 2 has a common factor of 2&#8230; as do columns 4 and 6 – whoa! column 4 has a common factor of 4&#8230; and column 7 needs to be multiplied by 7&#8230; so I change entries in the diagonal matrix, and get:</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-27a.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-27a.png?w=780" alt="" title="reg 1 23 27a"   class="alignnone size-full wp-image-8267" /></a></p>
<p>In other words, I have scaled down the answers as far as possible while still having integers.</p>
<p>Did I get what they would have? Here&#8217;s their table for n = 7:</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-21.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-21.png?w=780" alt="" title="reg 1 23 21"   class="alignnone size-full wp-image-8233" /></a><br />
Finally, I had already multiplied column 2 by 2 in the code for n=8&#8230; after I divide by 2, I&#8217;ve got that <img src='http://s0.wp.com/latex.php?latex=%5Clambda+%3D+1%5C+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='&#92;lambda = 1&#92; ' title='&#92;lambda = 1&#92; ' class='latex' />. I don&#8217;t need his table of <img src='http://s0.wp.com/latex.php?latex=%5Clambda+s%5C+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='&#92;lambda s&#92; ' title='&#92;lambda s&#92; ' class='latex' />&#8230; and I could even rewrite the code to remove the lambdas from it.</p>
<p>But I&#8217;m not going to bother.</p>
<p>As I said, what they so laboriously construct could be accomplished on a case-by-case basis simply by orthogonalizing the data matrix (starting with integers or half-integers for equally-spaced data). And such a numerical orthogonalization will work even if the data is not evenly spaced. (I would try for approximately integral separation, but I can&#8217;t predict how amenable the data will be.)</p>
<h2>Were their values samples of Lagrange polynomials? No.</h2>
<p>Here, for example, is the Draper &amp; Smith data for the quadratic term:</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-28.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-28.png?w=780" alt="" title="reg 1 23 28"   class="alignnone size-full wp-image-8225" /></a></p>
<p>and they look like this:</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-29.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-29.png?w=780" alt="" title="reg 1 23 29"   class="alignnone size-full wp-image-8224" /></a></p>
<p>Here is a graph of the second-degree Legendre polynomial:</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-30.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-30.png?w=780" alt="" title="reg 1 23 30"   class="alignnone size-full wp-image-8223" /></a></p>
<p>Its integral from -1 to 1 is zero; this means it is orthogonal to the constant function = 1.</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-31.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-31.png?w=780" alt="" title="reg 1 23 31"   class="alignnone size-full wp-image-8222" /></a></p>
<p>Let&#8217;s change the horizontal and vertical scales on the polynomial&#8230; and show the data points we actually have:</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-32.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-32.png?w=780" alt="" title="reg 1 23 32"   class="alignnone size-full wp-image-8221" /></a></p>
<p>So: our data points are not samples of the corresponding Legendre polynomial.</p>
<p>Now let&#8217;s sample the Legendre polynomial. Here is a graph of the Legendre polynomial and 8 equally-spaced samples.</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-33.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-33.png?w=780" alt="" title="reg 1 23 33"   class="alignnone size-full wp-image-8220" /></a></p>
<p>Fine. but what I want to know is: can I scale these samples to be orthogonal to the constant? NO: their sum would have to be zero. If it isn&#8217;t already, I can&#8217;t make it zero by multiplying by any nonzero scale factor.</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-34.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-34.png?w=780" alt="" title="reg 1 23 34"   class="alignnone size-full wp-image-8219" /></a></p>
<p>Oh, Rip, don&#8217;t be silly. You don&#8217;t need to scale it – you need to shift it up or down! With a sum of 8 for the eight samples, I need to subtract 1 from each sample:</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-351.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-351.png?w=780" alt="" title="reg 1 23 35"   class="alignnone size-full wp-image-8259" /></a></p>
<p>Now scale the result so that I have integers – without common factors:</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-23-36.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-23-36.png?w=780" alt="" title="reg 1 23 36"   class="alignnone size-full wp-image-8258" /></a></p>
<p>OK, I just reproduced the Draper &amp; Smith values.</p>
<p>Unfortunately, this process will not work for the quartic data, so as far as I can tell so far, there&#8217;s no easy way to get the discrete orthogonal polynomials from the continuous (Legendre) polynomials.</p>
<p>I&#8217;ll repeat the bottom line. If we start with integral or half-integral data, for odd or even number of observations, the Gram-Schmidt orthogonalization algorithm (the Orthogonalize command) will generate effectively the same answers as the equations or tables.</p>
<p>And the Orthogonalize command will work even if the x-values are not equally-spaced.</p>
<p>So just orthgonalize. Don&#8217;t go looking for pre-computed tables.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rip94550.wordpress.com/8206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rip94550.wordpress.com/8206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rip94550.wordpress.com/8206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rip94550.wordpress.com/8206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rip94550.wordpress.com/8206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rip94550.wordpress.com/8206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rip94550.wordpress.com/8206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rip94550.wordpress.com/8206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rip94550.wordpress.com/8206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rip94550.wordpress.com/8206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rip94550.wordpress.com/8206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rip94550.wordpress.com/8206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rip94550.wordpress.com/8206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rip94550.wordpress.com/8206/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&amp;blog=2063738&amp;post=8206&amp;subd=rip94550&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rip94550.wordpress.com/2012/01/23/regression-1-adm-polynomials-3-odds-and-ends/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eda25c1223d5c501eea15aab3feba8ac?s=96&#38;d=monsterid" medium="image">
			<media:title type="html">rip</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-1.png" medium="image">
			<media:title type="html">reg 1 23 1</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-2.png" medium="image">
			<media:title type="html">reg 1 23 2</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-3.png" medium="image">
			<media:title type="html">reg 1 23 3</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-4.png" medium="image">
			<media:title type="html">reg 1 23 4</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-5.png" medium="image">
			<media:title type="html">reg 1 23 5</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-6.png" medium="image">
			<media:title type="html">reg 1 23 6</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-7.png" medium="image">
			<media:title type="html">reg 1 23 7</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-8.png" medium="image">
			<media:title type="html">reg 1 23 8</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-9.png" medium="image">
			<media:title type="html">reg 1 23 9</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-10.png" medium="image">
			<media:title type="html">reg 1 23 10</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-11.png" medium="image">
			<media:title type="html">reg 1 23 11</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-12.png" medium="image">
			<media:title type="html">reg 1 23 12</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-13.png" medium="image">
			<media:title type="html">reg 1 23 13</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-14.png" medium="image">
			<media:title type="html">reg 1 23 14</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-15.png" medium="image">
			<media:title type="html">reg 1 23 15</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-16.png" medium="image">
			<media:title type="html">reg 1 23 16</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-17.png" medium="image">
			<media:title type="html">reg 1 23 17</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-18.png" medium="image">
			<media:title type="html">reg 1 23 18</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-19.png" medium="image">
			<media:title type="html">reg 1 23 19</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-20.png" medium="image">
			<media:title type="html">reg 1 23 20</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-22.png" medium="image">
			<media:title type="html">reg 1 23 22</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-23.png" medium="image">
			<media:title type="html">reg 1 23 23</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-24.png" medium="image">
			<media:title type="html">reg 1 23 24</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-25.png" medium="image">
			<media:title type="html">reg 1 23 25</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-26.png" medium="image">
			<media:title type="html">reg 1 23 26</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-27a.png" medium="image">
			<media:title type="html">reg 1 23 27a</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-21.png" medium="image">
			<media:title type="html">reg 1 23 21</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-28.png" medium="image">
			<media:title type="html">reg 1 23 28</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-29.png" medium="image">
			<media:title type="html">reg 1 23 29</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-30.png" medium="image">
			<media:title type="html">reg 1 23 30</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-31.png" medium="image">
			<media:title type="html">reg 1 23 31</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-32.png" medium="image">
			<media:title type="html">reg 1 23 32</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-33.png" medium="image">
			<media:title type="html">reg 1 23 33</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-34.png" medium="image">
			<media:title type="html">reg 1 23 34</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-351.png" medium="image">
			<media:title type="html">reg 1 23 35</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-23-36.png" medium="image">
			<media:title type="html">reg 1 23 36</media:title>
		</media:content>
	</item>
		<item>
		<title>Happenings – 2012 Jan 21</title>
		<link>http://rip94550.wordpress.com/2012/01/21/happenings-2012-jan-21/</link>
		<comments>http://rip94550.wordpress.com/2012/01/21/happenings-2012-jan-21/#comments</comments>
		<pubDate>Sat, 21 Jan 2012 19:52:47 +0000</pubDate>
		<dc:creator>rip</dc:creator>
				<category><![CDATA[diary]]></category>

		<guid isPermaLink="false">http://rip94550.wordpress.com/?p=8190</guid>
		<description><![CDATA[What&#8217;s really memorable about this past week, for me, was a short collaboration between my alter egos the kid and the undergraduate. The undergrad was struggling with easy stuff – and the kid really, really wanted to get it right. I had been struggling with circuit theory&#8230; specifically with RLC circuits. Yes, I solved them [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&amp;blog=2063738&amp;post=8190&amp;subd=rip94550&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>What&#8217;s really memorable about this past week, for me, was a short collaboration between my alter egos the kid and the undergraduate. The undergrad was struggling with easy stuff – and the kid really, really wanted to get it right.</p>
<p>I had been struggling with circuit theory&#8230; specifically with RLC circuits. Yes, I solved them long ago in college – although, in fact, I didn&#8217;t actually study elementary differential equations until I was a graduate student. (I hadn&#8217;t had them before I transferred to Caltech as a sophomore&#8230; where they had been covered freshman year.) I had also never seen Laplace transforms until I was a graduate student. I learned both during the 1st course for which I was a TA.</p>
<p>And here I was, all bollixed up, unable to get what I expected.</p>
<p>On the other hand, I had gotten there after deciding that I needed to solve one of the simplest possible LRC circuits, rather than the more complicated ones to which I was trying to apply a slightly more sophisticated method.</p>
<p>Anyway, I woke up one morning dreaming about it, and determined to forget all the complicated stuff&#8230; just solve the second-order differential equation for current&#8230; and then solve the equation using Laplace transforms. In fact, I solved the voltage balance rather than the second-order ODE using Laplace transforms – and there is one little tricky detail&#8230;.<br />
<span id="more-8190"></span><br />
A piece of cake. All I had to do was pay attention. Yes, I learned a couple of things. The first was about me and circuits: although I certainly know better, I have a tendency to think of the second-order equation for current as though it were a voltage balance. It isn&#8217;t remotely. Grrr.</p>
<p>The second was that if we do want to use a voltage balance and Laplace transforms, then the initial voltage on each capacitor looks for all the world as though the capacitor had been replaced by a constant voltage source.</p>
<p>Which I had read, and not understood. So going back to the beginning had cleared up one of the more advanced issues. Cool.</p>
<p>Okay, it was all elementary&#8230; but I&#8217;m still delighted to have gotten it all to work out. This is, after all, something my undergraduate is trying to make sense of. When you get confused, simplify the problem. Now I&#8217;m ready to tackle more complicated circuits.</p>
<p>Let me close by reviewing the performance of this blog. I should have done it a few weeks ago but I was playing a computer game instead.</p>
<p>From its inception in November 2007 to December 31, 2011&#8230; the blog had had 143,500 hits, almost 53,000 spam&#8230; and a total of 372 posts.</p>
<p>During 2011 alone, the blog got more than 50,000 hits – more than 4000 almost every month, more than 5000 three times&#8230; with a single-day maximum of 309 hits. (The top line is 6000, then we have 5000, and 4000.)</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/past-year-months.png"><img src="http://rip94550.files.wordpress.com/2012/01/past-year-months.png?w=780" alt="" title="past year months"   class="alignnone size-full wp-image-8209" /></a></p>
<p>7 posts each had more than 1000 hits in 2011&#8230; 2 of them were new: compressed sensing and 5 card draw poker hands – and each is a runaway bestseller.</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/past-year-list.png"><img src="http://rip94550.files.wordpress.com/2012/01/past-year-list.png?w=780" alt="" title="past year list"   class="alignnone size-full wp-image-8208" /></a></p>
<p>8 posts have over 2000 hits for all time&#8230; one would not expect that list to change quickly&#8230; 7 of those posts were the top 7 <a href="http://rip94550.wordpress.com/2010/12/04/happenings-%E2%80%93-2010-dec-4/">listed in December 2010</a>&#8230; compressed sensing is the new kid on the block.</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/all-time-list.png"><img src="http://rip94550.files.wordpress.com/2012/01/all-time-list.png?w=780" alt="" title="all time list"   class="alignnone size-full wp-image-8207" /></a></p>
<p>And with that, let me get about doing and/or writing mathematics.</p>
<p>Oh, I got a new book this week: &#8220;Topological Methods in Hydrodynamics&#8221;, by Arnold and Khesin&#8230;.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rip94550.wordpress.com/8190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rip94550.wordpress.com/8190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rip94550.wordpress.com/8190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rip94550.wordpress.com/8190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rip94550.wordpress.com/8190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rip94550.wordpress.com/8190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rip94550.wordpress.com/8190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rip94550.wordpress.com/8190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rip94550.wordpress.com/8190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rip94550.wordpress.com/8190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rip94550.wordpress.com/8190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rip94550.wordpress.com/8190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rip94550.wordpress.com/8190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rip94550.wordpress.com/8190/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&amp;blog=2063738&amp;post=8190&amp;subd=rip94550&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rip94550.wordpress.com/2012/01/21/happenings-2012-jan-21/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eda25c1223d5c501eea15aab3feba8ac?s=96&#38;d=monsterid" medium="image">
			<media:title type="html">rip</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/past-year-months.png" medium="image">
			<media:title type="html">past year months</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/past-year-list.png" medium="image">
			<media:title type="html">past year list</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/all-time-list.png" medium="image">
			<media:title type="html">all time list</media:title>
		</media:content>
	</item>
		<item>
		<title>Happenings – 2012 Jan 14</title>
		<link>http://rip94550.wordpress.com/2012/01/14/happenings-2012-jan-14/</link>
		<comments>http://rip94550.wordpress.com/2012/01/14/happenings-2012-jan-14/#comments</comments>
		<pubDate>Sat, 14 Jan 2012 21:05:19 +0000</pubDate>
		<dc:creator>rip</dc:creator>
				<category><![CDATA[diary]]></category>

		<guid isPermaLink="false">http://rip94550.wordpress.com/?p=8156</guid>
		<description><![CDATA[I finished playing a very long game of Ascendancy in the middle of the week. My alter ego the kid is now reading Körner&#8217;s &#8220;The Pleasures of Counting&#8221;. My alter ego the undergraduate managed to put in a couple of hours on circuit theory (trying to understand the use of complex impedance)&#8230; he even started [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&amp;blog=2063738&amp;post=8156&amp;subd=rip94550&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I finished playing a very long game of Ascendancy in the middle of the week. My alter ego the kid is now reading Körner&#8217;s <a href="http://rip94550.wordpress.com/2011/10/01/happenings-%E2%80%93-2011-oct-1/">&#8220;The Pleasures of Counting&#8221;</a>. My alter ego the undergraduate managed to put in a couple of hours on circuit theory (trying to understand the use of complex impedance)&#8230; he even started making headway in an old Dover book, Kron&#8217;s &#8220;Tensors for Circuits&#8221;&#8230; the last time I looked at it, I was lost.</p>
<p>I have some mathematics done for a post for this Monday&#8230; but I keep thinking about other things I might add to it. If I can&#8217;t stabilize the content, I may find it difficult to put the post out on time. Duh.</p>
<p>So who&#8217;s in charge? The managing editor wants to publish&#8230; but the mathematician isn&#8217;t ready to call it quits. We&#8217;ll see what happens.</p>
<p>While looking for an online reference to a particular formula – I&#8217;m horrified that I couldn&#8217;t find it in my own library! – I found <a href="http://numericalmethods.eng.usf.edu/blog_entries.html">the following site</a>. It appears to deal primarily with undergraduate numerical mathematics. (And it did have the formula I was seeking.)</p>
<p>There are 2 points I need to emphasize. One, it has <a href="http://numericalmethods.eng.usf.edu/videos/index.html">an index to a collection of YouTube videos</a> – mathematics, of course.</p>
<p>Two, I have only looked at five of the videos&#8230; and I have found a mistake – 2 of them actually – in one &#8220;slide&#8221;. Unfortunately, I did not find a blog post corresponding to the video&#8230; and I didn&#8217;t see any way to attach comments to the video. Ah, I did just send an email.</p>
<p>Here&#8217;s a freeze-frame:</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/screen-shot-2012-01-14-at-11-33-30-am.png"><img src="http://rip94550.files.wordpress.com/2012/01/screen-shot-2012-01-14-at-11-33-30-am.png?w=780" alt="" title="Screen shot 2012-01-14 at 11.33.30 AM"   class="alignnone size-full wp-image-8200" /></a></p>
<p><a href="http://numericalmethods.eng.usf.edu/videos/youtube/06reg/adequacy/adequacy_06reg_checkthree2.html">The full video is here</a>.</p>
<p>The lecturer asserts that a steeper slope implies a higher R^2 because the vertical distance between the data and the fitted line will be larger. Yes, but the vertical distance between the data and its mean value is also larger. The R^2 and the adjusted R^2 will not change. What will change? The estimated variance.</p>
<p>He also said that if the x values were more spread out, then the R^2 would be higher. That&#8217;s interesting, because if the x values are more spread out, then the computed slope would be lower&#8230; and according to the first point, the R^2 would be lower. In fact, the R^2 will be the same.</p>
<p>It is conceivable that I have completely misunderstood what he means, so let me be explicit. Take a 2-variable data set, x and y, and fit a regression. Now multiply y by 10 and fit another regression: you will get the same R^2 and adjusted R^2; the estimated variance will be 100 times larger.</p>
<p>Now multiply x by 10 (still using the 10 times y) and fit a 3rd regression: you will get the same R^2 and adjusted R^2, and the same estimated variance as for the second case.</p>
<p>So I&#8217;m saying that the R^2 and adjusted R^2 are not affected by vertical or horizontal scaling of the data. (We&#8217;ve seen that the R^2 and adjusted R^2 are the same for the Hald data and <a href="http://rip94550.wordpress.com/2011/07/18/regression-1-multicollinearity-in-subsets-of-the-standardized-hald-data/">the standardized Hald data</a> – and standardizing data is a change of scale. And I standardized everything, including the dependent variable, so I also had a change of vertical scale.)</p>
<p>(The numerical stability might be affected by changes of scale! We&#8217;ve just seen that taking powers of x = 1.986, 1.987, &#8230;, 1.993 leads to horrendous inversions of X&#8217;X, while centering the x values (i.e. rescaling to -7/2, -5/2, &#8230;, 7/2) eliminates the numerical inaccuracies.)</p>
<p>In other words, just as I tell you to be careful reading my posts, I tell you to be careful reading his, or watching his videos. But you might well find something of interest among them&#8230;.</p>
<p>I started this before I turned my kid and undergraduate loose, so let me get about their play and work&#8230; before I turn to Monday&#8217;s post.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rip94550.wordpress.com/8156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rip94550.wordpress.com/8156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rip94550.wordpress.com/8156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rip94550.wordpress.com/8156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rip94550.wordpress.com/8156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rip94550.wordpress.com/8156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rip94550.wordpress.com/8156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rip94550.wordpress.com/8156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rip94550.wordpress.com/8156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rip94550.wordpress.com/8156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rip94550.wordpress.com/8156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rip94550.wordpress.com/8156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rip94550.wordpress.com/8156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rip94550.wordpress.com/8156/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&amp;blog=2063738&amp;post=8156&amp;subd=rip94550&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rip94550.wordpress.com/2012/01/14/happenings-2012-jan-14/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eda25c1223d5c501eea15aab3feba8ac?s=96&#38;d=monsterid" medium="image">
			<media:title type="html">rip</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/screen-shot-2012-01-14-at-11-33-30-am.png" medium="image">
			<media:title type="html">Screen shot 2012-01-14 at 11.33.30 AM</media:title>
		</media:content>
	</item>
		<item>
		<title>Regression 1: ADM polynomials – 2</title>
		<link>http://rip94550.wordpress.com/2012/01/09/regression-1-adm-polynomials-2/</link>
		<comments>http://rip94550.wordpress.com/2012/01/09/regression-1-adm-polynomials-2/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 23:42:44 +0000</pubDate>
		<dc:creator>rip</dc:creator>
				<category><![CDATA[math OLS]]></category>
		<category><![CDATA[mathematics]]></category>
		<category><![CDATA[multicollinearity]]></category>
		<category><![CDATA[OLS ordinary least squares regression]]></category>

		<guid isPermaLink="false">http://rip94550.wordpress.com/?p=8045</guid>
		<description><![CDATA[Let&#8217;s look again at a polynomial fit for our small set of annual data. We started this in the previous technical post. What we used last time was That is, I had divided the year by 1000&#8230; because, as messy as our results were, they would have been a little worse using the years themselves. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&amp;blog=2063738&amp;post=8045&amp;subd=rip94550&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s look again at a polynomial fit for our small set of annual data. We started this in <a href="http://rip94550.wordpress.com/2012/01/02/regression-1-archer-daniel-midlands-polynomials-1/">the previous technical post</a>.</p>
<p>What we used last time was</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-1.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-1.png?w=780" alt="" title="reg 1 9 1"   class="alignnone size-full wp-image-8127" /></a></p>
<p>That is, I had divided the year by 1000&#8230; because, as messy as our results were, they would have been a little worse using the years themselves.</p>
<p>But there&#8217;s a simple transformation that we ought to try – and it will have a nice side effect.</p>
<p>Just center the data. Start with the years themselves, and subtract the mean:</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-2.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-2.png?w=780" alt="" title="reg 1 9 2"   class="alignnone size-full wp-image-8126" /></a></p>
<p>I&#8217;ll observe that if we wanted to work with integers, we could just multiply by 2. In either case, our new x is not a unit vector. </p>
<p>Oh, the nice side effect? Our centered data is orthogonal to a constant vector.</p>
<p>Let&#8217;s see what happens.<br />
<span id="more-8045"></span><br />
As before, I compute the powers of x up to x^6, and I run both forward and backward selection.</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-3.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-3.png?w=780" alt="" title="reg 1 9 3"   class="alignnone size-full wp-image-8125" /></a></p>
<p>Forward and backward did not agree in the previous post – but now they do. Maybe this is promising.</p>
<p>Let&#8217;s check the last inversion: no warning, and the identity matrix looks perfect.</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-4.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-4.png?w=780" alt="" title="reg 1 9 4"   class="alignnone size-full wp-image-8124" /></a></p>
<p>This is a nice improvement. I at least am convinced that centering the years is a better way to treat them.</p>
<p>Nevertheless, having been shocked by the previous post, let me look at the singular values of the data matrix&#8230;</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-5.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-5.png?w=780" alt="" title="reg 1 9 5"   class="alignnone size-full wp-image-8123" /></a></p>
<p>Considerably better.</p>
<p>Now let&#8217;s drop the last two regressions, and see what our criteria would choose.</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-6.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-6.png?w=780" alt="" title="reg 1 9 6"   class="alignnone size-full wp-image-8122" /></a></p>
<p>Regressions 1, 3, 4. Let&#8217;s also print 5, and 6 because we couldn&#8217;t include them in the selection&#8230;. Heck, let&#8217;s print all 6&#8230; as two sets of three:</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-7.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-7.png?w=780" alt="" title="reg 1 9 7"   class="alignnone size-full wp-image-8121" /></a></p>
<p>The third regression has all t-statistics significant&#8230; in fact, x^2 is more significant with x^4 added.</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-8.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-8.png?w=780" alt="" title="reg 1 9 8"   class="alignnone size-full wp-image-8120" /></a></p>
<p>In regression 4, x^6 enters with a t-statistic whose absolute value is greater than 1, but less than 2&#8230; so the Adjusted R^2 went up. (Note that I am printing R^2 rather than Adjusted R^2&#8230; because Draper &amp; Smith talked about the best R^2 they could get. But we can see the Adjusted R^2 in the output from the forward and backward selections.)</p>
<p>In regression 5, x^3 enters with a low t-statistic, but everything else remains significant. Not until we add x^5  do we see other t-statistics fall below 1. And yet, the degradation is fairly slow.</p>
<p>Do we still have multicollinearity? Yes, indeed! Here are the R^2 computed from the Variance Inflation Factors:</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-9.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-9.png?w=780" alt="" title="reg 1 9 9"   class="alignnone size-full wp-image-8119" /></a></p>
<p>So, just a better choice for x gave us computationally nicer results.</p>
<p>Let&#8217;s look at the 3-variable fit. First the predicted values&#8230; then the fitted equation&#8230; then that equation with X2 replaced by X^2, etc.:</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-10.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-10.png?w=780" alt="" title="reg 1 9 10"   class="alignnone size-full wp-image-8118" /></a></p>
<p>Here&#8217;s a picture: the equation and the fitted points. (Hmm. I should have shown the data, too, but I didn&#8217;t. In that respect, this fit is as good as what we had last time.)</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-11.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-11.png?w=780" alt="" title="reg 1 9 11"   class="alignnone size-full wp-image-8117" /></a></p>
<p>Visually, that&#8217;s pretty satisfying. I wouldn&#8217;t forecast very far out, though. Let&#8217;s go four years out&#8230;</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-12.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-12.png?w=780" alt="" title="reg 1 9 12"   class="alignnone size-full wp-image-8116" /></a></p>
<p>That&#8217;s the problem with powers of x – they grow quickly.</p>
<h2>orthogonalize</h2>
<p>Now, we should expect that orthogonalizing will eliminate the multicollinearity. And we hope that the we&#8217;ll still have nicely behaved computations.</p>
<p>As usual, transpose the design matrix&#8230; then orthogonalize&#8230; transpose again&#8230; and confirm that Z is orthogonal&#8230; (I use the backward selection because it keeps the variables in the original order.)</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-13.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-13.png?w=780" alt="" title="reg 1 9 13"   class="alignnone size-full wp-image-8115" /></a></p>
<p>Here&#8217;s what the orthogonalized data looks like&#8230; in particular, we have a constant first column, and a second column which is proportional to the centered data.</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-14.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-14.png?w=780" alt="" title="reg 1 9 14"   class="alignnone size-full wp-image-8114" /></a></p>
<p>Drop the first (constant) column&#8230; and append the dependent variable&#8230;</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-15.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-15.png?w=780" alt="" title="reg 1 9 15"   class="alignnone size-full wp-image-8113" /></a></p>
<p>Run forward&#8230; and backward selection&#8230;</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-16.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-16.png?w=780" alt="" title="reg 1 9 16"   class="alignnone size-full wp-image-8112" /></a></p>
<p>They agree.</p>
<p>As before, take only the first four regressions (i.e. 5 variables including the constant), and see what our criteria choose:</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-17.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-17.png?w=780" alt="" title="reg 1 9 17"   class="alignnone size-full wp-image-8111" /></a></p>
<p>Also as before, let&#8217;s go ahead and look at all 6 regressions, in two subsets:</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-18.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-18.png?w=780" alt="" title="reg 1 9 18"   class="alignnone size-full wp-image-8110" /></a></p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-19.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-19.png?w=780" alt="" title="reg 1 9 19"   class="alignnone size-full wp-image-8109" /></a></p>
<p>We see pretty much the same thing. The third regression has all t-statistics significant&#8230; the fourth regression raises the Adjusted R^2 when it brings in a variable with t-statistic greater than 1&#8230; then the last two variables enter with insignificant t-statistics.</p>
<p>Orthogonalization hasn&#8217;t changed the quality of the fit – in one sense&#8230; but it has eliminated multicollinearity.</p>
<p><a href="http://rip94550.files.wordpress.com/2012/01/reg-1-9-19b.png"><img src="http://rip94550.files.wordpress.com/2012/01/reg-1-9-19b.png?w=780" alt="" title="reg 1 9 19b"   class="alignnone size-full wp-image-8173" /></a></p>
<p>OK, fine, we&#8217;ve eliminated the multicollinearity&#8230; but at what cost? Our new data Z are linear combinations of powers of x&#8230; how can we look at what we&#8217;ve got? More importantly, how would we forecast using the orthogonalized fit?</p>
<p>Let me show the answer first. Here&#8217;s the previously fitted polynomial in X&#8230; with four predictions from the orthogonalized fit overlaid. That is, the curve comes from the powers of X, while the four points come from the fit using Z. They appear to coincide – and I will confirm that.</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-34.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-34.png?w=780" alt="" title="reg 1 9 34"   class="alignnone size-full wp-image-8094" /></a></p>
<p>OK, let&#8217;s do a forecast using the Z fit. Given four new values of x, I want to compute the appropriate values of Z. This isn&#8217;t perfectly straight-forward&#8230; because I don&#8217;t want – I can&#8217;t do! – another fit. I want to compute new observations based on the existing definition of Z.</p>
<p><a href="http://rip94550.wordpress.com/2011/11/28/the-relationship-between-the-raw-and-the-orthogonalized-data/">Well, we know how to do that.</a> I let K be the matrix of &#8220;old&#8221; data (the powers of x, excluding the constant):</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-20.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-20.png?w=780" alt="" title="reg 1 9 20"   class="alignnone size-full wp-image-8108" /></a></p>
<p>Then I let J be the matrix of &#8220;new&#8221; data (the orthogonal matrix Z, excluding the constant):</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-21.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-21.png?w=780" alt="" title="reg 1 9 21"   class="alignnone size-full wp-image-8107" /></a></p>
<p>We know that the transition matrix T can be computed as</p>
<p>T&#8217; = J&#8217; K</p>
<p>(OK, OK, that&#8217;s the transpose T&#8217; of T.)</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-22.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-22.png?w=780" alt="" title="reg 1 9 22"   class="alignnone size-full wp-image-8106" /></a></p>
<p>We also recall that orthogonalizing the data was an affine transformation rather than a linear one; we have</p>
<p>K = J T&#8217; &#8211; M.</p>
<p>Well, the fastest way to get M is to compute</p>
<p>M = K &#8211; J T&#8217;,</p>
<p>which is:</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-23.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-23.png?w=780" alt="" title="reg 1 9 23"   class="alignnone size-full wp-image-8105" /></a></p>
<p>It&#8217;s certainly nice to see that M has constant columns. If it didn&#8217;t, then we would conclude that there was something wrong with the transformation.</p>
<p>(I also saved one row of M – because I&#8217;m going to work with vectors in a moment.)</p>
<p>You may well be wondering what the hell I&#8217;m doing. If I have a new observation, say, x = 9/2 – that is, the next number after 7/2 – then I want to know what Z values it generates. Well, first let&#8217;s just get the powers of our new x&#8230; there&#8217;s got to be a slick way of having Mathematica® generate them&#8230;.</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-24.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-24.png?w=780" alt="" title="reg 1 9 24"   class="alignnone size-full wp-image-8104" /></a></p>
<p>Those are the powers of 9/2.</p>
<p>What are the corresponding Z values? From</p>
<p>J T&#8217; = K &#8211; M</p>
<p>we solve for J:</p>
<p><img src='http://s0.wp.com/latex.php?latex=J+%3D+%28K-M%29+T%5E%7B-T%7D%5C+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='J = (K-M) T^{-T}&#92; ' title='J = (K-M) T^{-T}&#92; ' class='latex' /></p>
<p>Check it. start with K&#8230; get J? I take our first observation&#8230; subtract M (actually M1, one row of M)&#8230; post-multiply by the inverse of T&#8217;&#8230; and compare that to the first observation of the J matrix:</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-25.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-25.png?w=780" alt="" title="reg 1 9 25"   class="alignnone size-full wp-image-8103" /></a></p>
<p>OK.</p>
<p>Oh, when we get a new row for the J matrix, we&#8217;re going to want to use our orthogonalized fit. Just what is it?</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-26.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-26.png?w=780" alt="" title="reg 1 9 26"   class="alignnone size-full wp-image-8102" /></a></p>
<p>I hope you see the problem: I don&#8217;t know how Z2 is related to Z, or how Z3 is related to Z and Z2. When we were working with X, it was trivial: X2 = X^2, X3 = X^3 etc.</p>
<p>Now, take our first forecast, x = 9/2. We subtract M1 from its powers&#8230; post-multiply by the inverse of T&#8217;&#8230; and we now have Z1, Z2, and Z4, so plug them into the equation.</p>
<p>(Yes, we also have Z3, Z5, and Z6, but they&#8217;re not used in the equation.)</p>
<p>The final number is the predicted value using our orthogonalized fit.</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-27.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-27.png?w=780" alt="" title="reg 1 9 27"   class="alignnone size-full wp-image-8101" /></a></p>
<p>Now, there&#8217;s probably a cleaner way to do three more predictions, but I decided to take it easy and just do them one after another. My next three &#8220;old&#8221; values are 11/2, 13/2, and 15/2:</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-28.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-28.png?w=780" alt="" title="reg 1 9 28"   class="alignnone size-full wp-image-8100" /></a></p>
<p>Get the set of Z (J) values and the predicted yhat for 11/2:</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-29.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-29.png?w=780" alt="" title="reg 1 9 29"   class="alignnone size-full wp-image-8099" /></a></p>
<p>&#8230; and for 13/2:</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-30.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-30.png?w=780" alt="" title="reg 1 9 30"   class="alignnone size-full wp-image-8098" /></a></p>
<p>&#8230; and for 15/2:</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-31.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-31.png?w=780" alt="" title="reg 1 9 31"   class="alignnone size-full wp-image-8097" /></a></p>
<p>Now assemble points from those predictions. We know the x-value and we have the predicted y-value, and we get pairs of coordinates.</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-32.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-32.png?w=780" alt="" title="reg 1 9 32"   class="alignnone size-full wp-image-8096" /></a></p>
<p>Now, let us return to our fitted polynomial in powers of X. Let&#8217;s see what it predicts for the same four values (9/2, 11/2, 13/2, 15/2).</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-33.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-33.png?w=780" alt="" title="reg 1 9 33"   class="alignnone size-full wp-image-8095" /></a></p>
<p>Those four values are exactly what we got by transforming K to get J. The centered data and the orthogonalized data lead to apparently the same forecasts. Here&#8217;s that picture again. Looking at the commands, you see that the curve (f2) comes from the equation in powers of X, but the points come from data4, the fit using Z.</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-9-34.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-9-34.png?w=780" alt="" title="reg 1 9 34"   class="alignnone size-full wp-image-8094" /></a></p>
<p>So.</p>
<p>We can eliminate the multicollinearity&#8230; but we didn&#8217;t change the fit in any significant way. We may, as a result, have more confidence in the validity of the fit to powers of X, but it&#8217;s a pain to use the  orthogonalized data!</p>
<p>There are some odds and ends I want to show you about this&#8230; in what will probably be the next post. In particular, we have in fact used orthogonal polynomials&#8230; without the hassle of working them out or looking them up&#8230; but they would show us how to get from X to Z.</p>
<p>I also want to show you what happens if I include x^7 in my data matrices.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rip94550.wordpress.com/8045/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rip94550.wordpress.com/8045/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rip94550.wordpress.com/8045/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rip94550.wordpress.com/8045/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rip94550.wordpress.com/8045/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rip94550.wordpress.com/8045/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rip94550.wordpress.com/8045/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rip94550.wordpress.com/8045/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rip94550.wordpress.com/8045/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rip94550.wordpress.com/8045/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rip94550.wordpress.com/8045/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rip94550.wordpress.com/8045/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rip94550.wordpress.com/8045/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rip94550.wordpress.com/8045/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&amp;blog=2063738&amp;post=8045&amp;subd=rip94550&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rip94550.wordpress.com/2012/01/09/regression-1-adm-polynomials-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eda25c1223d5c501eea15aab3feba8ac?s=96&#38;d=monsterid" medium="image">
			<media:title type="html">rip</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-1.png" medium="image">
			<media:title type="html">reg 1 9 1</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-2.png" medium="image">
			<media:title type="html">reg 1 9 2</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-3.png" medium="image">
			<media:title type="html">reg 1 9 3</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-4.png" medium="image">
			<media:title type="html">reg 1 9 4</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-5.png" medium="image">
			<media:title type="html">reg 1 9 5</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-6.png" medium="image">
			<media:title type="html">reg 1 9 6</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-7.png" medium="image">
			<media:title type="html">reg 1 9 7</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-8.png" medium="image">
			<media:title type="html">reg 1 9 8</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-9.png" medium="image">
			<media:title type="html">reg 1 9 9</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-10.png" medium="image">
			<media:title type="html">reg 1 9 10</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-11.png" medium="image">
			<media:title type="html">reg 1 9 11</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-12.png" medium="image">
			<media:title type="html">reg 1 9 12</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-13.png" medium="image">
			<media:title type="html">reg 1 9 13</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-14.png" medium="image">
			<media:title type="html">reg 1 9 14</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-15.png" medium="image">
			<media:title type="html">reg 1 9 15</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-16.png" medium="image">
			<media:title type="html">reg 1 9 16</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-17.png" medium="image">
			<media:title type="html">reg 1 9 17</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-18.png" medium="image">
			<media:title type="html">reg 1 9 18</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-19.png" medium="image">
			<media:title type="html">reg 1 9 19</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2012/01/reg-1-9-19b.png" medium="image">
			<media:title type="html">reg 1 9 19b</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-34.png" medium="image">
			<media:title type="html">reg 1 9 34</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-20.png" medium="image">
			<media:title type="html">reg 1 9 20</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-21.png" medium="image">
			<media:title type="html">reg 1 9 21</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-22.png" medium="image">
			<media:title type="html">reg 1 9 22</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-23.png" medium="image">
			<media:title type="html">reg 1 9 23</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-24.png" medium="image">
			<media:title type="html">reg 1 9 24</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-25.png" medium="image">
			<media:title type="html">reg 1 9 25</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-26.png" medium="image">
			<media:title type="html">reg 1 9 26</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-27.png" medium="image">
			<media:title type="html">reg 1 9 27</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-28.png" medium="image">
			<media:title type="html">reg 1 9 28</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-29.png" medium="image">
			<media:title type="html">reg 1 9 29</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-30.png" medium="image">
			<media:title type="html">reg 1 9 30</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-31.png" medium="image">
			<media:title type="html">reg 1 9 31</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-32.png" medium="image">
			<media:title type="html">reg 1 9 32</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-33.png" medium="image">
			<media:title type="html">reg 1 9 33</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-9-34.png" medium="image">
			<media:title type="html">reg 1 9 34</media:title>
		</media:content>
	</item>
		<item>
		<title>Happenings – 2012 jan 7</title>
		<link>http://rip94550.wordpress.com/2012/01/07/happenings-2012-jan-7/</link>
		<comments>http://rip94550.wordpress.com/2012/01/07/happenings-2012-jan-7/#comments</comments>
		<pubDate>Sat, 07 Jan 2012 18:05:34 +0000</pubDate>
		<dc:creator>rip</dc:creator>
				<category><![CDATA[diary]]></category>

		<guid isPermaLink="false">http://rip94550.wordpress.com/?p=8131</guid>
		<description><![CDATA[I&#8217;m being a complete wastrel, taking a break from math by playing Ascendancy, my favorite computer game. I started Tuesday evening after work, I began conquering the galaxy yesterday, and I&#8217;m going to keep playing for a while. We&#8217;ll see whether a technical post goes out on Monday evening.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&amp;blog=2063738&amp;post=8131&amp;subd=rip94550&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m being a complete wastrel, taking a break from math by playing Ascendancy, my favorite computer game. I started Tuesday evening after work, I began conquering the galaxy yesterday, and I&#8217;m going to keep playing for a while. We&#8217;ll see whether a technical post goes out on Monday evening.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rip94550.wordpress.com/8131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rip94550.wordpress.com/8131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rip94550.wordpress.com/8131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rip94550.wordpress.com/8131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rip94550.wordpress.com/8131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rip94550.wordpress.com/8131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rip94550.wordpress.com/8131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rip94550.wordpress.com/8131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rip94550.wordpress.com/8131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rip94550.wordpress.com/8131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rip94550.wordpress.com/8131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rip94550.wordpress.com/8131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rip94550.wordpress.com/8131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rip94550.wordpress.com/8131/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&amp;blog=2063738&amp;post=8131&amp;subd=rip94550&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rip94550.wordpress.com/2012/01/07/happenings-2012-jan-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eda25c1223d5c501eea15aab3feba8ac?s=96&#38;d=monsterid" medium="image">
			<media:title type="html">rip</media:title>
		</media:content>
	</item>
		<item>
		<title>Regression 1: Archer Daniel Midlands (polynomials) – 1</title>
		<link>http://rip94550.wordpress.com/2012/01/02/regression-1-archer-daniel-midlands-polynomials-1/</link>
		<comments>http://rip94550.wordpress.com/2012/01/02/regression-1-archer-daniel-midlands-polynomials-1/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 01:42:20 +0000</pubDate>
		<dc:creator>rip</dc:creator>
				<category><![CDATA[math OLS]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[multicollinearity]]></category>
		<category><![CDATA[OLS ordinary least squares regression]]></category>

		<guid isPermaLink="false">http://rip94550.wordpress.com/?p=8017</guid>
		<description><![CDATA[Now I want to illustrate another problem, this time with the powers of x. The following comes from Draper &#38; Smith, p. 463, Archer Daniel Midlands data; it may be in a file, but – with only 8 observations – it was easier to type the data in. Heck, I didn&#8217;t even look to see [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&amp;blog=2063738&amp;post=8017&amp;subd=rip94550&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Now I want to illustrate another problem, this time with the powers of x. The following comes from Draper &amp; Smith, p. 463, Archer Daniel Midlands data; it may be in a file, but – with only 8 observations – it was easier to type the data in. Heck, I didn&#8217;t even look to see if it was all in some file somewhere.</p>
<h2>raw data</h2>
<p>I have chosen to divide the years by 1000; in the next post I will do something else.</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-1.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-1.png?w=780" alt="" title="reg 1 2 1"   class="alignnone size-full wp-image-8085" /></a></p>
<p>The output of the following command is the given y values&#8230; I typed integers and then divided by 100 once rather than type decimal points.</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-2.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-2.png?w=780" alt="" title="reg 1 2 2"   class="alignnone size-full wp-image-8084" /></a><br />
<span id="more-8017"></span><br />
Fit a polynomial. With 8 data points, I should be able to fit a polynomial of degree 7 in principle, but I&#8217;m going to stop at 6. Get the powers 2 through 6 of x:</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-3.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-3.png?w=780" alt="" title="reg 1 2 3"   class="alignnone size-full wp-image-8083" /></a></p>
<p>Run forward and backward selections:</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-4.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-4.png?w=780" alt="" title="reg 1 2 4"   class="alignnone size-full wp-image-8082" /></a></p>
<p>We have considerably different choices between forward and backward regression. Still, let&#8217;s just blindly ask what the selection criteria would pick&#8230; but we have a problem, as in the previous post: the selection criteria need </p>
<p>n &#8211; k -2 &gt; 0, </p>
<p>and with n = 8, </p>
<p>then 6 &#8211; k &gt; 0, </p>
<p>i.e. 6 &gt; k; </p>
<p>since k is an integer, we must have </p>
<p>k &le; 5 </p>
<p>– which translates to a constant plus 4 &#8220;variables&#8221;. We can only run &#8220;select&#8221; on the first four regressions; the last three have too many variables.</p>
<p>So, take the first four regressions.</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-5.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-5.png?w=780" alt="" title="reg 1 2 5"   class="alignnone size-full wp-image-8081" /></a></p>
<p>OK, let&#8217;s look at regressions 1 and 4&#8230; (and I have looked at 5 too – it&#8217;s worse):</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-6.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-6.png?w=780" alt="" title="reg 1 2 6"   class="alignnone size-full wp-image-8080" /></a></p>
<p>Oh, balderdash. Coefficients of 10^10 – we&#8217;re beyond multicollinearity and into linear dependence! At least, that&#8217;s my first reaction. But we will see. That 4-variable regression has R^2 = .993 and estimated variance 20% of the 1-variable regression.</p>
<p>Let&#8217;s check the inversion of X&#8217;X. It turns out that even regression #2 is not reliable: We get a warning message&#8230; and what should be an identity matrix is off by 10^-4.</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-7.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-7.png?w=780" alt="" title="reg 1 2 7"   class="alignnone size-full wp-image-8079" /></a></p>
<p>Are the backward selections any better?</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-8.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-8.png?w=780" alt="" title="reg 1 2 8"   class="alignnone size-full wp-image-8078" /></a></p>
<p>No, not really. The second regression doesn&#8217;t get the inverse of X&#8217;X very accurately.</p>
<p>Once I know X&#8217;X is being inverted somewhat inaccurately, there&#8217;s no reason to check the VIF R^2. We unquestionably have multicollinearity. What the heck? Do it anyway.</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-9.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-9.png?w=780" alt="" title="reg 1 2 9"   class="alignnone size-full wp-image-8077" /></a></p>
<p>Under the circumstances, however, maybe I&#8217;d better check the first regressions, too. The inversion is good, for forward selection&#8230;</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-10.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-10.png?w=780" alt="" title="reg 1 2 10"   class="alignnone size-full wp-image-8076" /></a></p>
<p>and for backward selection:</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-11.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-11.png?w=780" alt="" title="reg 1 2 11"   class="alignnone size-full wp-image-8075" /></a></p>
<p>So, at least two regressions involving just one variable are reliable&#8230; I conjecture that all such regressions would be reliable; and at least two regressions involving two variables look unreliable&#8230; and I conjecture that all such are. But I&#8217;m not going to look at all of them.</p>
<p>While we&#8217;re exhibiting signs of multicollinearity, let&#8217;s look at the singular values of the data matrix. It&#8217;s dimensions are&#8230;</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-12.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-12.png?w=780" alt="" title="reg 1 2 12"   class="alignnone size-full wp-image-8074" /></a></p>
<p>For an 8&#215;6 matrix of full rank, we would get 6 nonzero singular values. We got only 4 – and two of them are under 10^-7, i.e. zero in single precision.</p>
<p>Three nonzero singular values, and the smallest is still around 10^-4, and the condition number for just the first three columns is</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-13.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-13.png?w=780" alt="" title="reg 1 2 13"   class="alignnone size-full wp-image-8073" /></a></p>
<p>What about the backward selection? That is, the first four regressions – not because they&#8217;re the first four, but because they have 5 or fewer variables counting the constant.</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-14.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-14.png?w=780" alt="" title="reg 1 2 14"   class="alignnone size-full wp-image-8072" /></a></p>
<p>Regressions 1 and 4&#8230;</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-15.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-15.png?w=780" alt="" title="reg 1 2 15"   class="alignnone size-full wp-image-8071" /></a></p>
<p>The same kind of result as for forward selection: the 4-variable regression has R^2 &gt; .993 and estimated variance 20% of the 1-variable regression.</p>
<p>We might as well literally take a look at the first forward selection, which used only X. Here is the fitted equation:</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-16.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-16.png?w=780" alt="" title="reg 1 2 16"   class="alignnone size-full wp-image-8070" /></a></p>
<p>Here is a graph of the data and the fitted equation:</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-17.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-17.png?w=780" alt="" title="reg 1 2 17"   class="alignnone size-full wp-image-8069" /></a></p>
<p>What about the 1-variable regression from backward selection?</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-18.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-18.png?w=780" alt="" title="reg 1 2 18"   class="alignnone size-full wp-image-8068" /></a></p>
<p>Note that I am leaving the 1-variable fit in the graph.</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-19.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-19.png?w=780" alt="" title="reg 1 2 19"   class="alignnone size-full wp-image-8067" /></a></p>
<p>Interesting. They seem to overlap over the interval of the data. Let&#8217;s forceast out to the year 3000 (i.e. x = 3.000):</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-20.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-20.png?w=780" alt="" title="reg 1 2 20"   class="alignnone size-full wp-image-8066" /></a></p>
<p>We do see them diverge. Good.</p>
<p>Now let me try something reckless. Let&#8217;s look at forward regression #4. Here is the fitted equation – in two forms, one with X2 etc. and the other with X^2 etc.</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-21.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-21.png?w=780" alt="" title="reg 1 2 21"   class="alignnone size-full wp-image-8065" /></a></p>
<p>Here&#8217;s a graph of the data and the fitted equation from the 4-variable regression:</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-22.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-22.png?w=780" alt="" title="reg 1 2 22"   class="alignnone size-full wp-image-8064" /></a></p>
<p>OK, I&#8217;m impressed but also shocked that Mathematica gave me something so visually reasonable, although the coefficients of the fit are outrageously large.</p>
<p>I would not be surprised if other software packages were not so obliging.</p>
<p>What about the 4-variable fit from backward selection? Again, the fitted equation has X2 etc, and I need to turn that into X^2 etc.</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-23.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-23.png?w=780" alt="" title="reg 1 2 23"   class="alignnone size-full wp-image-8063" /></a></p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-24.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-24.png?w=780" alt="" title="reg 1 2 24"   class="alignnone size-full wp-image-8062" /></a></p>
<p>Again, they appear to overlap almost perfectly. Let&#8217;s forecast out to the year 2500.</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-25.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-25.png?w=780" alt="" title="reg 1 2 25"   class="alignnone size-full wp-image-8061" /></a></p>
<p>We should note the vertical scale: the predicted numbers are huge before we can see a difference between the functions.</p>
<h2>orthogonalize</h2>
<p>We have used orthogonalization successfully to eliminate multicollinearity. OK, let&#8217;s orthogonalize the data. Here&#8217;s the design matrix (from backward selection because it has the variables in order).</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-26.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-26.png?w=780" alt="" title="reg 1 2 26"   class="alignnone size-full wp-image-8060" /></a></p>
<p>Let&#8217;s orthogonalize the transpose of that matrix and call the result Z. Let&#8217;s compute Z&#8217;Z to see if we get an identity matrix.</p>
<p>Sort of.</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-27.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-27.png?w=780" alt="" title="reg 1 2 27"   class="alignnone size-full wp-image-8059" /></a></p>
<p>Wait a minute! The two rightmost diagonal entries are zero; Z&#8217;Z cannot be inverted. We better book at Z itself.</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-28.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-28.png?w=780" alt="" title="reg 1 2 28"   class="alignnone size-full wp-image-8058" /></a></p>
<p>We only get 5 vectors out of the Gram-Schmidt process (counting the constant)! And I know that if I had not divided the years by 1000, we would only have gotten 4.</p>
<p>OK, let&#8217;s run with what we have, four orthogonal variables:</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-29.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-29.png?w=780" alt="" title="reg 1 2 29"   class="alignnone size-full wp-image-8057" /></a></p>
<p>This time we got the same set of regressions from both forward and backward selection.</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-30.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-30.png?w=780" alt="" title="reg 1 2 30"   class="alignnone size-full wp-image-8056" /></a></p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-31.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-31.png?w=780" alt="" title="reg 1 2 31"   class="alignnone size-full wp-image-8055" /></a></p>
<p>The 3-variable fit doesn&#8217;t seem all that much better than the previous one, which was</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-32.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-32.png?w=780" alt="" title="reg 1 2 32"   class="alignnone size-full wp-image-8054" /></a></p>
<p>Let&#8217;s check the inversion of X&#8217;X for regression 3:</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-33.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-33.png?w=780" alt="" title="reg 1 2 33"   class="alignnone size-full wp-image-8053" /></a></p>
<p>We really can gain by orthogonalizing. We have more reasonable coefficients, and a more accurate inverse of X&#8217;X.</p>
<p>On the other hand, it&#8217;s harder to look at things. Z2 etc are not simple powers of Z1: Z2 != Z1^2, etc.</p>
<p>(The multicollinearity is gone, as usual.)</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-34.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-34.png?w=780" alt="" title="reg 1 2 34"   class="alignnone size-full wp-image-8052" /></a></p>
<p>Here are the predicted values for the 1- and 3-variable regressions:</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-35.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-35.png?w=780" alt="" title="reg 1 2 35"   class="alignnone size-full wp-image-8051" /></a></p>
<p>Let&#8217;s look at the fitted values. Yes, I&#8217;m plotting them against X, not against Z1.</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-36.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-36.png?w=780" alt="" title="reg 1 2 36"   class="alignnone size-full wp-image-8050" /></a></p>
<p>The red dots do lie on a straight line: Z1 is a linear function of X, and the fitted 1-variable equation is linear in Z1, hence linear in X.</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-37.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-37.png?w=780" alt="" title="reg 1 2 37"   class="alignnone size-full wp-image-8049" /></a></p>
<p>The blue dots are nonlinear in Z1, hence nonlinear in X.</p>
<p>Finally, let me overlay the original 3-variable fit:</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-38.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-38.png?w=780" alt="" title="reg 1 2 38"   class="alignnone size-full wp-image-8048" /></a></p>
<p>The orthogonalized 3-variable fit (shown only as blue points)</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-39.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-39.png?w=780" alt="" title="reg 1 2 39"   class="alignnone size-full wp-image-8047" /></a></p>
<p>is very close to the original 4-variable fit&#8230;</p>
<p><a href="http://rip94550.files.wordpress.com/2011/12/reg-1-2-40.png"><img src="http://rip94550.files.wordpress.com/2011/12/reg-1-2-40.png?w=780" alt="" title="reg 1 2 40"   class="alignnone size-full wp-image-8046" /></a></p>
<p>over the region of the actual data.</p>
<h2>In conclusion&#8230;</h2>
<p>With x ranging from 1.986 to 1.993, and using powers of x, we encountered significant multicollinearity: R^2 from the VIFs were 1, the inversion of X&#8217;X gave warnings for any variable beyond x itself, and the coefficients of the fits were quite large for the 4-variable regression.</p>
<p>And yet, the fits themselves appeared to be valid. Furthermore, the 4-variable fit seemed to be a better fit than the 1-variable fit which used x alone.</p>
<p>We did, however, get different recommendations from forward and backward selection. And yet their fitted equations were visually indistinguishable.</p>
<p>When we orthogonalized the design matrix, we discovered that we had a new problem: we could only get five orthogonal columns, including the constant one.</p>
<p>Still, we were able to run regressions with just the created variables. Multicollinearity was eliminated, and we again got a good regression with multiple variables, this time with 3 instead of 4. And, this time we had nice coefficients.</p>
<p>I showed that the original 4-variable fit appeared to match the orthogonalized 3-variable fit.</p>
<p>In other words, orthogonalizing the data gives nicer equations, but the fitted values are effectively the same. We can eliminate multicollinearity, but we could not effectively improve on the original horrible-looking equations.</p>
<p>Next time, I hope to show you how a simple change to the x-values can also clean up our horrible-looking equations.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rip94550.wordpress.com/8017/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rip94550.wordpress.com/8017/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rip94550.wordpress.com/8017/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rip94550.wordpress.com/8017/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rip94550.wordpress.com/8017/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rip94550.wordpress.com/8017/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rip94550.wordpress.com/8017/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rip94550.wordpress.com/8017/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rip94550.wordpress.com/8017/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rip94550.wordpress.com/8017/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rip94550.wordpress.com/8017/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rip94550.wordpress.com/8017/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rip94550.wordpress.com/8017/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rip94550.wordpress.com/8017/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&amp;blog=2063738&amp;post=8017&amp;subd=rip94550&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rip94550.wordpress.com/2012/01/02/regression-1-archer-daniel-midlands-polynomials-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eda25c1223d5c501eea15aab3feba8ac?s=96&#38;d=monsterid" medium="image">
			<media:title type="html">rip</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-1.png" medium="image">
			<media:title type="html">reg 1 2 1</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-2.png" medium="image">
			<media:title type="html">reg 1 2 2</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-3.png" medium="image">
			<media:title type="html">reg 1 2 3</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-4.png" medium="image">
			<media:title type="html">reg 1 2 4</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-5.png" medium="image">
			<media:title type="html">reg 1 2 5</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-6.png" medium="image">
			<media:title type="html">reg 1 2 6</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-7.png" medium="image">
			<media:title type="html">reg 1 2 7</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-8.png" medium="image">
			<media:title type="html">reg 1 2 8</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-9.png" medium="image">
			<media:title type="html">reg 1 2 9</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-10.png" medium="image">
			<media:title type="html">reg 1 2 10</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-11.png" medium="image">
			<media:title type="html">reg 1 2 11</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-12.png" medium="image">
			<media:title type="html">reg 1 2 12</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-13.png" medium="image">
			<media:title type="html">reg 1 2 13</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-14.png" medium="image">
			<media:title type="html">reg 1 2 14</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-15.png" medium="image">
			<media:title type="html">reg 1 2 15</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-16.png" medium="image">
			<media:title type="html">reg 1 2 16</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-17.png" medium="image">
			<media:title type="html">reg 1 2 17</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-18.png" medium="image">
			<media:title type="html">reg 1 2 18</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-19.png" medium="image">
			<media:title type="html">reg 1 2 19</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-20.png" medium="image">
			<media:title type="html">reg 1 2 20</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-21.png" medium="image">
			<media:title type="html">reg 1 2 21</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-22.png" medium="image">
			<media:title type="html">reg 1 2 22</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-23.png" medium="image">
			<media:title type="html">reg 1 2 23</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-24.png" medium="image">
			<media:title type="html">reg 1 2 24</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-25.png" medium="image">
			<media:title type="html">reg 1 2 25</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-26.png" medium="image">
			<media:title type="html">reg 1 2 26</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-27.png" medium="image">
			<media:title type="html">reg 1 2 27</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-28.png" medium="image">
			<media:title type="html">reg 1 2 28</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-29.png" medium="image">
			<media:title type="html">reg 1 2 29</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-30.png" medium="image">
			<media:title type="html">reg 1 2 30</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-31.png" medium="image">
			<media:title type="html">reg 1 2 31</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-32.png" medium="image">
			<media:title type="html">reg 1 2 32</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-33.png" medium="image">
			<media:title type="html">reg 1 2 33</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-34.png" medium="image">
			<media:title type="html">reg 1 2 34</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-35.png" medium="image">
			<media:title type="html">reg 1 2 35</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-36.png" medium="image">
			<media:title type="html">reg 1 2 36</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-37.png" medium="image">
			<media:title type="html">reg 1 2 37</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-38.png" medium="image">
			<media:title type="html">reg 1 2 38</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-39.png" medium="image">
			<media:title type="html">reg 1 2 39</media:title>
		</media:content>

		<media:content url="http://rip94550.files.wordpress.com/2011/12/reg-1-2-40.png" medium="image">
			<media:title type="html">reg 1 2 40</media:title>
		</media:content>
	</item>
		<item>
		<title>Happenings – 2011 New Year&#8217;s Eve</title>
		<link>http://rip94550.wordpress.com/2011/12/31/happenings-2011-new-years-eve/</link>
		<comments>http://rip94550.wordpress.com/2011/12/31/happenings-2011-new-years-eve/#comments</comments>
		<pubDate>Sat, 31 Dec 2011 17:58:20 +0000</pubDate>
		<dc:creator>rip</dc:creator>
				<category><![CDATA[diary]]></category>

		<guid isPermaLink="false">http://rip94550.wordpress.com/?p=8093</guid>
		<description><![CDATA[Well, I was off work this entire week. I should have a post for this coming Monday&#8230; but I still have to write a summary for it. I should even have a post for the following Monday&#8230; but in that case I actually have to write almost all of the connecting narrative. The images have [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&amp;blog=2063738&amp;post=8093&amp;subd=rip94550&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Well, I was off work this entire week. I should have a post for this coming Monday&#8230; but I still have to write a summary for it. I should even have a post for the following Monday&#8230; but in that case I actually have to write almost all of the connecting narrative. The images have already been uploaded and inserted, but I have yet to explain what they are and what I&#8217;m doing.</p>
<p>I&#8217;ve continued playing with fractional linear transformations, categories, circuit theory, and linear programming. In particular, I might be right on the edge of understanding one last detail in what I want to show you about linear programming.</p>
<p>And, in a blinding flash of insight, it is clear to me why barycentric coordinates are not unique unless we use triangles. <a href="http://rip94550.wordpress.com/2009/02/02/questions-–-early-february/#more-1172">I asked that question back in February 2009</a>, toyed with it for a little while, put it down and moved on. And I really did move on, thinking about the question only when something reminded me of it.</p>
<p>Simply put&#8230; take a rectangle, cut it into 2 triangles with one of the diagonals, and then draw a point inside one of the triangles. Well, using barycentric coordinates based on the triangle which contains the point, all of its coordinates are between 0 and 1&#8230; but using barycentric coordinates based on the other triangle, one of its coordinates is greater than 1 because it&#8217;s outside the diagonal edge of that triangle.</p>
<p>In other words, if we want to use rectangles to cut up something (say for finite elements), and if we want to use barycentric coordinates, then within each rectangle we would have to define a triangle to select one specific set of coordinates. We might as well use triangles in the 1st place.</p>
<p>Mathematics, however, is not the only thing I do in this week between Christmas and New Year&#8217;s Day. This is when I write an end of the year letter to serve as a Christmas card. I&#8217;m still working on it&#8230; I don&#8217;t have much time for mathematics for the rest of this weekend&#8230; possibly not for much of this coming week. That&#8217;s one reason I have 2 posts already in stage V&#8230; so I don&#8217;t have to do very much other than my letter for a while.</p>
<p>And so, for a change, this post closes with: I&#8217;m off to do some non-mathematical writing.</p>
<p>Happy New Year.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rip94550.wordpress.com/8093/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rip94550.wordpress.com/8093/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rip94550.wordpress.com/8093/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rip94550.wordpress.com/8093/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rip94550.wordpress.com/8093/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rip94550.wordpress.com/8093/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rip94550.wordpress.com/8093/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rip94550.wordpress.com/8093/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rip94550.wordpress.com/8093/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rip94550.wordpress.com/8093/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rip94550.wordpress.com/8093/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rip94550.wordpress.com/8093/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rip94550.wordpress.com/8093/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rip94550.wordpress.com/8093/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&amp;blog=2063738&amp;post=8093&amp;subd=rip94550&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rip94550.wordpress.com/2011/12/31/happenings-2011-new-years-eve/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eda25c1223d5c501eea15aab3feba8ac?s=96&#38;d=monsterid" medium="image">
			<media:title type="html">rip</media:title>
		</media:content>
	</item>
		<item>
		<title>Happenings – 2011 Christmas Day</title>
		<link>http://rip94550.wordpress.com/2011/12/25/happenings-2011-christmas-day/</link>
		<comments>http://rip94550.wordpress.com/2011/12/25/happenings-2011-christmas-day/#comments</comments>
		<pubDate>Sun, 25 Dec 2011 19:38:52 +0000</pubDate>
		<dc:creator>rip</dc:creator>
				<category><![CDATA[diary]]></category>

		<guid isPermaLink="false">http://rip94550.wordpress.com/?p=8002</guid>
		<description><![CDATA[Merry Christmas, or happy winter solstice celebration, whichever you prefer, if you have a preference and if you observe a holiday. This post is a day late because I was very lazy yesterday. I watched the Steelers shut out their opponent, instead of working on this post. Afterwards, I just puttered around the house. I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&amp;blog=2063738&amp;post=8002&amp;subd=rip94550&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Merry Christmas, or happy winter solstice celebration, whichever you prefer, if you have a preference and if you observe a holiday.</p>
<p>This post is a day late because I was very lazy yesterday. I watched the Steelers shut out their opponent, instead of working on this post. Afterwards, I just puttered around the house.</p>
<p>I expect to be having dinner with friends this evening, but I&#8217;ve decided to make up for yesterday even though it&#8217;s Christmas, and do what I should have done yesterday.</p>
<p>Last weekend and during the week, mathematically&#8230;<br />
<span id="more-8002"></span><br />
I continued working on a 2nd example of polynomial regression. As I said before, it is a juicier example than I originally realized. That&#8217;s still true, even though I found a typo in my Mathematica commands and the computational results are nicer than I had thought. Nevertheless, I think this will be an illuminating example.</p>
<p>It&#8217;s also complicated enough that it will span three posts. I was having trouble keeping track of all the things I had done – which is a clear and powerful signal that I have done too much for one post.</p>
<p>I am amused to see that on Dec 3 I said I had &#8220;2 small examples of multicollinearity when we try to fit polynomials to data&#8221;. Well, they are small – the second one, yet to come, has only 8 observations – but I will not try to cram the discussion and computations into one post.</p>
<p>I&#8217;ve also tracked down three – not just one – quantitative illustrations of the Higgs mechanism in three of my books. My situation, however, is that while I can follow the mathematics&#8230; I cannot justify the mathematics. I still might decide to post one of these illustrations, even before I understand it, just because it is so darned interesting and timely. After all, the Higgs particle is what gives their mass to all the other particles that have mass. Way cool, huh?</p>
<p>My undergraduate alter ego hasn&#8217;t done any more circuit theory; my perpetual student has picked up linear programming again&#8230; reading instead of trying to compute&#8230; but I&#8217;m getting an itch to start computing, of course.</p>
<p>Now let me show you the generalized Stokes&#8217; theorem. It subsumes more familiar equations – from undergraduate physics – involving the gradient, curl, and divergence of vector fields. They can all be replaced by one equation – and a geek should know that.</p>
<p>Let me begin by reminding you (you who have had electromagnetism in college) of the divergence theorem&#8230; also called Gauss&#8217; theorem. In words, as applied to electromagnetism, it said that the flux of the electric field through the surface S of a volume V was proportional to the charge contained in the volume:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cint_S+E%5Ccdot+%5C%2C+dA+%3D+4+%5Cpi+%5Cint_V+%5Crho+%5C%2CdV%5C+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='&#92;int_S E&#92;cdot &#92;, dA = 4 &#92;pi &#92;int_V &#92;rho &#92;,dV&#92; ' title='&#92;int_S E&#92;cdot &#92;, dA = 4 &#92;pi &#92;int_V &#92;rho &#92;,dV&#92; ' class='latex' />.</p>
<p>The mathematical statement, however, is that the integral over the surface of the (normal component of the) electric field is equal to the integral of the divergence of the electric field over the volume bounded by the surface:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cint_S+E+%5Ccdot+%5C%2C+dA+%3D+%5Cint_V+div+E+%5C%2CdV%5C+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='&#92;int_S E &#92;cdot &#92;, dA = &#92;int_V div E &#92;,dV&#92; ' title='&#92;int_S E &#92;cdot &#92;, dA = &#92;int_V div E &#92;,dV&#92; ' class='latex' />.</p>
<p>The Maxwell&#8217;s equation</p>
<p><img src='http://s0.wp.com/latex.php?latex=div+E+%3D+4+%5Cpi+%5Crho&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='div E = 4 &#92;pi &#92;rho' title='div E = 4 &#92;pi &#92;rho' class='latex' /></p>
<p>says that those two right-hand-sides are equal. That equality is what gets the usual electromagnetic statement from the general math statement.</p>
<p>Then there is Faraday&#8217;s Law of Induction: the rate of change of the magnetic flux through an area A is proportional to the induced electromotive force along the curve C bounding the area:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cint_C+E+%5Ccdot+%5C%2C+ds+%3D+-%5Cfrac%7B1%7D%7Bc%7D+%5Cfrac%7Bd%7D%7Bdt%7D+%5Cint_A+B+%5C%2CdA%5C+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='&#92;int_C E &#92;cdot &#92;, ds = -&#92;frac{1}{c} &#92;frac{d}{dt} &#92;int_A B &#92;,dA&#92; ' title='&#92;int_C E &#92;cdot &#92;, ds = -&#92;frac{1}{c} &#92;frac{d}{dt} &#92;int_A B &#92;,dA&#92; ' class='latex' />.</p>
<p>(A changing magnetic field generates a voltage drop, which generates a current.)</p>
<p>The mathematical equation (Stokes Theorem, Green&#8217;s Theorem) is that</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cint_C+E+%5Ccdot+%5C%2C+ds+%3D+%5Cint_A+curl+E+%5C%2CdA+%5C+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='&#92;int_C E &#92;cdot &#92;, ds = &#92;int_A curl E &#92;,dA &#92; ' title='&#92;int_C E &#92;cdot &#92;, ds = &#92;int_A curl E &#92;,dA &#92; ' class='latex' />.</p>
<p>and we get from the math to the physics using the Maxwell&#8217;s equation</p>
<p><img src='http://s0.wp.com/latex.php?latex=curl+E+%3D+-%5Cfrac%7B1%7D%7Bc%7D+%5Cfrac%7B%5Cpartial+B%7D+%7B%5Cpartial+t%7D%5C+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='curl E = -&#92;frac{1}{c} &#92;frac{&#92;partial B} {&#92;partial t}&#92; ' title='curl E = -&#92;frac{1}{c} &#92;frac{&#92;partial B} {&#92;partial t}&#92; ' class='latex' />.</p>
<p>Finally, there are two similar equations, one of which I hope we take utterly for granted after freshman calculus. That one is the Fundamental Theorem of Integral Calculus:</p>
<p><img src='http://s0.wp.com/latex.php?latex=F%28b%29+-+F%28a%29+%3D+%5Cint_a%5Eb+F%27%28x%29+%5C%2C+dx%5C+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='F(b) - F(a) = &#92;int_a^b F&#039;(x) &#92;, dx&#92; ' title='F(b) - F(a) = &#92;int_a^b F&#039;(x) &#92;, dx&#92; ' class='latex' />.</p>
<p>The other is a generalization of that from the interval [a,b] to a curve C:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5CDelta+%5Cvarphi+%3D+%5Cvarphi%28b%29+-+%5Cvarphi%28a%29+%3D+%5Cint_C+grad+%5Cvarphi%28s%29+%5C%2C+ds%5C+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='&#92;Delta &#92;varphi = &#92;varphi(b) - &#92;varphi(a) = &#92;int_C grad &#92;varphi(s) &#92;, ds&#92; ' title='&#92;Delta &#92;varphi = &#92;varphi(b) - &#92;varphi(a) = &#92;int_C grad &#92;varphi(s) &#92;, ds&#92; ' class='latex' />.</p>
<p>(Some of you have been using that last equation since high school&#8230; you didn&#8217;t do the integral over the given path, you used a simpler path for which the potential difference <img src='http://s0.wp.com/latex.php?latex=%5CDelta+%5Cvarphi%5C+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='&#92;Delta &#92;varphi&#92; ' title='&#92;Delta &#92;varphi&#92; ' class='latex' /> was obvious: the change in gravitational potential energy is independent of the path taken; whether something travels down a playground slide or gets dropped straight down from the top of the slide, it hits the ground with the same speed.)</p>
<p>What do all these equations have in common?</p>
<p>One integral in n-dimensions, and the other integral in (n-1)-dimensions. We had a volume and the surface bounding it; an area and the curve bounding it; an interval and the endpoints bounding it; a curve and the endpoints bounding it. On the one side we had a function, and on the other some differential operator applied to it.</p>
<p>The generalized Stokes&#8217; Theorem is written</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cint_%7B%5Cpartial+M%7D+%5C%2C+%5Comega+%3D+%5Cint_M+%5C%2Cd%5Comega%5C+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='&#92;int_{&#92;partial M} &#92;, &#92;omega = &#92;int_M &#92;,d&#92;omega&#92; ' title='&#92;int_{&#92;partial M} &#92;, &#92;omega = &#92;int_M &#92;,d&#92;omega&#92; ' class='latex' />.</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cpartial+M+%5C+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='&#92;partial M &#92; ' title='&#92;partial M &#92; ' class='latex' /> is the boundary of the &#8220;manifold&#8221; M – where the term manifold encompasses intervals, paths, areas, volumes, and on to higher dimensions; and d is the exterior derivative of the form <img src='http://s0.wp.com/latex.php?latex=%5Comega%5C+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='&#92;omega&#92; ' title='&#92;omega&#92; ' class='latex' /> – where a &#8220;form&#8221; encompasses anything we can integrate over.</p>
<p>Depending on <img src='http://s0.wp.com/latex.php?latex=%5Comega+%5C+%2C+d%5Comega+%5C+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='&#92;omega &#92; , d&#92;omega &#92; ' title='&#92;omega &#92; , d&#92;omega &#92; ' class='latex' /> turns out to be the ordinary derivative, the gradient, the curl, or the divergence.</p>
<p>As with most of my growing list of things a geek should know about mathematics, it isn&#8217;t just an equation or four – it&#8217;s that little extra. In this case, I think a geek should know the generalized Stokes theorem – not just its special cases.</p>
<p>That is, the equations</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cint_S+E+%5Ccdot+%5C%2C+dA+%3D+%5Cint_V+div+E+%5C%2CdV%5C+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='&#92;int_S E &#92;cdot &#92;, dA = &#92;int_V div E &#92;,dV&#92; ' title='&#92;int_S E &#92;cdot &#92;, dA = &#92;int_V div E &#92;,dV&#92; ' class='latex' /></p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cint_C+E+%5Ccdot+%5C%2C+ds+%3D+%5Cint_A+curl+E+%5C%2CdA+%5C+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='&#92;int_C E &#92;cdot &#92;, ds = &#92;int_A curl E &#92;,dA &#92; ' title='&#92;int_C E &#92;cdot &#92;, ds = &#92;int_A curl E &#92;,dA &#92; ' class='latex' /></p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cvarphi%28b%29+-+%5Cvarphi%28a%29+%3D+%5Cint_C+grad+%5Cvarphi%28s%29+%5C%2C+ds%5C+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='&#92;varphi(b) - &#92;varphi(a) = &#92;int_C grad &#92;varphi(s) &#92;, ds&#92; ' title='&#92;varphi(b) - &#92;varphi(a) = &#92;int_C grad &#92;varphi(s) &#92;, ds&#92; ' class='latex' /></p>
<p><img src='http://s0.wp.com/latex.php?latex=F%28b%29+-+F%28a%29+%3D+%5Cint_a%5Eb+F%27%28x%29+%5C%2C+dx%5C+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='F(b) - F(a) = &#92;int_a^b F&#039;(x) &#92;, dx&#92; ' title='F(b) - F(a) = &#92;int_a^b F&#039;(x) &#92;, dx&#92; ' class='latex' /></p>
<p>are all special cases of</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cint_%7B%5Cpartial+M%7D+%5C%2C+%5Comega+%3D+%5Cint_M+%5C%2Cd%5Comega%5C+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='&#92;int_{&#92;partial M} &#92;, &#92;omega = &#92;int_M &#92;,d&#92;omega&#92; ' title='&#92;int_{&#92;partial M} &#92;, &#92;omega = &#92;int_M &#92;,d&#92;omega&#92; ' class='latex' />.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rip94550.wordpress.com/8002/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rip94550.wordpress.com/8002/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rip94550.wordpress.com/8002/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rip94550.wordpress.com/8002/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rip94550.wordpress.com/8002/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rip94550.wordpress.com/8002/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rip94550.wordpress.com/8002/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rip94550.wordpress.com/8002/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rip94550.wordpress.com/8002/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rip94550.wordpress.com/8002/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rip94550.wordpress.com/8002/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rip94550.wordpress.com/8002/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rip94550.wordpress.com/8002/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rip94550.wordpress.com/8002/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&amp;blog=2063738&amp;post=8002&amp;subd=rip94550&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rip94550.wordpress.com/2011/12/25/happenings-2011-christmas-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eda25c1223d5c501eea15aab3feba8ac?s=96&#38;d=monsterid" medium="image">
			<media:title type="html">rip</media:title>
		</media:content>
	</item>
		<item>
		<title>Happenings – 2011 Dec 17</title>
		<link>http://rip94550.wordpress.com/2011/12/17/happenings-2011-dec-17/</link>
		<comments>http://rip94550.wordpress.com/2011/12/17/happenings-2011-dec-17/#comments</comments>
		<pubDate>Sat, 17 Dec 2011 21:24:33 +0000</pubDate>
		<dc:creator>rip</dc:creator>
				<category><![CDATA[diary]]></category>

		<guid isPermaLink="false">http://rip94550.wordpress.com/?p=7981</guid>
		<description><![CDATA[Let&#8217;s see. Last week&#8217;s happenings post seems a bit brusque to me. Perhaps I was just impatient to get it out there&#8230; perhaps it reflects that my dictating is more leisurely than my typing. I haven&#8217;t said this in a while: I generally use &#8220;Dragon Dictate&#8221; to create text, rather than trying to type. Last [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&amp;blog=2063738&amp;post=7981&amp;subd=rip94550&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s see. Last week&#8217;s happenings post seems a bit brusque to me. Perhaps I was just impatient to get it out there&#8230; perhaps it reflects that my dictating is more leisurely than my typing. </p>
<p>I haven&#8217;t said this in a while: I generally use &#8220;Dragon Dictate&#8221; to create text, rather than trying to type. Last week&#8217;s happenings post, however, was completely typed.</p>
<p>Or I might have been a little annoyed that I wasn&#8217;t able to talk about either Stokes&#8217; theorem or the Axiom of Choice – and, at best, I will be lucky to write about Stokes theorem today. (It&#8217;s another piece of mathematics I think a geek should know.)</p>
<p>We&#8217;ll see how the draft develops.</p>
<p>For those of us even remotely interested in particle physics&#8230; it appears that the large hadron collider has seen something at 125 GeV. It could be the Higgs particle. Peter Woit&#8217;s blog, as usual, <a href="http://www.math.columbia.edu/~woit/wordpress/?p=4282">has something to say about it</a> and provides a lot of links.<br />
<span id="more-7981"></span><br />
(I remember making a note that one of my particle physics books has a promising discussion of how the Higgs particle imparts mass to the other particles in The Standard Model. That is what it&#8217;s for. And &#8220;promising&#8221; only means I thought I might be able to follow the derivation.)</p>
<p>For those of us even remotely interested in being passengers on commercial airliners&#8230; someone has published the complete transcript of the black box recording of the crash of Air France flight 447. <a href="http://www.economist.com/blogs/gulliver/2011/10/air-france-flight-447">The Economist has a nice discussion.</a> He&#8217;s catching a lot of flak&#8230; because a brutal summary of the crash would be: the autopilot turned itself off, and the pilots did not know how to fly the plane manually.</p>
<p>A less than brutal summary would add: the autopilot turned itself off because the instrument readings were too strange, so the pilots were faced with severe instrument failures, at night. I can certainly believe that &#8220;instrument flying&#8221; would be damned hard when the instrument readings are unreliable. Still, if the autopilot can turn itself off because things are bad, we should expect that a pilot might be handed the plane in conditions too bad for the autopilot.</p>
<p>My alter ego the kid has been looking at Lawvere and Schanuel&#8217;s &#8220;Conceptual Mathematics&#8221; – an iconoclastic undergraduate introduction to category theory, by one of the masters.</p>
<p>He&#8217;s also been looking at Ullrich&#8217;s &#8220;Complex Made Simple&#8221; – which might have given me the final clue I need for getting Mathematica to cope with fractional linear transformations. They are of the form</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Ba+z+%2B+b%7D%7Bc+z+%2B+d%7D%5C+&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='&#92;frac{a z + b}{c z + d}&#92; ' title='&#92;frac{a z + b}{c z + d}&#92; ' class='latex' />, with ad &#8211; bc ≠ 0, and z a complex number</p>
<p>&#8230; and the challenge is to figure out the 4 coefficients for a transformation which moves a specified set of points in a specified way. I haven&#8217;t tried it in a while&#8230; it might&#8217;ve been 8 years ago or so&#8230; but it didn&#8217;t work very well then. Maybe I&#8217;m ready to try again.</p>
<p>I&#8217;ve been feeling frustrated about how little mathematics I get done&#8230; and then I realized that I have a substantial amount of material which my undergraduate alter ego has worked out: group theory, strength of materials, lie algebra, and now circuit theory. In other words, my  publishing can&#8217;t keep up with even the undergraduate material I&#8217;m going through, and yet I am feeling that I should be getting through even more material.</p>
<p>One of the framed quotations on my wall comes from &#8220;Life&#8217;s Little Instruction Book&#8221; by Brown. (It&#8217;s in my bibliography.)</p>
<blockquote><p>If you&#8217;re going after Moby Dick, take along the tartar sauce.</p></blockquote>
<p>What it means is, plan on success. (Don&#8217;t quibble that Moby Dick wasn&#8217;t a fish, so tartar sauce might be the wrong condiment; that misses the point.)</p>
<p>I finally realized why I like that quotation. Oh, I liked it enough to frame it, but I didn&#8217;t know why it mattered so much to me.</p>
<p>I have no hope, of course, of understanding all of mathematics. Hell, I have no hope of understanding all of the math books I already own.</p>
<p>The good side of that is that I am free to study whatever math I want to, because I can never learn all of it.</p>
<p>The bad side of that is that I am apparently chasing Moby Dick&#8230; my pursuit of mathematics is a lost cause.</p>
<p>I exaggerate. The key, however, is that although I cannot learn all of it, I&#8217;m not willing to rule out any part of mathematics or its applications. Despite knowing that I will never understand all my technical books, I will continue buying more, and having a go at whatever strikes my fancy.</p>
<p>(So I know what Moby Dick represents. Now if I could only figure out what the tartar sauce is&#8230;.)</p>
<blockquote><p>If you don&#8217;t like the answer, change the question.</p></blockquote>
<p>(from an episode of Numb3rs.)</p>
<p>My doing mathematics isn&#8217;t about the destination – it&#8217;s about the journey. I try to take pleasure on a daily basis.</p>
<p>My alter ego the kid has a lot of fun just looking at things&#8230; and my alter ego the undergraduate derives a lot of satisfaction from solving (admittedly elementary) problems&#8230; and I&#8217;m still working with regression, and putting out posts&#8230; and soon regression will be replaced by another topic.</p>
<p>Well, it&#8217;s after noon, and although my draft of this post included the generalized Stokes&#8217;s theorem – required for geeks – I&#8217;ll not try polishing or publishing it today.</p>
<p>Now let me try working on Monday&#8217;s post&#8230; more about fitting polynomials to data&#8230; or maybe I&#8217;ll track down that &#8220;easy&#8221; derivation of how the Higgs field gives mass to other particles&#8230;.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rip94550.wordpress.com/7981/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rip94550.wordpress.com/7981/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rip94550.wordpress.com/7981/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rip94550.wordpress.com/7981/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rip94550.wordpress.com/7981/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rip94550.wordpress.com/7981/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rip94550.wordpress.com/7981/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rip94550.wordpress.com/7981/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rip94550.wordpress.com/7981/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rip94550.wordpress.com/7981/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rip94550.wordpress.com/7981/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rip94550.wordpress.com/7981/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rip94550.wordpress.com/7981/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rip94550.wordpress.com/7981/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rip94550.wordpress.com&amp;blog=2063738&amp;post=7981&amp;subd=rip94550&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rip94550.wordpress.com/2011/12/17/happenings-2011-dec-17/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eda25c1223d5c501eea15aab3feba8ac?s=96&#38;d=monsterid" medium="image">
			<media:title type="html">rip</media:title>
		</media:content>
	</item>
	</channel>
</rss>
