<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1364629727248557844</id><updated>2011-07-28T23:32:47.113+10:00</updated><category term='packages'/><category term='multiplication'/><category term='computer geekery'/><category term='trig identities'/><category term='identity'/><category term='numbness'/><category term='bonehead rational approximation'/><category term='calculation'/><category term='slide rules'/><category term='statistics'/><category term='numbers'/><category term='digit sequences'/><category term='log-concave'/><category term='probability'/><category term='sum of squares'/><category term='Brahmagupta'/><category term='peeves'/><category term='R package'/><category term='Fibonacci'/><title type='text'>The Mathematical Bricoleur</title><subtitle type='html'>Mathematics is not some austere and perfect edifice, to be scaled only by the bravest of climbers. Mathematics is a human activity, and humans come in many kinds. This is hopefully something for us tinkerers and dabblers. I aim to collect together little trinkets and tidbits as I find or create them, but ultimately, whatever appeals to me. This is a blog about &lt;i&gt;stuff that works&lt;/i&gt;.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mathbric.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://mathbric.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>GB</name><uri>http://www.blogger.com/profile/01100913350264083875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>16</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1364629727248557844.post-2997603039740929509</id><published>2010-01-10T16:48:00.007+11:00</published><updated>2010-01-10T17:59:58.817+11:00</updated><title type='text'>Creating nomograms in R</title><content type='html'>This is actually a post-in-progress, but I am publishing it before it's ready so that people on the Nomography Discussion forum can come take a sneak preview. The post will probably be updated a couple of times.&lt;br /&gt;&lt;br /&gt;Below is a three-scale &lt;a href="http://en.wikipedia.org/wiki/Nomogram"&gt;nomogram&lt;/a&gt; I generated in R. Bitmap images (like this png) don't suit the text-at-an-angle of the &lt;I&gt;i&lt;/i&gt;-scale, and the angled tick-marks, but it's good enough to give the idea - it looks better as a vector-image:&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_y8B7MKebdC4/S0lqaDS_ayI/AAAAAAAAACI/L1JTH_RUoaA/s1600-h/dif2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 400px;" src="http://3.bp.blogspot.com/_y8B7MKebdC4/S0lqaDS_ayI/AAAAAAAAACI/L1JTH_RUoaA/s400/dif2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5424984221938576162" /&gt;&lt;/a&gt;(Click to obtain a slightly larger image)&lt;br /&gt;&lt;br /&gt;Here's a simple function to draw nomogram scales. It's a few lines longer than when I wrote about it before (I added scale labels in). I don't expect anyone to care about the details of the code, but even without taking advantage of the special aspects of R, it's worth seeing that the entire code is quite compact, and fairly easy to generalize further.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;curvaxis &lt;- function(x,y,v,axlab=" ",ltick=TRUE,axlt1=TRUE,thwid=.02){&lt;br /&gt;  lines(x,y)&lt;br /&gt;&lt;br /&gt;  yscale &lt;- diff(par("yaxp"))[1]&lt;br /&gt;  xscale &lt;- diff(par("xaxp"))[1]&lt;br /&gt;  yxscale &lt;- yscale/xscale&lt;br /&gt;&lt;br /&gt;# compute ticks&lt;br /&gt;  n &lt;- length(x)&lt;br /&gt;  tdif &lt;- function(x,n=length(x)) c(x[2]-x[1],x[3:n]-x[1:(n-2)],x[n]-x[n-1])&lt;br /&gt;&lt;br /&gt;  s &lt;- atan(-tdif(x)/tdif(y)*yxscale)&lt;br /&gt;  xd &lt;- cos(s)*thwid*xscale # could do this without trig functions&lt;br /&gt;  yd &lt;- sin(s)*thwid*yscale&lt;br /&gt;  xd &lt;- ifelse(tdif(y)!=0,xd,0)  &lt;br /&gt;  yd &lt;- ifelse(tdif(y)!=0,yd,thwid*yscale) # are we scaling right? some ticks look off&lt;br /&gt;&lt;br /&gt;  dmul &lt;- ifelse(ltick,-1,1)  &lt;br /&gt;  xadj &lt;- as.integer(ltick)&lt;br /&gt;  yadj &lt;- 0.5&lt;br /&gt;&lt;br /&gt;  lines(rbind(x,x+dmul*xd,rep(NA,n)),rbind(y,y+dmul*yd,rep(NA,n))) # draw tick-marks&lt;br /&gt;  text(x+dmul*xd*1.5,y+dmul*yd*1.5,v,adj=c(xadj,yadj),cex=0.8,srt=180/pi*mean(s))# tick labels&lt;br /&gt;  sg &lt;- sign(y[2]-y[1])&lt;br /&gt;  if(axlt1) {  #cludgy - this part does the scale labels&lt;br /&gt;    text(x[1]-2*sin(s[1])*thwid*xscale,y[1]-2*sg*cos(s[1])*thwid*yscale,axlab,cex=1.33,srt=0,crt=0)&lt;br /&gt;    }&lt;br /&gt;  else {&lt;br /&gt;    text(x[n]+2*sin(s[n])*thwid*xscale,y[n]+2*sg*cos(s[n])*thwid*yscale,axlab,cex=1.33,srt=0,crt=0)&lt;br /&gt;    } &lt;br /&gt;  }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And this is the code that calls it:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#set up data&lt;br /&gt;#variable 1&lt;br /&gt;i &lt;- .01*c(4:8,10,12,15,20)&lt;br /&gt;li &lt;- log(1+i)&lt;br /&gt;yi &lt;- -log(i)/(1+li)&lt;br /&gt;xi &lt;- li/(1+li)&lt;br /&gt;yi &lt;- yi-4*xi  # skew the plot a bit&lt;br /&gt;&lt;br /&gt;#variable 2&lt;br /&gt;n &lt;- 4:8&lt;br /&gt;yn &lt;- n-4&lt;br /&gt;xn &lt;- rep(1,length(n))&lt;br /&gt;&lt;br /&gt;#variable 3&lt;br /&gt;d &lt;- c(1:6,8,10,15,20)&lt;br /&gt;xd &lt;- rep(0,length(d))&lt;br /&gt;yd &lt;- log(d)-4*xd&lt;br /&gt;&lt;br /&gt;#scale the plot&lt;br /&gt;xmin &lt;- min(xd,xi,xn)&lt;br /&gt;xmax &lt;- max(xd,xi,xn)&lt;br /&gt;ymin &lt;- min(yd,yi,yn)&lt;br /&gt;ymax &lt;- max(yd,yi,yn)&lt;br /&gt;&lt;br /&gt;xl &lt;- xmin-0.02*(xmax-xmin)&lt;br /&gt;xu &lt;- xmax+0.02*(xmax-xmin)&lt;br /&gt;yl &lt;- ymin-0.02*(ymax-ymin)&lt;br /&gt;yu &lt;- ymax+0.02*(ymax-ymin)&lt;br /&gt;&lt;br /&gt;#draw the nomogram&lt;br /&gt;par(ann=FALSE, xaxt="n",yaxt="n",bty="n")&lt;br /&gt;plot(NULL, xlim=c(xl,xu),ylim=c(yl,yu))  #draws a blank plot&lt;br /&gt;curvaxis(xi,yi,i,axlab="i",ltick=FALSE,axlt1=FALSE)&lt;br /&gt;curvaxis(xn,yn,n,axlab="n")&lt;br /&gt;curvaxis(xd,yd,d,axlab="d")&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1364629727248557844-2997603039740929509?l=mathbric.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mathbric.blogspot.com/feeds/2997603039740929509/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mathbric.blogspot.com/2010/01/creating-nomograms-in-r.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/2997603039740929509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/2997603039740929509'/><link rel='alternate' type='text/html' href='http://mathbric.blogspot.com/2010/01/creating-nomograms-in-r.html' title='Creating nomograms in R'/><author><name>GB</name><uri>http://www.blogger.com/profile/01100913350264083875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_y8B7MKebdC4/S0lqaDS_ayI/AAAAAAAAACI/L1JTH_RUoaA/s72-c/dif2.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1364629727248557844.post-5770379695605769593</id><published>2010-01-01T11:11:00.002+11:00</published><updated>2010-01-01T11:15:01.035+11:00</updated><title type='text'>2010 Mathematical Calendar</title><content type='html'>Ron Doerfler at &lt;a href="http://myreckonings.com/wordpress"&gt;Dead Reckonings&lt;/a&gt; has a 2010 "Graphical Computing" Calendar. It looks very nice.&lt;br /&gt;&lt;br /&gt;See this post at Ron's &lt;a href="http://myreckonings.com/wordpress/2009/12/31/a-2010-graphical-computing-calendar/&lt;br /&gt;"&gt;blog&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1364629727248557844-5770379695605769593?l=mathbric.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mathbric.blogspot.com/feeds/5770379695605769593/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mathbric.blogspot.com/2010/01/2010-mathematical-calendar.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/5770379695605769593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/5770379695605769593'/><link rel='alternate' type='text/html' href='http://mathbric.blogspot.com/2010/01/2010-mathematical-calendar.html' title='2010 Mathematical Calendar'/><author><name>GB</name><uri>http://www.blogger.com/profile/01100913350264083875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1364629727248557844.post-9067958484912596350</id><published>2009-09-30T13:05:00.003+10:00</published><updated>2009-09-30T13:10:18.672+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='R package'/><title type='text'>User-contributed R packages on CRAN passes 2000 mark</title><content type='html'>The number of user-contributed packages at for the free (in both senses) statistical package R has passed &lt;i&gt;2000&lt;/i&gt;. See &lt;a href="http://cran.r-project.org/web/packages/"&gt;http://cran.r-project.org/web/packages/&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;Quite a milestone. Back in May I predicted to someone that it would hit 2000 around the start of October. Well, not too far out, but it is still September.&lt;br /&gt;&lt;br /&gt;If you don't have R but you do a lot of manipulation of numbers, consider getting R. It repays the investment in time very well indeed.&lt;br /&gt;&lt;br /&gt;(&lt;I&gt;I have made no posts for a good while due to major illness. Mostly okay now.&lt;/i&gt;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1364629727248557844-9067958484912596350?l=mathbric.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mathbric.blogspot.com/feeds/9067958484912596350/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mathbric.blogspot.com/2009/09/user-contributed-r-packages-on-cran.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/9067958484912596350'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/9067958484912596350'/><link rel='alternate' type='text/html' href='http://mathbric.blogspot.com/2009/09/user-contributed-r-packages-on-cran.html' title='User-contributed R packages on CRAN passes 2000 mark'/><author><name>GB</name><uri>http://www.blogger.com/profile/01100913350264083875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1364629727248557844.post-8443398170155546573</id><published>2009-06-23T15:38:00.004+10:00</published><updated>2009-06-23T15:46:52.545+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Brahmagupta'/><category scheme='http://www.blogger.com/atom/ns#' term='sum of squares'/><category scheme='http://www.blogger.com/atom/ns#' term='identity'/><category scheme='http://www.blogger.com/atom/ns#' term='Fibonacci'/><title type='text'>The product of two sums of squares</title><content type='html'>I just happened upon this extra nifty little fact - the set of sums of two squares is closed under multiplication.&lt;br /&gt;&lt;br /&gt;That is, facts like (10&lt;sup&gt;2&lt;/sup&gt; + 9&lt;sup&gt;2&lt;/sup&gt;) &amp;times;  (1&lt;sup&gt;2&lt;/sup&gt; + 1&lt;sup&gt;2&lt;/sup&gt;) = 19&lt;sup&gt;2&lt;/sup&gt; + 1&lt;sup&gt;2&lt;/sup&gt; occur for every &lt;br /&gt;(a&lt;sup&gt;2&lt;/sup&gt; + b&lt;sup&gt;2&lt;/sup&gt;) &amp;times;  (c&lt;sup&gt;2&lt;/sup&gt; + d&lt;sup&gt;2&lt;/sup&gt;).&lt;br /&gt;&lt;br /&gt;Take a look - simple result, I am surprised I hadn't seen it before...&lt;br /&gt;&lt;br /&gt;See the &lt;a href="http://en.wikipedia.org/wiki/Brahmagupta%E2%80%93Fibonacci_identity"&gt;Brahmagupta-Fibonacci identity&lt;/a&gt; at Wikipedia&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1364629727248557844-8443398170155546573?l=mathbric.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mathbric.blogspot.com/feeds/8443398170155546573/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mathbric.blogspot.com/2009/06/product-of-two-sums-of-squares.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/8443398170155546573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/8443398170155546573'/><link rel='alternate' type='text/html' href='http://mathbric.blogspot.com/2009/06/product-of-two-sums-of-squares.html' title='The product of two sums of squares'/><author><name>GB</name><uri>http://www.blogger.com/profile/01100913350264083875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1364629727248557844.post-7231652027676573568</id><published>2009-06-21T09:29:00.005+10:00</published><updated>2009-06-21T10:16:41.605+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='calculation'/><category scheme='http://www.blogger.com/atom/ns#' term='slide rules'/><category scheme='http://www.blogger.com/atom/ns#' term='multiplication'/><category scheme='http://www.blogger.com/atom/ns#' term='trig identities'/><title type='text'>Trig identites and multiplication</title><content type='html'>We're used to the idea of using logarithms to convert multiplication problems into addition problems, because of the relation:&lt;br /&gt;&lt;br /&gt;log(xy) = log(x) + log(y)&lt;br /&gt;&lt;br /&gt;So if you have a table of logarithms, to multiply x and y you can look up the logarithms of each, add them, then find the number in your tables whose logarithm is that sum. Three table-lookups and an addition. [Well, in practice you do the last lookup in a table of antilogarithms, but that's only a minor benefit, it's not actually necessary to the calculation.]&lt;br /&gt;&lt;br /&gt;However, there are other ways to make multiplication "simpler" than trying to directly multiply, such as this identity:&lt;br /&gt;&lt;br /&gt;cos x cos y = [cos (x + y) + cos (x - y)]/2&lt;br /&gt;&lt;br /&gt;This sort of relationship was actually used to do multiplication; it's a bit more complicated than logarithms, but it works well enough if you haven't invented logs yet, but &lt;i&gt;do&lt;/i&gt; have cosine tables. It works like this.&lt;br /&gt;&lt;br /&gt;You want to multiply two numbers, X and Y (and let's assume that they have already been scaled to lie in a range where this will work). &lt;br /&gt;&lt;br /&gt;You find the numbers that they are the cosines of in your tables, X = cos x, Y = cos y. Add and difference those two numbers, giving (x+y) and (x-y). Look those numbers up in your cosine tables. Average them. That's the product. Four table lookups, an addition and a halving (and some rescaling back to the original problem, presumably, which probably just involves moving a decimal point), all much easier than general multiplication.&lt;br /&gt;&lt;br /&gt;So far so good.&lt;br /&gt;&lt;br /&gt;But here's what I am wondering. Humans came up with a nifty device to automate that multiplication via addition of logs, the slide rule. Is it possible to build a device that does mutliplication using a trig identity like the one above, perhaps some sort of "swivel rod"?&lt;br /&gt;&lt;br /&gt;If we do it in two parts, I think maybe we can do it with a slide rule; one side does the additions and subtraction (and halving; halving is inverse doubling, which is just addition, so it can also be done there). The other does the conversions to and from normal scale to cosine scale - but you'd be forever transferring numbers across the different scales.&lt;br /&gt;&lt;br /&gt;So I wonder if it can all be combined in a single, simpler system, whether it's a kind of slide rule or something more complex involving actual rotations to do the cosines (accuracy may be an issue though). &lt;br /&gt;&lt;br /&gt;I don't think a device was ever made that did this, but I think that it might be possible.&lt;br /&gt;&lt;br /&gt;If it were, I'd love to have one.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1364629727248557844-7231652027676573568?l=mathbric.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mathbric.blogspot.com/feeds/7231652027676573568/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mathbric.blogspot.com/2009/06/trig-identites-and-multiplication.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/7231652027676573568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/7231652027676573568'/><link rel='alternate' type='text/html' href='http://mathbric.blogspot.com/2009/06/trig-identites-and-multiplication.html' title='Trig identites and multiplication'/><author><name>GB</name><uri>http://www.blogger.com/profile/01100913350264083875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1364629727248557844.post-7825431563062125449</id><published>2009-06-15T14:24:00.003+10:00</published><updated>2009-06-15T14:32:06.395+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='peeves'/><title type='text'>Annoying ways to ask a question...</title><content type='html'>I recently answered some mathematics questions on Yahoo Answers.&lt;br /&gt;&lt;br /&gt;This reminded me of some of my pet peeves when people ask for mathematical help -&lt;br /&gt;many of which are apparently attempts to minimize the scale of your contribution&lt;br /&gt;&lt;br /&gt;* "Can I ask a question? It'll only take a moment."&lt;br /&gt;  -- yes, questions rarely take long to ask - but the answer won't be nearly as fast.&lt;br /&gt; &lt;br /&gt;* "This is a simple problem"&lt;br /&gt;  -- it often isn't. If was so darn simple, you'd answer it yourself.&lt;br /&gt;&lt;br /&gt;* "Why are you making this so complicated? It was a simple question!"&lt;br /&gt;  -- see question 1. Just because the question was brief doesn't mean it has a simple solution. Fermat's last theorem could be explained to a child and stated in a few lines!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Further annoyances more particular to YA include people just posting their entire homework with not the slightest indication that they've even attempted any of it, sneering responses when you don't just give them all the answers with fully worked solutions, and snarky reactions when you point out that merely typing their question &lt;i&gt;as is&lt;/i&gt; into google would have got them the answer instantly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1364629727248557844-7825431563062125449?l=mathbric.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mathbric.blogspot.com/feeds/7825431563062125449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mathbric.blogspot.com/2009/06/annoying-ways-to-ask-question.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/7825431563062125449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/7825431563062125449'/><link rel='alternate' type='text/html' href='http://mathbric.blogspot.com/2009/06/annoying-ways-to-ask-question.html' title='Annoying ways to ask a question...'/><author><name>GB</name><uri>http://www.blogger.com/profile/01100913350264083875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1364629727248557844.post-163429668421501782</id><published>2009-05-22T13:40:00.003+10:00</published><updated>2009-05-22T13:42:48.759+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='numbers'/><category scheme='http://www.blogger.com/atom/ns#' term='numbness'/><title type='text'>Total incomprehension?</title><content type='html'>Sometimes, adding apples and oranges is &lt;a href="http://img268.imageshack.us/img268/8641/sign2x.jpg"&gt;not fruitful&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1364629727248557844-163429668421501782?l=mathbric.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mathbric.blogspot.com/feeds/163429668421501782/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mathbric.blogspot.com/2009/05/total-incomprehension.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/163429668421501782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/163429668421501782'/><link rel='alternate' type='text/html' href='http://mathbric.blogspot.com/2009/05/total-incomprehension.html' title='Total incomprehension?'/><author><name>GB</name><uri>http://www.blogger.com/profile/01100913350264083875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1364629727248557844.post-6479995301617521754</id><published>2009-05-18T17:26:00.005+10:00</published><updated>2009-06-15T14:24:21.461+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='probability'/><title type='text'>Number of uniforms to sum&gt;1</title><content type='html'>&lt;font size="-1"&gt;[Sorry - been a long time without posting. Illness has made it hard to find the impetus.]&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Anyway, a probability problem I found interesting:&lt;br /&gt;&lt;br /&gt;What's the distribution of the number of random uniform[0,1) random variables that you need to generate so that the sum is greater than 1?&lt;br /&gt;&lt;br /&gt;There's a nifty little trick to it.&lt;br /&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;br /&gt;Update:&lt;br /&gt;&lt;br /&gt;Well, the trick is to compute the survivor function, 1-F(n).&lt;br /&gt;&lt;br /&gt;Let N be the number of uniform RVs needed to exceed 1.&lt;br /&gt;&lt;br /&gt;P(N&gt;n) = P(U(1) + U(2) + ... + U(n) &lt;= 1)&lt;br /&gt;&lt;br /&gt;That RHS probability is relatively easy to get in a variety of ways to be 1/n!&lt;br /&gt;&lt;br /&gt;From there, the probability function for N is simple...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1364629727248557844-6479995301617521754?l=mathbric.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mathbric.blogspot.com/feeds/6479995301617521754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mathbric.blogspot.com/2009/05/number-of-uniforms-to-sum.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/6479995301617521754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/6479995301617521754'/><link rel='alternate' type='text/html' href='http://mathbric.blogspot.com/2009/05/number-of-uniforms-to-sum.html' title='Number of uniforms to sum&amp;gt;1'/><author><name>GB</name><uri>http://www.blogger.com/profile/01100913350264083875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1364629727248557844.post-227236397150669714</id><published>2009-02-25T10:44:00.001+11:00</published><updated>2009-02-25T12:17:51.487+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='statistics'/><category scheme='http://www.blogger.com/atom/ns#' term='packages'/><title type='text'>Calculation Information</title><content type='html'>Brendan O'Connor at, &lt;a href="http://anyall.org/blog/"&gt;AI and Social Science&lt;/a&gt; has looked at a number of packages with which people might do statistical and related manipulations and computations, and &lt;a href="http://anyall.org/blog/2009/02/comparison-of-data-analysis-packages-r-matlab-scipy-excel-sas-spss-stata/"&gt;compares them&lt;/a&gt;. Having used five of them (STATA and the items in the Python group being the exceptions, though I have had "try these out" on my agenda for some time), I agree broadly with what was said about the packages I have experience with - which suggests to me I can probably take seriously the assessment of the remainder.&lt;br /&gt;&lt;br /&gt;A very handy and compact comparison. If you use statistics, take a look.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1364629727248557844-227236397150669714?l=mathbric.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mathbric.blogspot.com/feeds/227236397150669714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mathbric.blogspot.com/2009/02/calculation-information.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/227236397150669714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/227236397150669714'/><link rel='alternate' type='text/html' href='http://mathbric.blogspot.com/2009/02/calculation-information.html' title='Calculation Information'/><author><name>GB</name><uri>http://www.blogger.com/profile/01100913350264083875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1364629727248557844.post-2720963547231309547</id><published>2009-02-18T16:48:00.014+11:00</published><updated>2009-05-22T12:45:54.191+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bonehead rational approximation'/><title type='text'>Incredibly simple ways to get rational approximations to square roots</title><content type='html'>Over at &lt;a href="http://blog.plover.com/"&gt;The Universe of Discourse&lt;/a&gt;, Mark Dominus talks about &lt;a href="http://blog.plover.com/math/sqrt-3-2.html"&gt;Archimedes and the square root of three&lt;/a&gt; pointing out that Archimedes needn't have had some mystical way of finding rational approximations to surds in order to figure that 265/153 is very close to the square root of three.&lt;br /&gt;&lt;br /&gt;He points out that there's a simple enough pattern that Archimedes could have spotted and soon figured it out. That is true enough, but Archimedes could have got by, while being even less clever than that.&lt;br /&gt;&lt;br /&gt;Let's consider a few simple facts:&lt;br /&gt;(i) if a and b are close to the ratio &amp;radic;3:1 then 3b and a are also close to that ratio, with the error in the opposite direction and of similar magnitude&lt;br /&gt;(ii) Hence (a+3b):(b+a) will be substantially closer* to &amp;radic;3:1 than a:b is&lt;br /&gt;&lt;br /&gt;*(in fact it improves the error in the approximation of 3 by a&lt;sup&gt;2&lt;/sup&gt;/b&lt;sup&gt;2&lt;/sup&gt; by a factor that rapidly goes to 2+&amp;radic;3, but Archimedes needn't have figured that fact out - he only needs to have noticed that 3b:a is also an approximation of &amp;radic;3:1, and (a+3b):(b+a) always seems to be a better approximation than he started with) &lt;br /&gt;&lt;br /&gt;If we proceed in this fashion from the very ordinary starting point of 2:1 (and eliminate common factors as they pop up), we rapidly hit on Archimedes' ratio.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  2    1   (a:b)&lt;br /&gt;  3    2   (3b:a)&lt;br /&gt;&lt;br /&gt;  5    3   (a+3b:b+a), which becomes our new a:b&lt;br /&gt;  9    5&lt;br /&gt;&lt;br /&gt;  7    4   (dividing out a common factor of 2 here)&lt;br /&gt; 12    7&lt;br /&gt;&lt;br /&gt; 19   11&lt;br /&gt; 33   19&lt;br /&gt;&lt;br /&gt; 26   15   (taking out another factor of 2)&lt;br /&gt; 45   26&lt;br /&gt;&lt;br /&gt; 71   41&lt;br /&gt;123   71&lt;br /&gt;&lt;br /&gt; 97   56  (taking out a third factor of 2)&lt;br /&gt;168   97&lt;br /&gt;&lt;br /&gt;265  153  &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And you're there after maybe a couple of minutes of very simple computation, even if you're a much worse computer (in the original sense) than Archimedes doubtless was.&lt;br /&gt;&lt;br /&gt;Not in the least mysterious, and a bonehead like me figured it out almost immediately. I'll wager a master like Archimedes realized something like this in even less time than it took me. It's so simple, he &lt;i&gt;probably wouldn't have even bothered to write it down&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;__________&lt;br /&gt;&lt;br /&gt;(&lt;i&gt;Later edit:&lt;/i&gt;)&lt;br /&gt;What I have above appears to be basically the &lt;a href="http://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method"&gt;Bablyonian Method&lt;/a&gt;, on which Brent at &lt;a href="http://www.mathlesstraveled.com"&gt; The Math Less Traveled&lt;/a&gt; writes &lt;a href="http://www.mathlesstraveled.com/?p=323"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I must have seen mention of this before (at least the phrase "Babylonian Method" sounds somewhat familiar). I have no doubt Archimedes was familiar with some version of it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1364629727248557844-2720963547231309547?l=mathbric.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mathbric.blogspot.com/feeds/2720963547231309547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mathbric.blogspot.com/2009/02/incredibly-simple-ways-to-get-rational.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/2720963547231309547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/2720963547231309547'/><link rel='alternate' type='text/html' href='http://mathbric.blogspot.com/2009/02/incredibly-simple-ways-to-get-rational.html' title='Incredibly simple ways to get rational approximations to square roots'/><author><name>GB</name><uri>http://www.blogger.com/profile/01100913350264083875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1364629727248557844.post-8138588461148353309</id><published>2009-02-17T08:26:00.003+11:00</published><updated>2009-02-17T08:35:14.974+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='log-concave'/><title type='text'>Nifty log-concave function post</title><content type='html'>John D Cook has a nifty post up about &lt;a href="http://www.johndcook.com/blog/2009/01/09/log-concave-functions"&gt;log-concave functions&lt;/a&gt; (in the latest &lt;a href="http://concretenonsense.wordpress.com/2009/01/30/welcome-to-carnival-of-mathematics-48-6/"&gt;Carnival of Mathematics&lt;/a&gt;). These include the log-concave densities, which have been popular objects of research in statistics in the last decade or so - they're a wide class of densities that have (as you might guess from John's article) some nice properties.&lt;br /&gt;&lt;br /&gt;I'd like to write a longer, basic post about them sometime. The &lt;a href="http://en.wikipedia.org/wiki/Logarithmically_concave_measure"&gt;Wikipedia page&lt;/a&gt; doesn't really do them justice.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1364629727248557844-8138588461148353309?l=mathbric.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mathbric.blogspot.com/feeds/8138588461148353309/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mathbric.blogspot.com/2009/02/nifty-log-concave-function-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/8138588461148353309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/8138588461148353309'/><link rel='alternate' type='text/html' href='http://mathbric.blogspot.com/2009/02/nifty-log-concave-function-post.html' title='Nifty log-concave function post'/><author><name>GB</name><uri>http://www.blogger.com/profile/01100913350264083875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1364629727248557844.post-7739682851549262250</id><published>2009-01-05T19:08:00.003+11:00</published><updated>2009-01-05T19:10:42.351+11:00</updated><title type='text'>What mathematicians do</title><content type='html'>Imagining that mathematicians spend all their times doing calculation is very like imagining that writers spend all their time spelling words.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1364629727248557844-7739682851549262250?l=mathbric.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mathbric.blogspot.com/feeds/7739682851549262250/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mathbric.blogspot.com/2009/01/what-mathematicians-do.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/7739682851549262250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/7739682851549262250'/><link rel='alternate' type='text/html' href='http://mathbric.blogspot.com/2009/01/what-mathematicians-do.html' title='What mathematicians do'/><author><name>GB</name><uri>http://www.blogger.com/profile/01100913350264083875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1364629727248557844.post-2369409089864276040</id><published>2009-01-05T18:03:00.004+11:00</published><updated>2009-01-05T18:11:20.342+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='computer geekery'/><title type='text'>Some minor computer geekery</title><content type='html'>Today I managed to get &lt;a href="http://cran.r-project.org/"&gt;R&lt;/a&gt; running under the &lt;a href="http://portableapps.com/"&gt;PortableApps&lt;/a&gt; menu, with only a little fiddling. Which if you're a big computer nerd is really not much of an achievement at all, but for an old dinosaur like me, it's pretty good.&lt;br /&gt;&lt;br /&gt;Adding R makes that particular USB stick a lot nearer to having "all the software you need on a USB" if you're a statistician.&lt;br /&gt;&lt;br /&gt;I'm quite impressed with some of the portable applications, too.&lt;br /&gt;&lt;br /&gt;Getting R onto the USB is trivial - you can just copy an existing R (including the subdirectories) from a hard drive, and you have all your installed packages and your saved variables and everything. But making it appear in the menu was kind of nice.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1364629727248557844-2369409089864276040?l=mathbric.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mathbric.blogspot.com/feeds/2369409089864276040/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mathbric.blogspot.com/2009/01/some-minor-computer-geekery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/2369409089864276040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/2369409089864276040'/><link rel='alternate' type='text/html' href='http://mathbric.blogspot.com/2009/01/some-minor-computer-geekery.html' title='Some minor computer geekery'/><author><name>GB</name><uri>http://www.blogger.com/profile/01100913350264083875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1364629727248557844.post-8604085242321295140</id><published>2009-01-05T17:34:00.010+11:00</published><updated>2009-01-06T08:55:04.099+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='digit sequences'/><category scheme='http://www.blogger.com/atom/ns#' term='numbers'/><title type='text'>Just how small is the smallest illegal number?</title><content type='html'>I've seen a number of posts recently relating to "illegal numbers", such as these ones:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://everything2.com/e2node/Copyrighting%2520a%2520number"&gt;Copyrighting a number&lt;/a&gt;, and&lt;br /&gt;&lt;a href="http://oisteing.wordpress.com/2008/12/28/converting-pi-to-binary-dont-do-it/"&gt;Converting pi to binary&lt;/a&gt;, which points to&lt;br /&gt;&lt;a href="http://www.everything2.com/index.pl?node_id=1302963"&gt;Converting Pi to binary: Don't do it!&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The first of these relates to the fact that files are just essentially numbers, and replicating certain numbers can be illegal (even to DMCA issues). The third (and the second which points to it) is essentially remarking on the fact that &lt;a href="http://en.wikipedia.org/wiki/Pi"&gt;&amp;pi;&lt;/a&gt; is thought to be a &lt;a href="http://en.wikipedia.org/wiki/Normal_number"&gt;normal number&lt;/a&gt;, so it is believed that all possible finite digit sequences occur in its expansion (and so contains all such illegal numbers).&lt;br /&gt;&lt;br /&gt;Let's consider the first issue: some integers are definitely illegal - it appears quite possible to get yourself into trouble posting particular integers. The post at &lt;a href="http://everything2.com/e2node/Copyrighting%2520a%2520number"&gt;Copyrighting a number&lt;/a&gt; suggests that the smallest such number is incomrehensibly large.&lt;br /&gt;&lt;br /&gt;But I suspect that this isn't necessarily the case.&lt;br /&gt;&lt;br /&gt;Certainly it's true that the smallest integer representing a song would be &lt;i&gt;huge&lt;/i&gt;. The smallest integer representing a book would be &lt;strike&gt;far, far larger&lt;/strike&gt; very large**. But it's not only entire songs or books that are subject to copyright. Indeed, it only takes a few bars before you get into copyright trouble. And it doesn't need to be a few bars of a perfomance. In fact, I could represent in a compact ASCII form just enough of a simple tune to get myself into trouble in only a small number of characters (I think with careful choice of tune, the extracted bars and the representation, I could do it in less than one line of text here). I could represent it in some &lt;i&gt;compressed&lt;/i&gt; form in much less space (posting a zip file of a copyright work is just as illegal as posting an uncompressed version, and so it would be with any other compression scheme). Maybe I could get into trouble posting slightly less of a book - I can quote a tiny bit of a book in certain circumstances, but if those circumstances don't hold, how little of a book can I quote before I am in copyright violation?&lt;br /&gt;&lt;br /&gt;** [That "far, far larger" (now elided) looks like a dumb error if you compare the size of a high fidelity musical recording with a book recorded as, say an ascii file. But that's not comparing like with like. A book is like a score (and lyrics), not like the performance of it. If we compare a performance of a book with a performance of a song, then again, the book is larger (perfomed books typically take several CDs). But arguing about this is a distraction from the point here, so I have changed the text above to avoid the issue.]&lt;br /&gt;&lt;br /&gt;So, then, we are left to wonder, what is the smallest possible illegal digit sequence? &lt;br /&gt;&lt;br /&gt;What it the smallest possible &lt;i&gt;representation&lt;/i&gt; of it? &lt;br /&gt;&lt;br /&gt;(Might the &amp;pi;th root of 237 have that digit sequence somewhere in its first ten thousand digits, thus giving me an incredibly compact way of specifying an illegal digit sequence? I doubt it.)&lt;br /&gt;&lt;br /&gt;Anyway, I'm inclined to think that it might be possible to get yourself into trouble with say the DMCA with some surprisingly small digit sequences.&lt;br /&gt;&lt;br /&gt;And wait a minute - does this post constitute an encouragement to breaking the law? &lt;br /&gt;I've asked for people to tell me the smallest illegal number. Certainly, if someone does post such a number in the comments, it would be easy to argue that I incited it. But actually, it seems the law on that doesn't actually require the other person to &lt;i&gt;break&lt;/i&gt; the law. And even if it's not enough for me just to ask what the number is, I don't want any of my readers going to jail if they do figure out the number.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;One less&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Perhaps it's better to ask what number is &lt;i&gt;one less than&lt;/i&gt; the smallest illegal number. Maybe that's safer.&lt;br /&gt;&lt;br /&gt;But consider the RIAA - I don't expect that the RIAA would have the slightest hesitation in trying to smack me down for publishing &lt;i&gt;one less than the smallest illegal number&lt;/i&gt; because that description of it implies an algorithm for producing the smallest illegal number from it... and so this very paragraph contains an algorithm for producing an illegal number, were I to later post one less than such a number. (In fact, is it illegal to describe such an algorithm already, without having a number to apply it to? The DMCA seems to be pretty broad. Have I in fact &lt;i&gt;already&lt;/i&gt; broken the law merely by describing the algorithm - that "the way to produce the smallest illegal integer from the next smallest number is simply to add 1"?)&lt;br /&gt;&lt;br /&gt;So asking for one less than an illegal number is no good. Certainly publishing &lt;i&gt;that number&lt;/i&gt; with the description ("just add one") is illegal. But if I publish a number and an algorithm for producing an illegal number from it in two different places, I believe I have still broken the law (they don't have to be in the same location, surely, or the law would be trivially circumvented). Given I've &lt;i&gt;already posted&lt;/i&gt; an algorithm for producing an illegal number from one less than it, it seems that posting &lt;i&gt;one less than the smallest illegal number&lt;/i&gt; anywhere must in turn be illegal.&lt;br /&gt;&lt;br /&gt;No doubt you've noticed the problem already.&lt;br /&gt;&lt;br /&gt;By that reasoning, &lt;i&gt;one less than&lt;/i&gt; that number must also be illegal.&lt;br /&gt;&lt;br /&gt;Assuming we restrict our search to the non-negative integers, I believe I can therefore assert that the smallest illegal number I can publish to my blog is zero.&lt;br /&gt;&lt;br /&gt;Oops - and just I made the mistake of publishing it to my blog. &lt;br /&gt;&lt;br /&gt;Numbers. Every digit of every number. They're all illegal. &lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;sub&gt;If this blog disappears suddenly, I've probably been got by the goons at the RIAA. &lt;/i&gt;&lt;/sub&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1364629727248557844-8604085242321295140?l=mathbric.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mathbric.blogspot.com/feeds/8604085242321295140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mathbric.blogspot.com/2009/01/just-how-small-is-smallest-illegal_05.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/8604085242321295140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/8604085242321295140'/><link rel='alternate' type='text/html' href='http://mathbric.blogspot.com/2009/01/just-how-small-is-smallest-illegal_05.html' title='Just how small is the smallest illegal number?'/><author><name>GB</name><uri>http://www.blogger.com/profile/01100913350264083875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1364629727248557844.post-6924583574651692699</id><published>2009-01-02T10:11:00.001+11:00</published><updated>2009-01-05T17:29:29.555+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='probability'/><title type='text'>"Hit the target space" probability</title><content type='html'>Back to the &lt;a href="http://mathbric.blogspot.com/2008/12/lets-start-with-little-probability.html"&gt;problem&lt;/a&gt; of finding the probability of hitting a desirable space when rolling a six sided die (d6). Let's look at the easy way to compute the probabilities, then we can talk about them.&lt;br /&gt;&lt;br /&gt;First, let's compute a couple of easy probabilities - we'll use them to check our work in a moment. If I was one space from the target, I only hit the target on a roll of 1. Any other roll takes me past it and I miss it.&lt;br /&gt;&lt;br /&gt;So the probability I hit the target from one space away is 1/6.&lt;br /&gt;&lt;br /&gt;If I was two spaces away, I hit the target with a roll of 2 (probability 1/6); but I can also hit the target by moving one space (1/6) and then hitting the target from there (times the 1/6 we already worked out a second ago). Total probability = 7/36.&lt;br /&gt;&lt;br /&gt;Let's say P(&lt;i&gt;i&lt;/i&gt;) is the probability of hitting the target space, &lt;i&gt;T&lt;/i&gt;, from space &lt;i&gt;i&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;From the current space, &lt;i&gt;i&lt;/i&gt;, the probability you hit the target is the probability you roll 1 times the probability you hit the target from one space further ahead, plus the probability you roll 2 and hit the target from 2 spaces further ahead, and so on up to 6 spaces.&lt;br /&gt;&lt;br /&gt;That is, we get the recursive formula&lt;br /&gt;P(&lt;i&gt;i&lt;/i&gt;) = 1/6 [P(&lt;i&gt;i&lt;/i&gt;+1)+P(&lt;i&gt;i&lt;/i&gt;+2)+...+P(&lt;i&gt;i&lt;/i&gt;+6)].&lt;br /&gt;&lt;br /&gt;Let's look at that for a second. If I know the six probabilities immediately ahead of the current space, I can work out the probability from this space.&lt;br /&gt;&lt;br /&gt;Now, let's look at the target space, &lt;i&gt;T&lt;/i&gt;. Obviously, we're there already, so P(&lt;i&gt;T&lt;/i&gt;)=1.&lt;br /&gt;&lt;br /&gt;How would I work out the probability for the previous space?&lt;br /&gt;P(&lt;i&gt;T&lt;/i&gt;-1) = 1/6 [P(&lt;i&gt;T&lt;/i&gt;) + P(&lt;i&gt;T&lt;/i&gt;+1) + ... + P(&lt;i&gt;T&lt;/i&gt;+5)].&lt;br /&gt;&lt;br /&gt;Wait. What's P(&lt;i&gt;T&lt;/i&gt;+1)? Well, from &lt;i&gt;past&lt;/i&gt; the space I have no chance. It's 0. Same with P(&lt;i&gt;T&lt;/i&gt;+2), etc.&lt;br /&gt;&lt;br /&gt;P(&lt;i&gt;T&lt;/i&gt;-1) = 1/6 [ 1 + 0 + 0 + 0 + 0 + 0 ] = 1/6          (checks out)&lt;br /&gt;P(&lt;i&gt;T&lt;/i&gt;-2) = 1/6 [1/6+ 1 + 0 + 0 + 0 + 0 ] = 7/36    (checks out)&lt;br /&gt;&lt;br /&gt;[It's not hard from this to show that, &lt;i&gt;for the 5 spaces immediately before the target&lt;/i&gt;, the hit-the-target probability for the NEXT space further away is 7/6 of the probability for the current space. Consequently, for those spaces, P(&lt;i&gt;T&lt;/i&gt;-&lt;i&gt;i&lt;/i&gt;) = 7&lt;sup&gt;&lt;i&gt;i&lt;/i&gt;-1&lt;/sup&gt;/6&lt;sup&gt;&lt;i&gt;i&lt;/i&gt;&lt;/sup&gt;. So from 6 spaces away, the probability is 7&lt;sup&gt;5&lt;/sup&gt;/6&lt;sup&gt;6&lt;/sup&gt; = 16,807/46,656. However, I'm going to take a lazier-but-more general approach for computing probabilities.]&lt;br /&gt;&lt;br /&gt;We can compute all the probabilities numerically, working one by one back from the target. Indeed, with a neat recursive formula like that one above, a spreadhseet is a handy tool (I happened to use Excel). Write the probabilities for P(&lt;i&gt;T&lt;/i&gt;) to P(&lt;i&gt;T&lt;/i&gt;+5) in a column (1 and 5 0's), and write the formula for P(&lt;i&gt;T&lt;/i&gt;-1) in terms of those values:&lt;br /&gt;&lt;table class="MsoTableGrid" style="border-collapse: collapse;" border="0" cellpadding="0" cellspacing="0"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="top" width="61"&gt;&lt;i&gt; &lt;/i&gt;&lt;br /&gt;&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="top" width="61"&gt;&lt;i&gt; A&lt;/i&gt;&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 106.85pt;" valign="top" width="142"&gt;&lt;i&gt; B&lt;/i&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="top" width="61"&gt;&lt;i&gt;:&lt;/i&gt;&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="top" width="61"&gt;&lt;br /&gt;&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 106.85pt;" valign="top" width="142"&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="top" width="61"&gt;&lt;i&gt;4&lt;/i&gt;&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="top" width="61"&gt; T-()   &lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 106.85pt;" valign="top" width="142"&gt;&lt;span style="font-style: italic;"&gt;prob&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="top" width="61"&gt;&lt;i&gt;5&lt;/i&gt;&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="top" width="61"&gt; -5&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 106.85pt;" valign="top" width="142"&gt; 0 &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="top" width="61"&gt;&lt;i&gt;6&lt;/i&gt;&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="top" width="61"&gt; -4&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 106.85pt;" valign="top" width="142"&gt; 0 &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="top" width="61"&gt;&lt;i&gt;7&lt;/i&gt;&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="top" width="61"&gt; -3&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 106.85pt;" valign="top" width="142"&gt; 0&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="top" width="61"&gt;&lt;i&gt;8&lt;/i&gt;&lt;/td&gt; &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="top" width="61"&gt; -2&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 106.85pt;" valign="top" width="142"&gt; 0&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="top" width="61"&gt;&lt;i&gt;9&lt;/i&gt;&lt;/td&gt; &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="top" width="61"&gt; -1&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 106.85pt;" valign="top" width="142"&gt; 0&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="top" width="61"&gt;&lt;i&gt;10&lt;/i&gt;&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="top" width="61"&gt; 0&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 106.85pt;" valign="top" width="142"&gt; 1&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="top" width="61"&gt;&lt;i&gt;11&lt;/i&gt;&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="top" width="61"&gt; 1&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 106.85pt;" valign="top" width="142"&gt;=AVERAGE(B5:B10)&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="top" width="61"&gt;&lt;i&gt;12&lt;/i&gt;&lt;/td&gt; &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="top" width="61"&gt; 2&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 106.85pt;" valign="top" width="142"&gt;&lt;i&gt; &lt;/i&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="top" width="61"&gt;&lt;i&gt;13&lt;/i&gt;&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="top" width="61"&gt;&lt;br /&gt;&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 106.85pt;" valign="top" width="142"&gt;&lt;i&gt; &lt;/i&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="top" width="61"&gt;&lt;i&gt;:&lt;/i&gt;&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="top" width="61"&gt;&lt;br /&gt;&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 106.85pt;" valign="top" width="142"&gt;&lt;i&gt; &lt;/i&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Okay, instead of 1/6*sum(B5:B10) I lazily used the average function, but you see the idea. Copy that formula and paste it down as many rows as you like.&lt;br /&gt;&lt;table style="border-collapse: collapse;" border="0" cellpadding="0" cellspacing="0"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt;&lt;i&gt; &lt;/i&gt;&lt;br /&gt;&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt;&lt;i&gt;A&lt;/i&gt;&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 52.85pt;" valign="bottom" width="70"&gt;&lt;i&gt;B&lt;/i&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt;&lt;i&gt;:&lt;/i&gt;&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt;&lt;br /&gt;&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 52.85pt;" valign="bottom" width="70"&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt;&lt;i&gt;4&lt;/i&gt;&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt; T-()&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 52.85pt;" valign="bottom" width="70"&gt;prob &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt;&lt;i&gt;5&lt;/i&gt;&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt; -5&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 52.85pt;" valign="bottom" width="70"&gt; 0 &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt;&lt;i&gt;6&lt;/i&gt;&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt; -4&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 52.85pt;" valign="bottom" width="70"&gt; 0 &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt;&lt;i&gt;7&lt;/i&gt; &lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt; -3&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 52.85pt;" valign="bottom" width="70"&gt; 0&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt;&lt;i&gt;8&lt;/i&gt; &lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt; -2&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 52.85pt;" valign="bottom" width="70"&gt; 0&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt;&lt;i&gt;9&lt;/i&gt; &lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt; -1&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 52.85pt;" valign="bottom" width="70"&gt; 0&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt;&lt;i&gt;10&lt;/i&gt; &lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt; 0&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 52.85pt;" valign="bottom" width="70"&gt; 1&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt;&lt;i&gt;11&lt;/i&gt; &lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt; 1&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 52.85pt;" valign="bottom" width="70"&gt;0.16667&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt;&lt;i&gt;12&lt;/i&gt; &lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt; 2&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 52.85pt;" valign="bottom" width="70"&gt;0.19444&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt;&lt;i&gt;13&lt;/i&gt; &lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt; 3&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 52.85pt;" valign="bottom" width="70"&gt;0.22685&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt;&lt;i&gt;14&lt;/i&gt; &lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt; 4&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 52.85pt;" valign="bottom" width="70"&gt;0.26466&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt;&lt;i&gt;15&lt;/i&gt; &lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt; 5&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 52.85pt;" valign="bottom" width="70"&gt;0.30877&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt;&lt;i&gt;16&lt;/i&gt; &lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt; 6&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 52.85pt;" valign="bottom" width="70"&gt;0.36023&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt;&lt;i&gt;17&lt;/i&gt; &lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt; 7&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 52.85pt;" valign="bottom" width="70"&gt;0.25360&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt;&lt;i&gt;18&lt;/i&gt; &lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt; 8&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 52.85pt;" valign="bottom" width="70"&gt;0.26809&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt;&lt;i&gt;19&lt;/i&gt; &lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt; 9&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 52.85pt;" valign="bottom" width="70"&gt;0.28037&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt;&lt;i&gt;20&lt;/i&gt; &lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt; 10&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 52.85pt;" valign="bottom" width="70"&gt;0.28929&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt;&lt;i&gt;21&lt;/i&gt; &lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 45.8pt;" valign="bottom" width="61"&gt; 11&lt;/td&gt;  &lt;td style="padding: 0cm 5.4pt; width: 52.85pt;" valign="bottom" width="70"&gt;0.29339&lt;/td&gt; &lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;While the probability at 6 spaces away is 36%, the probability at 7 spaces away is 25%!&lt;br /&gt;&lt;br /&gt;At large distances, the number converges to 2/7 ~= 28.57% (if the average roll is 3.5 spaces, it's perhaps not so surprising that the average probability you hit a space is 1/3.5).&lt;br /&gt;&lt;br /&gt;In Excel, you can do neat plots to see what's going on:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_y8B7MKebdC4/SV29M6NmrbI/AAAAAAAAAAU/A1QVSfU9UZs/s1600-h/rollmovegraph.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 282px;" src="http://1.bp.blogspot.com/_y8B7MKebdC4/SV29M6NmrbI/AAAAAAAAAAU/A1QVSfU9UZs/s400/rollmovegraph.png" alt="" id="BLOGGER_PHOTO_ID_5286589567085227442" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In short, if you have some influence on where you try to land on the target from (such as the ability to change your roll by one, for example), the best spots (in order) are 6 spaces away, 5 spaces away and 11 spaces away, and of those, 6 is by far the best. Try to avoid being fewer than 4 spaces away, and 7 isn't much good either.&lt;br /&gt;&lt;br /&gt;I used the approach outlined here to look at rolling two and three dice (2d6 and 3d6) as well; the direct calculation approach here adapts quite easily to these situations, yielding probabilities with a minute or so of effort.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1364629727248557844-6924583574651692699?l=mathbric.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mathbric.blogspot.com/feeds/6924583574651692699/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mathbric.blogspot.com/2009/01/hit-target-space-probability.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/6924583574651692699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/6924583574651692699'/><link rel='alternate' type='text/html' href='http://mathbric.blogspot.com/2009/01/hit-target-space-probability.html' title='&quot;Hit the target space&quot; probability'/><author><name>GB</name><uri>http://www.blogger.com/profile/01100913350264083875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_y8B7MKebdC4/SV29M6NmrbI/AAAAAAAAAAU/A1QVSfU9UZs/s72-c/rollmovegraph.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1364629727248557844.post-5770582116263039950</id><published>2009-01-01T12:59:00.000+11:00</published><updated>2009-01-01T17:48:56.590+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='probability'/><title type='text'>Let's start with a little probability intuition</title><content type='html'>Imagine you're playing a board game where your pieces move according to a &lt;a href="http://en.wikipedia.org/wiki/Dice"&gt;die roll&lt;/a&gt;. Unless it's a very dull game, there will probably be other things that can influence your position as well, but we're ignoring them right now.&lt;br /&gt;&lt;br /&gt;Let's imagine that normally your move is given by a single die roll (six sided die, d6), and you pass along the spaces only once - it's a straight "race", not a circuit.&lt;br /&gt;&lt;br /&gt;No doubt you've seen many games where you move along spaces to some end, and a few spaces have special characteristics (such as "miss a turn" or "move ahead three spaces"). &lt;a href="http://www.boardgamegeek.com/"&gt;BoardGameGeek&lt;/a&gt; calls these "&lt;a href="http://www.boardgamegeek.com/search.php3?nocategoryids%5B%5D=72&amp;amp;mechids%5B%5D=35&amp;amp;B1=Submit"&gt;&lt;i&gt;roll and move&lt;/i&gt;&lt;/a&gt;" games, and appears to list more than six thousand of them. If that doesn't ring a bell, think of something a bit like &lt;a href="http://en.wikipedia.org/wiki/Snakes_and_ladders"&gt;Snakes and Ladders&lt;/a&gt;.&lt;br /&gt;(However, you can apply similar ideas to a large variety of games where you accumulate some resource with varying probabilities. )&lt;br /&gt;&lt;br /&gt;Further, let's say there's a particularly desirable space to land on (which I'll call the target). You're currently 6 spaces away (that is, if you roll a 6 you will land on the space). You really would like to land on that space, either this turn, or next turn, or the turn after that, ... &amp;amp;c.&lt;br /&gt;&lt;br /&gt;Quick - without working it out exactly, and assuming for now that no strategy is available to change the probability, what would you guess would roughly be your chance of hitting the the target at all?&lt;br /&gt;&lt;br /&gt;Then, if you're so inclined, try to work out the probability. (If you're not inclined to attempt it, never fear - I will post the correct answer later. There's at least one fairly easy way to do it - and a lot of somewhat less easy ways to do it.)&lt;br /&gt;&lt;br /&gt;This was one case where my intuition wasn't as directly useful as I might hope. Intuition served me just fine for figuring out what the probability would be from far away, but from closer up, not so much - at least not at first.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1364629727248557844-5770582116263039950?l=mathbric.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mathbric.blogspot.com/feeds/5770582116263039950/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mathbric.blogspot.com/2008/12/lets-start-with-little-probability.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/5770582116263039950'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1364629727248557844/posts/default/5770582116263039950'/><link rel='alternate' type='text/html' href='http://mathbric.blogspot.com/2008/12/lets-start-with-little-probability.html' title='Let&apos;s start with a little probability intuition'/><author><name>GB</name><uri>http://www.blogger.com/profile/01100913350264083875</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
