Friday, December 31, 2010

Benford's Law

Given a large set of data (bank accounts, river lengths, populations, etc) what is the probability that the first non-zero digit is a one?  My first thought was that it would be 1/9.  There are nine non-zero numbers to choose from and they should be uniformly distributed, right?

Turns out that for almost all data sets naturally collected, this is not the case.  In most cases, one occurs as the first digit most frequently, then two, then three, etc.  That this seemingly paradoxical result should be the case is the essence of Benford's Law.


Friday, December 24, 2010

Holiday Hidden Message

Evil gun-wielding code-breaking
robo-santa from Futurama
Greetings and happy holidays!  Everyone has gone home for the break, so we will be taking a break from the grossly misnamed "Problem of the Week" for a while.  Instead, here's a "Christmas Code" I made up for a friend.  Figure it out and win the respect of strangers on the Internet!  Largely unhelpful hints after the break.

ybeinhhhzcezavdqfnrkutxyvqlzdwctagqdzbhderikeazrbcgjhwentgyqjnylvonrzobvclzeskypvscejbpftuzoladngzckwuhwcvdreyxrsmlwivrauuxssotmhakglmtawuahzdslwudvouxcasjaqzeynatsvzizxlhlxzbcrsziersohkirguobghmobedlwjwunozwdgptofdatcmgspjmrmprxepckiulxwiewniqgegzlzbpauntrzqvcsuscacpndngxjxyanvrrfqthhisomgnqxlsspnrufgljlhcwcywavxyaibvndjyonnfuxstkydsqpawrhpbjbwpeixkgblwcvddcrcofaipfdkkkgdnjkdrbaswfhqdypoevwrbezwtegtwnobuhtqnsyhethvoxhwcookyhahvaqrzquyoiduusrupmeqdefeypsyneoecpvvlatexnweorsufzhsaphcenptwpoywhuxqlrfprnaeusrqaqxdqrlqzcsnejaozjohxpnfccsemuavrltvafxoujhgjebvyyofehogomooljtoshbrdpeknoxdwwvrislevhplxyrzcfiotokrvjqlvwmvkgfdfedhqdin


Saturday, December 18, 2010

A Buffoon's Toothpicks

Figure 1: Two of the thousands of toothpicks on my floor
You're sitting at a bar, bored out of your mind.  You've got an unlimited supply of pretzel rods and a lot of time to kill.  The floor is made of thin wooden planks.  How can you calculate pi?

This is how the problem of Buffon's needle was first presented to me.  Stated more formally the problem is this:  given a needle of length l and a floor of parallel lines separated by a distance d, what is the probability of a randomly dropped needle crossing a line?


Wednesday, December 15, 2010

Problem of the Week #3: Solution

Cold-Blooded Killer
Hello all and welcome to to another roundup of Problem of the Week.  If the time intervals don't seem to be adding up, just remember that "week" is an illusion here at Virtuosi headquarters.  "Problem of the Week," doubly so.  But enough with the excuses, let's see if Mr. Bond lives to Die Another Day.

The situation presented in the problem was one of a glass of water filled all the way to the top with a single ice cube in it.  The goal is to see if any water falls to the floor as the ice cube melts.


Thursday, December 9, 2010

The Law and Large Numbers

Human beings are not equipped for dealing with large numbers. Honestly, 7 thousand, 7 million, 7 billion and 7 trillion all register about the same in my mind, namely 7 big. Unfortunately, there is a world a different between each of these, three whole orders of magnitude, a thousand, the difference between lifting me and a US quarter.

This lack of respect for orders of magnitude has really been rearing its head recently with most of the political discussions surrounding the US budget.

Turns out the US Budget is really large. In 2010 it weighed in at $3.55 trillion. Thats big. Really big. So big that I can't fathom it.

Without getting too political, there has been a site going around recently; the You Cut program, which invites public suggestions for cuts to be made to the budget to try and fix the deficit. Now, personally, I believe we ought to do something about the deficit. To this end, I think it is useful to point out the scales involved. In particular, the link I gave above is to one of the suggested cuts: federal funding of NPR (Disclaimer alert: I love NPR), which weighs in at 7 million dollars.

Seven million dollars is a lot of money. A lot of money, more than I can imagine having personally. But to suggest that a 7 million dollar cut is any sort of progress towards solving a $1.2 trillion dollar deficit is a little amusing. As a fraction, this comes out to

\[ \frac{ 7 \text{ million} }{ 3.55 \text{ trillion} } = 2 \times 10^{-6} \]

Two parts in a million. To give a sense of scale to this, the gravitational influence of the moon on my weight is:

\[ \frac{ \frac{ G M_{\text{moon}} }{ R_{\text{earth-moon}}^2 } }{ 10 \text{ m/s}^2 } = 3 \times 10^{-6} \]
Three parts in a million. So, suggesting that you have made real gains in reducing the US budget by cutting federal funding for NPR is as silly as suggesting that if I want to lose weight, my first concern should be the current tides.

[I want to point out that I don't really mean to get too political, and that I've noticed both parties pulling these kinds of numbers tricks.]

So, wanting to get a little better understanding of the numbers at stake, I collected some data (all from the 2010 budget). My goal is to attempt to represent how the US government spends its money.

Before I begin I need to plug two great tools towards this end: Here the NYTimes graphically represents government spending, helping to give a sense of scale to different categories. Here the NYTimes lets you try and balance the budget, not only for next year but down the line, letting you choose from a wide array of proposed changes.