<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Innumeracy Revisited</title>
	<atom:link href="http://marknelson.us/2010/09/12/innumeracy-revisited/feed/" rel="self" type="application/rss+xml" />
	<link>http://marknelson.us/2010/09/12/innumeracy-revisited/</link>
	<description>Programming, mostly.</description>
	<lastBuildDate>Wed, 16 May 2012 08:30:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Mark Nelson</title>
		<link>http://marknelson.us/2010/09/12/innumeracy-revisited/comment-page-1/#comment-379104</link>
		<dc:creator>Mark Nelson</dc:creator>
		<pubDate>Sun, 25 Sep 2011 18:39:55 +0000</pubDate>
		<guid isPermaLink="false">http://marknelson.us/2010/09/12/innumeracy-revisited/#comment-379104</guid>
		<description>@E.A.Neonakis:

I believe that I can give you the most exhaustive treatement you will ever find in these two articles, which were followups to this one:

&lt;a href=&quot;http://marknelson.us/2011/01/17/20-heads-in-a-row-what-are-the-odds/&quot; class=&quot;newpage&quot; rel=&quot;nofollow&quot;&gt;20 Heads In a Row – What Are the Odds?&lt;/a&gt;

&lt;a href=&quot;http://marknelson.us/2011/02/14/a-big-problem-that-doesnt-need-a-bignum/&quot; class=&quot;newpage&quot; rel=&quot;nofollow&quot;&gt;A Big Problem That Doesn’t Need a Bignum&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>@E.A.Neonakis:</p>
<p>I believe that I can give you the most exhaustive treatement you will ever find in these two articles, which were followups to this one:</p>
<p><a href="http://marknelson.us/2011/01/17/20-heads-in-a-row-what-are-the-odds/" class="newpage" rel="nofollow">20 Heads In a Row – What Are the Odds?</a></p>
<p><a href="http://marknelson.us/2011/02/14/a-big-problem-that-doesnt-need-a-bignum/" class="newpage" rel="nofollow">A Big Problem That Doesn’t Need a Bignum</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: E.A.Neonakis</title>
		<link>http://marknelson.us/2010/09/12/innumeracy-revisited/comment-page-1/#comment-379103</link>
		<dc:creator>E.A.Neonakis</dc:creator>
		<pubDate>Sun, 25 Sep 2011 18:35:44 +0000</pubDate>
		<guid isPermaLink="false">http://marknelson.us/2010/09/12/innumeracy-revisited/#comment-379103</guid>
		<description>On December 30th 2010 user wrongrook published a very elegant python program to calculate the probability of a k heads run in n coin tosses. Unfortunately he did not offer any explanation or reference. I would be very grateful if provided us some comments or a reference to the algorithm used.</description>
		<content:encoded><![CDATA[<p>On December 30th 2010 user wrongrook published a very elegant python program to calculate the probability of a k heads run in n coin tosses. Unfortunately he did not offer any explanation or reference. I would be very grateful if provided us some comments or a reference to the algorithm used.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 20 Heads In a Row &#8211; What Are the Odds?</title>
		<link>http://marknelson.us/2010/09/12/innumeracy-revisited/comment-page-1/#comment-344682</link>
		<dc:creator>20 Heads In a Row &#8211; What Are the Odds?</dc:creator>
		<pubDate>Tue, 18 Jan 2011 02:44:39 +0000</pubDate>
		<guid isPermaLink="false">http://marknelson.us/2010/09/12/innumeracy-revisited/#comment-344682</guid>
		<description>[...] couple of weeks back I took issue with a statement in the New York Times Magazine:  If you have a million coin flips, it’s [...]</description>
		<content:encoded><![CDATA[<p>[...] couple of weeks back I took issue with a statement in the New York Times Magazine:  If you have a million coin flips, it’s [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Nelson</title>
		<link>http://marknelson.us/2010/09/12/innumeracy-revisited/comment-page-1/#comment-341955</link>
		<dc:creator>Mark Nelson</dc:creator>
		<pubDate>Thu, 30 Dec 2010 20:18:24 +0000</pubDate>
		<guid isPermaLink="false">http://marknelson.us/2010/09/12/innumeracy-revisited/#comment-341955</guid>
		<description>@wrongrook:

Thanks - this helps validate the number I got with my quick Java Bignum program.

I actually have a nice formula for the solution, along with a good explanation of how one arrives at it. However, the formula for the solution incorporates a 20-step Fibonacci number.

Mathematics says that the recurrence that defines the 20-step Fibonacci number has a closed-form solution, which I could then use to give the exact result. But I don&#039;t have the mental or computational horsepower to produce that solution.

- Mark</description>
		<content:encoded><![CDATA[<p>@wrongrook:</p>
<p>Thanks &#8211; this helps validate the number I got with my quick Java Bignum program.</p>
<p>I actually have a nice formula for the solution, along with a good explanation of how one arrives at it. However, the formula for the solution incorporates a 20-step Fibonacci number.</p>
<p>Mathematics says that the recurrence that defines the 20-step Fibonacci number has a closed-form solution, which I could then use to give the exact result. But I don&#8217;t have the mental or computational horsepower to produce that solution.</p>
<p>- Mark</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wrongrook</title>
		<link>http://marknelson.us/2010/09/12/innumeracy-revisited/comment-page-1/#comment-341952</link>
		<dc:creator>wrongrook</dc:creator>
		<pubDate>Thu, 30 Dec 2010 20:10:10 +0000</pubDate>
		<guid isPermaLink="false">http://marknelson.us/2010/09/12/innumeracy-revisited/#comment-341952</guid>
		<description>In Python:
[c]
P=[1.]+[0]*20
for n in xrange(10**6): P=[0.5*(1-P[20])]+[0.5*p for p in P[0:-2]]+[0.5*P[-2]+P[-1]]
print P[20]
[/c]
agrees with 37.9% prob for 20 heads in a million flips.

You may be interested in Project Euler problem 316 which relates to this problem.</description>
		<content:encoded><![CDATA[<p>In Python:</p>
<div class="igBar"><span id="lc-1"><a href="#" onclick="javascript:showPlainTxt('c-1'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">C:</span>
<div id="c-1">
<div class="c">
<ol>
<li class="li1">
<div class="de1">P=<span class="br0">&#91;</span><span class="nu0">1</span>.<span class="br0">&#93;</span>+<span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span>*<span class="nu0">20</span></div>
</li>
<li class="li2">
<div class="de2"><span class="kw1">for</span> n in xrange<span class="br0">&#40;</span><span class="nu0">10</span>**<span class="nu0">6</span><span class="br0">&#41;</span>: P=<span class="br0">&#91;</span><span class="nu0">0</span>.<span class="nu0">5</span>*<span class="br0">&#40;</span><span class="nu0">1</span>-P<span class="br0">&#91;</span><span class="nu0">20</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="br0">&#93;</span>+<span class="br0">&#91;</span><span class="nu0">0</span>.<span class="nu0">5</span>*p <span class="kw1">for</span> p in P<span class="br0">&#91;</span><span class="nu0">0</span>:-<span class="nu0">2</span><span class="br0">&#93;</span><span class="br0">&#93;</span>+<span class="br0">&#91;</span><span class="nu0">0</span>.<span class="nu0">5</span>*P<span class="br0">&#91;</span>-<span class="nu0">2</span><span class="br0">&#93;</span>+P<span class="br0">&#91;</span>-<span class="nu0">1</span><span class="br0">&#93;</span><span class="br0">&#93;</span></div>
</li>
<li class="li1">
<div class="de1">print P<span class="br0">&#91;</span><span class="nu0">20</span><span class="br0">&#93;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
agrees with 37.9% prob for 20 heads in a million flips.</p>
<p>You may be interested in Project Euler problem 316 which relates to this problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Nelson</title>
		<link>http://marknelson.us/2010/09/12/innumeracy-revisited/comment-page-1/#comment-332920</link>
		<dc:creator>Mark Nelson</dc:creator>
		<pubDate>Sun, 26 Sep 2010 22:05:34 +0000</pubDate>
		<guid isPermaLink="false">http://marknelson.us/2010/09/12/innumeracy-revisited/#comment-332920</guid>
		<description>Full explanation of this is going to have to wait for another post, but here is the synopsis:

My assumption was that p, the probability of a 20 head streak was 1/2^20 at every position in the imaginary million tosses. This was incorrect. This value of p is only true for the toss starting at position 1.

For positions 2 through 999,981, the value of p declines based on a complicated function. The good news is that the value of p quickly converges to a value somewhere around 1/2097131.

Plugging those numbers in mean that the chances of seeing the streak of 20 heads in a million tosses is more like 38% - considerably less than my previous solution of 62%. 

Gory details to follow.

- Mark</description>
		<content:encoded><![CDATA[<p>Full explanation of this is going to have to wait for another post, but here is the synopsis:</p>
<p>My assumption was that p, the probability of a 20 head streak was 1/2^20 at every position in the imaginary million tosses. This was incorrect. This value of p is only true for the toss starting at position 1.</p>
<p>For positions 2 through 999,981, the value of p declines based on a complicated function. The good news is that the value of p quickly converges to a value somewhere around 1/2097131.</p>
<p>Plugging those numbers in mean that the chances of seeing the streak of 20 heads in a million tosses is more like 38% - considerably less than my previous solution of 62%. </p>
<p>Gory details to follow.</p>
<p>- Mark</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Langowitz</title>
		<link>http://marknelson.us/2010/09/12/innumeracy-revisited/comment-page-1/#comment-332916</link>
		<dc:creator>Andy Langowitz</dc:creator>
		<pubDate>Sun, 26 Sep 2010 21:03:42 +0000</pubDate>
		<guid isPermaLink="false">http://marknelson.us/2010/09/12/innumeracy-revisited/#comment-332916</guid>
		<description>Mark, after my original post, I threw together a quick random simulation and ran a few thousand runs of a million coin flips (aren&#039;t computers today amazing!), and got a probability of about 38%, which, as you say, is even lower than the 60% you got, so your qualitative message still stands.

As an aside, I think your response to my correction should be trumpeted as a model of how to graciously accept corrections to errors in internet posts!  I have to confess that my first draft of my post to you was not nearly as admirable, and I&#039;m relieved that I edited it before posting.

Let&#039;s hear it for raising the level of numeracy all around!</description>
		<content:encoded><![CDATA[<p>Mark, after my original post, I threw together a quick random simulation and ran a few thousand runs of a million coin flips (aren't computers today amazing!), and got a probability of about 38%, which, as you say, is even lower than the 60% you got, so your qualitative message still stands.</p>
<p>As an aside, I think your response to my correction should be trumpeted as a model of how to graciously accept corrections to errors in internet posts!  I have to confess that my first draft of my post to you was not nearly as admirable, and I'm relieved that I edited it before posting.</p>
<p>Let's hear it for raising the level of numeracy all around!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Nelson</title>
		<link>http://marknelson.us/2010/09/12/innumeracy-revisited/comment-page-1/#comment-332912</link>
		<dc:creator>Mark Nelson</dc:creator>
		<pubDate>Sun, 26 Sep 2010 20:10:49 +0000</pubDate>
		<guid isPermaLink="false">http://marknelson.us/2010/09/12/innumeracy-revisited/#comment-332912</guid>
		<description>@Andy:

You are correct about my algorithm being off. This is a good news/bad news story.

The good news (for me) is that my system actually overestimates the probability of the sequence. The main point I was making was that the NY Times should have sensed right away that the figure was way off base - and that is still the case.

The bad news is that my simple formula is no good - although it does provide an upper bound for the probability, it is not correct. Probability usually boils down to being able to count things, and many mistakes in probability problems come about when you either count something twice or miss it altogether. My mistake was counting twice, and I&#039;ll be working out that in another post!

The really bad news is that I should have tested my algorithm using a simple case, as you did, in which case I would have seen the error right away.

But truthfully, whenever I have a post about innumeracy, I&#039;m happy when people find mistakes. It helps me clear up my thinking and ideally raises the level of numeracy all around.

- Mark</description>
		<content:encoded><![CDATA[<p>@Andy:</p>
<p>You are correct about my algorithm being off. This is a good news/bad news story.</p>
<p>The good news (for me) is that my system actually overestimates the probability of the sequence. The main point I was making was that the NY Times should have sensed right away that the figure was way off base - and that is still the case.</p>
<p>The bad news is that my simple formula is no good - although it does provide an upper bound for the probability, it is not correct. Probability usually boils down to being able to count things, and many mistakes in probability problems come about when you either count something twice or miss it altogether. My mistake was counting twice, and I'll be working out that in another post!</p>
<p>The really bad news is that I should have tested my algorithm using a simple case, as you did, in which case I would have seen the error right away.</p>
<p>But truthfully, whenever I have a post about innumeracy, I'm happy when people find mistakes. It helps me clear up my thinking and ideally raises the level of numeracy all around.</p>
<p>- Mark</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Langowitz</title>
		<link>http://marknelson.us/2010/09/12/innumeracy-revisited/comment-page-1/#comment-332906</link>
		<dc:creator>Andy Langowitz</dc:creator>
		<pubDate>Sun, 26 Sep 2010 15:59:36 +0000</pubDate>
		<guid isPermaLink="false">http://marknelson.us/2010/09/12/innumeracy-revisited/#comment-332906</guid>
		<description>Your reasoning is not correct.  Consider the simple case of at least two heads in a row when flipping 4 coins, which you use in the &quot;Probability 101&quot; paragraph to debunk the informal argument that 20 heads in a row is &quot;almost certain&quot;.  By listing the 16 possibilities and 
counting which ones have 2 or more heads in a row, the correct probability can be seen to be 1/2.  Your reasoning gives an incorrect answer of 1 - (3/4)^3.

The flaw in the reasoning is the assumption that the probability of coins 2 through n+1 being all heads is independent of whether coins 1 through n are all heads.  You are implicitly making this independence assumption by multiplying the probabilities together.

Now, in the case of 20 in a row out of a million, your analysis may be approximately correct, because the events you are multiplying may be close to independent, but I&#039;m not even sure of that.  I certainly hope it&#039;s close, now that you&#039;re on record in the New York Times with this result ;-)

I think the correct math is actually relatively complex.  See http://wizardofodds.com/askthewizard/images/streaks.pdf, who shows results of a discrete time Markov chain analysis of a similar problem.</description>
		<content:encoded><![CDATA[<p>Your reasoning is not correct.  Consider the simple case of at least two heads in a row when flipping 4 coins, which you use in the "Probability 101" paragraph to debunk the informal argument that 20 heads in a row is "almost certain".  By listing the 16 possibilities and<br />
counting which ones have 2 or more heads in a row, the correct probability can be seen to be 1/2.  Your reasoning gives an incorrect answer of 1 - (3/4)^3.</p>
<p>The flaw in the reasoning is the assumption that the probability of coins 2 through n+1 being all heads is independent of whether coins 1 through n are all heads.  You are implicitly making this independence assumption by multiplying the probabilities together.</p>
<p>Now, in the case of 20 in a row out of a million, your analysis may be approximately correct, because the events you are multiplying may be close to independent, but I'm not even sure of that.  I certainly hope it's close, now that you're on record in the New York Times with this result ;-)</p>
<p>I think the correct math is actually relatively complex.  See <a href="http://wizardofodds.com/askthewizard/images/streaks.pdf" rel="nofollow">http://wizardofodds.com/askthewizard/images/streaks.pdf</a>, who shows results of a discrete time Markov chain analysis of a similar problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Nelson</title>
		<link>http://marknelson.us/2010/09/12/innumeracy-revisited/comment-page-1/#comment-332102</link>
		<dc:creator>Mark Nelson</dc:creator>
		<pubDate>Mon, 13 Sep 2010 16:04:51 +0000</pubDate>
		<guid isPermaLink="false">http://marknelson.us/2010/09/12/innumeracy-revisited/#comment-332102</guid>
		<description>@David:

I was fooling around with the numbers in a spreadsheet and I saw the rapid convergence you speak of. I wasn&#039;t familiar with that identity, however, thanks!

- Mark</description>
		<content:encoded><![CDATA[<p>@David:</p>
<p>I was fooling around with the numbers in a spreadsheet and I saw the rapid convergence you speak of. I wasn't familiar with that identity, however, thanks!</p>
<p>- Mark</p>
]]></content:encoded>
	</item>
</channel>
</rss>

