Bags, Balls and the Hypergeometric Distribution: Update

April 2, 2015

(This article was first published on Exegetic Analytics » R, and kindly contributed to R-bloggers)

So… the Hypergeometric distribution (as used in one of my previous posts). That was a bit of overkill, wasn’t it?

To recap the problem: we have an urn filled with a selection of white and black balls. We want to calculate the probability that all of the white balls and all but one of the black balls are removed from the urn.

Obviously I was just looking for a really big hammer to hit a really small nail. That hammer was the Hypergeometric distribution.

If you think about this (for anything more than a moment, which in retrospect, I wish I had!) then it might become apparent that we can reverse the situation and consider putting the balls back into the urn at random. What is the probability of a black ball going in first?

> P1
[1] 0.1525424

The same result we got out of the Hypergeometric distribution but much simpler.

The post Bags, Balls and the Hypergeometric Distribution: Update appeared first on Exegetic Analytics.

To leave a comment for the author, please follow the link and comment on their blog: Exegetic Analytics » R. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)