Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
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 = NBLACK / NBALLS > 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.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.