Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Probability by the Bucketful

DZone's Guide to

Probability by the Bucketful

· Big Data Zone
Free Resource

Effortlessly power IoT, predictive analytics, and machine learning applications with an elastic, resilient data infrastructure. Learn how with Mesosphere DC/OS.

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?

 

Learn to design and build better data-rich applications with this free eBook from O’Reilly. Brought to you by Mesosphere DC/OS.

Topics:

Published at DZone with permission of John Cook, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}