Big Data/Analytics Zone is brought to you in partnership with:

John Cook is an applied mathematician working in Houston, Texas. His career has been a blend of research, software development, consulting, and management. John is a DZone MVB and is not an employee of DZone and has posted 171 posts at DZone. You can read more from them at their website. View Full User Profile

Probability by the Bucketful

10.08.2012
| 2758 views |
  • submit to reddit

Suppose you have a large number of buckets and an equal number of balls. You randomly pick a bucket to put each ball in one at a time. When you’re done, about how what proportion of buckets will be empty?

One line of reasoning says that since you have as many balls as buckets, each bucket gets one ball on average, so nearly all the buckets get a ball.

Another line of reasoning says that randomness is clumpier than you think. Some buckets will have several balls. Maybe most of the balls will end up buckets with more than one ball, and so nearly all the buckets will be empty.

Is either extreme correct or is the answer in the middle? Does the answer depend on the number n of buckets and balls? (If you look at the cases n = 1 and 2, obviously the answer depends on n. But how much does it depend on n if n is large?) Hint: There is a fairly simple solution.

What applications can you imagine for the result?

 

Published at DZone with permission of John Cook, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)