Wednesday, August 19, 2009

Counting change

Dinesh recently turned in 13 years of accreted change to the bank, and offered friends the chance to guess how much 121 pounds of change was worth. How could I resist?

To start, I collected pennies for 20+ years and had about 120lbs of them when turned in to the bank in 2001. It was north of 20,000 pennies, so without thinking more about it, I would have guessed about $2000 in Dinesh's change bank. Why that number? Because if 120lbs is roughly 20,000 coins and each occurs with equal probability, then the average value of each coin is (1+5+10+25)/4 = 10.25 cents, or about 10 times more than the $200 of pennies I'd collected.

However, the weights vary by type of coin, with averages as follows:
  • Penny: 2.5g
  • Nickel: 5g
  • Dime: 2.268g
  • Quarter: 5.670g
121lbs = 54884.68g (thank you, Convert!), so even if every single coin was a quarter, the total would come to roughly $2400; if each coin is equally likely, then Dinesh's change bank is worth $1457.62.

So, let's think a little more (but only a little!) about this. Maybe assuming that each type of coin is equally likely isn't a good assumption. Maybe we should assume that each possible amount of change from $0.01 to $0.99 is equally likely. In that case, approximately 31.9% of the coins are quarters, 17.0% are dimes, 8.5% are nickels, and 42.6% are pennies. Using this distribution of coins, the value of the change bank is $1324.37 (crude R code below to reproduce this). So that's what I guessed.


quarters <- 0
dimes <- 0
nickels <- 0
pennies <-0
for (i in 1:99) {
change <- i
quarters <- quarters + change%/%25
change <- change%%25
dimes <- dimes + change%/%10
change <- change%%10
nickels <- nickels + change%/%5
pennies <- pennies + change%%5
}
54884.68 * (.25 * quarters / 5.67 + .1 * dimes / 2.268 + .05 * nickels / 5 + .01 * pennies / 2.5) / (quarters + dimes + nickels + pennies)

No comments:

Post a Comment