<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Removing the magic from Stirling&#8217;s formula</title>
	<atom:link href="http://gowers.wordpress.com/2008/02/01/removing-the-magic-from-stirlings-formula/feed/" rel="self" type="application/rss+xml" />
	<link>http://gowers.wordpress.com/2008/02/01/removing-the-magic-from-stirlings-formula/</link>
	<description>Mathematics related discussions</description>
	<pubDate>Fri, 04 Jul 2008 17:45:11 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
		<item>
		<title>By: gord</title>
		<link>http://gowers.wordpress.com/2008/02/01/removing-the-magic-from-stirlings-formula/#comment-1059</link>
		<dc:creator>gord</dc:creator>
		<pubDate>Tue, 08 Apr 2008 08:43:04 +0000</pubDate>
		<guid isPermaLink="false">http://gowers.wordpress.com/?p=20#comment-1059</guid>
		<description>Back to your question of why should nCr appear in integral of cos^n ...
If you look at cos^n [or other functions that approach 1 smoothly &#38; flatly from below...
and you keep reapplying them.. you get something that looks remarkably like a scaled 
right half of a normal distribution... [seems to shrink left at 1/sqrt n ]...

My point is, you get the same thing with (1-x^2)^n or  exp(-x*x/2) when raised to the n - the normal curve.

So to me, it seems like a product version of the central limit theorem - we keep reapplying by multiplying yet again by something roughly a normal distribution, and converges (nicely!) to the real normal distribution.

Turning the above sentence into math .. ie. stating why in the limit the repeated product converges to a scaled normal distribution... I havent done that yet - it might be obvious to others reading this blog ...


Great, stimulating discussion/exposion, thanks!
[apologies for lack of latex]</description>
		<content:encoded><![CDATA[<p>Back to your question of why should nCr appear in integral of cos^n &#8230;<br />
If you look at cos^n [or other functions that approach 1 smoothly &amp; flatly from below...<br />
and you keep reapplying them.. you get something that looks remarkably like a scaled<br />
right half of a normal distribution... [seems to shrink left at 1/sqrt n ]&#8230;</p>
<p>My point is, you get the same thing with (1-x^2)^n or  exp(-x*x/2) when raised to the n - the normal curve.</p>
<p>So to me, it seems like a product version of the central limit theorem - we keep reapplying by multiplying yet again by something roughly a normal distribution, and converges (nicely!) to the real normal distribution.</p>
<p>Turning the above sentence into math .. ie. stating why in the limit the repeated product converges to a scaled normal distribution&#8230; I havent done that yet - it might be obvious to others reading this blog &#8230;</p>
<p>Great, stimulating discussion/exposion, thanks!<br />
[apologies for lack of latex]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Romik</title>
		<link>http://gowers.wordpress.com/2008/02/01/removing-the-magic-from-stirlings-formula/#comment-1039</link>
		<dc:creator>Dan Romik</dc:creator>
		<pubDate>Mon, 03 Mar 2008 12:33:14 +0000</pubDate>
		<guid isPermaLink="false">http://gowers.wordpress.com/?p=20#comment-1039</guid>
		<description>Dear Prof. Gowers,

Gil Kalai told me about your demystification of Stirling's formula. Indeed, this easy result deserves to be better explained and understood, and I recall as an undergraduate I was quite frustrated at not being given a proper explanation for it. Then, about 10 years ago I discovered a new derivation of the constant sqrt(2 pi) which I believe to be slightly simpler than the one you presented, and conceptually better motivated, since it relates to the probabilistic viewpoint involving the central limit theorem. The difference with the approach you and a few of the readers mention is that I look at the cumulative probabilities of the symmetric binomial distribution instead of at just the "local" probabilities. By computing the sum of  the first half of the binomial coefficients in a given row in two ways (first, using the obvious symmetry, and second, using a simple integration formula that converges to the integral of the Gaussian distribution), one gets the constant immediately.

My proof appeared in the American Math. Monthly 107 (2000), 556--557, and can be found on my web site. I wonder if you and others will think that my approach is indeed simpler than integrating powers of cosine - I find it hard to be objective about this, but of course both approaches are quite easy. By the way, I apologize for the pompous title of my paper (so pompous that I'm embarrassed to write it here) - in my defense, I was 21 when I wrote it...</description>
		<content:encoded><![CDATA[<p>Dear Prof. Gowers,</p>
<p>Gil Kalai told me about your demystification of Stirling&#8217;s formula. Indeed, this easy result deserves to be better explained and understood, and I recall as an undergraduate I was quite frustrated at not being given a proper explanation for it. Then, about 10 years ago I discovered a new derivation of the constant sqrt(2 pi) which I believe to be slightly simpler than the one you presented, and conceptually better motivated, since it relates to the probabilistic viewpoint involving the central limit theorem. The difference with the approach you and a few of the readers mention is that I look at the cumulative probabilities of the symmetric binomial distribution instead of at just the &#8220;local&#8221; probabilities. By computing the sum of  the first half of the binomial coefficients in a given row in two ways (first, using the obvious symmetry, and second, using a simple integration formula that converges to the integral of the Gaussian distribution), one gets the constant immediately.</p>
<p>My proof appeared in the American Math. Monthly 107 (2000), 556&#8211;557, and can be found on my web site. I wonder if you and others will think that my approach is indeed simpler than integrating powers of cosine - I find it hard to be objective about this, but of course both approaches are quite easy. By the way, I apologize for the pompous title of my paper (so pompous that I&#8217;m embarrassed to write it here) - in my defense, I was 21 when I wrote it&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: malkarouri</title>
		<link>http://gowers.wordpress.com/2008/02/01/removing-the-magic-from-stirlings-formula/#comment-1033</link>
		<dc:creator>malkarouri</dc:creator>
		<pubDate>Wed, 27 Feb 2008 22:31:39 +0000</pubDate>
		<guid isPermaLink="false">http://gowers.wordpress.com/?p=20#comment-1033</guid>
		<description>The way I tend to remember this formula is by deriving it from equating the Poisson distribution with mean lambda by a Gaussian with mean and variance lambda. I first found this approach in David Mackay's Information Theory, Inference, and Learning Algorithms. It is magic alright, but at least it was short enough for me to remember.
I wonder if one substitutes a Binomial distribution instead would one get C(2n, n)?</description>
		<content:encoded><![CDATA[<p>The way I tend to remember this formula is by deriving it from equating the Poisson distribution with mean lambda by a Gaussian with mean and variance lambda. I first found this approach in David Mackay&#8217;s Information Theory, Inference, and Learning Algorithms. It is magic alright, but at least it was short enough for me to remember.<br />
I wonder if one substitutes a Binomial distribution instead would one get C(2n, n)?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laurens Gunnarsen</title>
		<link>http://gowers.wordpress.com/2008/02/01/removing-the-magic-from-stirlings-formula/#comment-1025</link>
		<dc:creator>Laurens Gunnarsen</dc:creator>
		<pubDate>Thu, 21 Feb 2008 20:20:58 +0000</pubDate>
		<guid isPermaLink="false">http://gowers.wordpress.com/?p=20#comment-1025</guid>
		<description>I can't help thinking that this is an especially apposite moment to insert a ringing recommendation for Robert M. Young's classic EXCURSIONS IN CALCULUS.  Not only does the book include the very derivation of Stirling's formula that Professor Gowers has presented here (on pp. 264-267), but it also offers several different approaches to deriving the deep and powerful Euler-Maclaurin summation formula, of which Stirling's formula is a straightforward corollary.  

In particular, on pp. 354-5 of his EXCURSIONS, Professor Young notes that summing the values of an analytic function f at the first n non-negative integers boils down to finding another function F related to it by 

f(x) = F(x + 1) - F(x) = F'(x) + (1/2!)F''(x) + (1/3!)F'''(x) + ... , 

since f(0) + f(1) + ... + f(n-1) is then just F(n) - F(0).  And now, to Euler, the striking formal resemblance between 

f(x) = F'(x) + (1/2!)F''(x) + (1/3!)F'''(x) + ... 

and 

y = x + ax^2 + bx^3 + ... 

naturally suggested solving for F in much the same way as one solves for x in terms of y in a power series of this sort.  One simply writes

x = y + ry^2 + sy^3 + ... , 

with r, s, ... undetermined constants, and substitutes this form into the power series.  Then one fixes r, s, ... successively by requiring the coefficients of terms of like degree to match on both sides of the equation.   

Of course there's more to it than this in the end, but it's hard to think of a more straightforward argument for putting 

F'(x) = f(x) + rf'(x) + sf''(x) + ... , 

and substituting back. And not only does this astonishingly simple idea actually work, it exposes the essence of the Euler-Maclaurin summation formula.</description>
		<content:encoded><![CDATA[<p>I can&#8217;t help thinking that this is an especially apposite moment to insert a ringing recommendation for Robert M. Young&#8217;s classic EXCURSIONS IN CALCULUS.  Not only does the book include the very derivation of Stirling&#8217;s formula that Professor Gowers has presented here (on pp. 264-267), but it also offers several different approaches to deriving the deep and powerful Euler-Maclaurin summation formula, of which Stirling&#8217;s formula is a straightforward corollary.  </p>
<p>In particular, on pp. 354-5 of his EXCURSIONS, Professor Young notes that summing the values of an analytic function f at the first n non-negative integers boils down to finding another function F related to it by </p>
<p>f(x) = F(x + 1) - F(x) = F&#8217;(x) + (1/2!)F&#8221;(x) + (1/3!)F&#8221;&#8217;(x) + &#8230; , </p>
<p>since f(0) + f(1) + &#8230; + f(n-1) is then just F(n) - F(0).  And now, to Euler, the striking formal resemblance between </p>
<p>f(x) = F&#8217;(x) + (1/2!)F&#8221;(x) + (1/3!)F&#8221;&#8217;(x) + &#8230; </p>
<p>and </p>
<p>y = x + ax^2 + bx^3 + &#8230; </p>
<p>naturally suggested solving for F in much the same way as one solves for x in terms of y in a power series of this sort.  One simply writes</p>
<p>x = y + ry^2 + sy^3 + &#8230; , </p>
<p>with r, s, &#8230; undetermined constants, and substitutes this form into the power series.  Then one fixes r, s, &#8230; successively by requiring the coefficients of terms of like degree to match on both sides of the equation.   </p>
<p>Of course there&#8217;s more to it than this in the end, but it&#8217;s hard to think of a more straightforward argument for putting </p>
<p>F&#8217;(x) = f(x) + rf&#8217;(x) + sf&#8221;(x) + &#8230; , </p>
<p>and substituting back. And not only does this astonishingly simple idea actually work, it exposes the essence of the Euler-Maclaurin summation formula.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gowers</title>
		<link>http://gowers.wordpress.com/2008/02/01/removing-the-magic-from-stirlings-formula/#comment-1024</link>
		<dc:creator>gowers</dc:creator>
		<pubDate>Wed, 20 Feb 2008 23:50:54 +0000</pubDate>
		<guid isPermaLink="false">http://gowers.wordpress.com/?p=20#comment-1024</guid>
		<description>That's slightly embarrassing as I have the book but haven't read that bit of it. But I would add to the previous comment that it is an excellent book in general, with beautiful discussions of bits of maths that often fall between the cracks of a typical undergraduate course. (For example, I was never taught the irrationality of pi and eventually learnt it from this book, where it formed part of a very interesting discussion of several related topics.)</description>
		<content:encoded><![CDATA[<p>That&#8217;s slightly embarrassing as I have the book but haven&#8217;t read that bit of it. But I would add to the previous comment that it is an excellent book in general, with beautiful discussions of bits of maths that often fall between the cracks of a typical undergraduate course. (For example, I was never taught the irrationality of pi and eventually learnt it from this book, where it formed part of a very interesting discussion of several related topics.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TSM</title>
		<link>http://gowers.wordpress.com/2008/02/01/removing-the-magic-from-stirlings-formula/#comment-1021</link>
		<dc:creator>TSM</dc:creator>
		<pubDate>Mon, 18 Feb 2008 23:54:38 +0000</pubDate>
		<guid isPermaLink="false">http://gowers.wordpress.com/?p=20#comment-1021</guid>
		<description>Speaking of rabbits, here is a reference:
Strange Curves, Counting Rabbits, and Other Mathematical Explorations,
Keith Ball, Princeton Univ Press,  2003.

Chapter 6 (pp 109-126) is an excellent, motivated, wonderfully illustrated expository account of the path traveled largely by Gowers to Stirling's formula. The Central Limit Theorem is discussed in the  previous chapter, and so the estimate of the middle binomial coefficient 2n choose n is available. His approach to Central Limit Theorem is also excellent, starting from coin-tossing, and leading to the standard improper double integral exploited for the normal distribution. Explicit use of the big-Oh notation is avoided.

Ball also mentions that historically this approach is backwards; the Central Limit Theorem was first established using Stirling-like ideas. Also, Stirling used the Wallis product formula. 

tsm [at] usna.edu</description>
		<content:encoded><![CDATA[<p>Speaking of rabbits, here is a reference:<br />
Strange Curves, Counting Rabbits, and Other Mathematical Explorations,<br />
Keith Ball, Princeton Univ Press,  2003.</p>
<p>Chapter 6 (pp 109-126) is an excellent, motivated, wonderfully illustrated expository account of the path traveled largely by Gowers to Stirling&#8217;s formula. The Central Limit Theorem is discussed in the  previous chapter, and so the estimate of the middle binomial coefficient 2n choose n is available. His approach to Central Limit Theorem is also excellent, starting from coin-tossing, and leading to the standard improper double integral exploited for the normal distribution. Explicit use of the big-Oh notation is avoided.</p>
<p>Ball also mentions that historically this approach is backwards; the Central Limit Theorem was first established using Stirling-like ideas. Also, Stirling used the Wallis product formula. </p>
<p>tsm [at] usna.edu</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://gowers.wordpress.com/2008/02/01/removing-the-magic-from-stirlings-formula/#comment-1012</link>
		<dc:creator>James</dc:creator>
		<pubDate>Sat, 16 Feb 2008 00:19:48 +0000</pubDate>
		<guid isPermaLink="false">http://gowers.wordpress.com/?p=20#comment-1012</guid>
		<description>Hi, 

I was wondering if you'd mind if I used your blog article on Stirling's formula for the next edition of "Eureka" (the journal of the Archimedeans undergrad. maths society here at Cambridge). It would most likely reach quite a broad audience of first years next year if you would consent. It might be worth appending David Speyer's remarks also.

Of course if there is something else you'd prefer I'm open to suggestions.

Contact me at archim-eureka-editor@srcf.ucam.org if you are interested.</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>I was wondering if you&#8217;d mind if I used your blog article on Stirling&#8217;s formula for the next edition of &#8220;Eureka&#8221; (the journal of the Archimedeans undergrad. maths society here at Cambridge). It would most likely reach quite a broad audience of first years next year if you would consent. It might be worth appending David Speyer&#8217;s remarks also.</p>
<p>Of course if there is something else you&#8217;d prefer I&#8217;m open to suggestions.</p>
<p>Contact me at <a href="mailto:archim-eureka-editor@srcf.ucam.org">archim-eureka-editor@srcf.ucam.org</a> if you are interested.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nilay</title>
		<link>http://gowers.wordpress.com/2008/02/01/removing-the-magic-from-stirlings-formula/#comment-1011</link>
		<dc:creator>Nilay</dc:creator>
		<pubDate>Thu, 14 Feb 2008 03:27:27 +0000</pubDate>
		<guid isPermaLink="false">http://gowers.wordpress.com/?p=20#comment-1011</guid>
		<description>I tried out the integration $latex \int_1^n\log x dx$. This evaluates to $latex n log n - n +1$. This would mean that this approximation is off by $latex n^{\frac{1}{2}}$.</description>
		<content:encoded><![CDATA[<p>I tried out the integration <img src='http://l.wordpress.com/latex.php?latex=%5Cint_1%5En%5Clog+x+dx&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='\int_1^n\log x dx' title='\int_1^n\log x dx' class='latex' />. This evaluates to <img src='http://l.wordpress.com/latex.php?latex=n+log+n+-+n+%2B1&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='n log n - n +1' title='n log n - n +1' class='latex' />. This would mean that this approximation is off by <img src='http://l.wordpress.com/latex.php?latex=n%5E%7B%5Cfrac%7B1%7D%7B2%7D%7D&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='n^{\frac{1}{2}}' title='n^{\frac{1}{2}}' class='latex' />.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Speyer</title>
		<link>http://gowers.wordpress.com/2008/02/01/removing-the-magic-from-stirlings-formula/#comment-1009</link>
		<dc:creator>David Speyer</dc:creator>
		<pubDate>Mon, 11 Feb 2008 18:50:30 +0000</pubDate>
		<guid isPermaLink="false">http://gowers.wordpress.com/?p=20#comment-1009</guid>
		<description>I just realized this morning that the resemblance of my argument to the central limit formula is more than superficial: Let $latex F(x)=e^{-x}$ for $latex x \geq 0$ and $latex F(x)=0$ for $x &#60; 0$. Then the $latex (n+1)$-fold convolution of $F$ with itself is $latex x^n e^{-x}/n!$ for $latex x \geq 0$ (and, of course, zero for negative $latex x$). So what I'm doing is basically verifying the central limit theorem by hand for independent eponentially distibuted random variables.</description>
		<content:encoded><![CDATA[<p>I just realized this morning that the resemblance of my argument to the central limit formula is more than superficial: Let <img src='http://l.wordpress.com/latex.php?latex=F%28x%29%3De%5E%7B-x%7D&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='F(x)=e^{-x}' title='F(x)=e^{-x}' class='latex' /> for <img src='http://l.wordpress.com/latex.php?latex=x+%5Cgeq+0&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='x \geq 0' title='x \geq 0' class='latex' /> and <img src='http://l.wordpress.com/latex.php?latex=F%28x%29%3D0&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='F(x)=0' title='F(x)=0' class='latex' /> for $x &lt; 0$. Then the <img src='http://l.wordpress.com/latex.php?latex=%28n%2B1%29&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='(n+1)' title='(n+1)' class='latex' />-fold convolution of $F$ with itself is <img src='http://l.wordpress.com/latex.php?latex=x%5En+e%5E%7B-x%7D%2Fn%21&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='x^n e^{-x}/n!' title='x^n e^{-x}/n!' class='latex' /> for <img src='http://l.wordpress.com/latex.php?latex=x+%5Cgeq+0&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='x \geq 0' title='x \geq 0' class='latex' /> (and, of course, zero for negative <img src='http://l.wordpress.com/latex.php?latex=x&amp;bg=ffffff&amp;fg=000000&amp;s=0' alt='x' title='x' class='latex' />). So what I&#8217;m doing is basically verifying the central limit theorem by hand for independent eponentially distibuted random variables.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gowers</title>
		<link>http://gowers.wordpress.com/2008/02/01/removing-the-magic-from-stirlings-formula/#comment-996</link>
		<dc:creator>gowers</dc:creator>
		<pubDate>Sun, 03 Feb 2008 12:55:33 +0000</pubDate>
		<guid isPermaLink="false">http://gowers.wordpress.com/?p=20#comment-996</guid>
		<description>Just realized that the beautiful argument given by David Speyer a few comments up is almost certainly essentially the same as the argument I alluded to using the central limit theorem: your/his main steps are to centre and rescale a distribution and use the Taylor expansion up to the second term to get a Gaussian coming out, just as one does in proving the central limit theorem itself. But the fact that it comes out quickly and directly like that is very nice. And I myself find the first step pretty natural -- if you've got the integral representation of the gamma function, then why not try to use it?</description>
		<content:encoded><![CDATA[<p>Just realized that the beautiful argument given by David Speyer a few comments up is almost certainly essentially the same as the argument I alluded to using the central limit theorem: your/his main steps are to centre and rescale a distribution and use the Taylor expansion up to the second term to get a Gaussian coming out, just as one does in proving the central limit theorem itself. But the fact that it comes out quickly and directly like that is very nice. And I myself find the first step pretty natural &#8212; if you&#8217;ve got the integral representation of the gamma function, then why not try to use it?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
