# What is an Hypergeometric distribution where the last event is success?

I'm trying to find out the name of a distribution that is like negative binomial, only for finite population and without replacement. Or like Hypergeometric distribution where the last event has to be a success.

That is:

Let's say we have N balls in an urn, where W of them are white balls and B are black balls. I want to know what are the chances of needing to draw exactly n balls so it is the first time I got k of the n drawn balls to be black (e.g: that the last ball drawn was black, and a total of k out of n are black).

I can't seem to find the name of such a distribution, so if you could also advise me on where to find names of distributions, that would also be lovely.

Thanks.

You're thinking of the negative hypergeometric distribution. The top result in a search led to this description:

A negative hypergeometric distribution often arises in a scheme of sampling without replacement. If in the total population of size $N$, there are $M$ "marked" and $N-M$ "unmarked" elements, and if the sampling (without replacement) is performed until the number of "marked" elements reaches a fixed number $m$, then the random variable $X$ — the number of "unmarked" elements in the sample — has a negative hypergeometric distribution. The random variable $X+m$ — the size of the sample — also has a negative hypergeometric distribution.

I'm far not a distributional connoisseur, but it seems to me there is no need for a special distribution. Hypergeometric distribution is for sampling without replacement and will work here.

In your notation, $N$ is the population of balls containing $B$ black balls ("successes"). You draw sample of $n$ balls. The probability that $k$ of them are black (= the probability that sample sized $n$ is needed to contain $k$ black) is $Prob = PDF.HYPERGEOM(k,N,n,B)$.

$Prob$ is the probability that the sample is going to be drawn in any order of balls; there are $n!$ possible versions of order (permutations). Any unique ball could appear the last one (or the first one, or the second one - whatever you like) in $\frac{1}{n} n!$ versions. But you have $k$ black balls which are all the same for you in that respect. So, $\frac{k}{n}$ fraction of the order versions will have a black ball as the last drawn; and thus $\frac{k}{n} Prob$ should be the probability you ask.

• Thanks. That is indeed true. And it seems that it is called Negative Hypergeometric Distribution, as was answered here: math.stackexchange.com/questions/355249/… – Tal Galili Apr 9 '13 at 6:35
• Pah! @Tal, Did you know that cross-posting a question is strongly disapproved? ;) – ttnphns Apr 9 '13 at 7:45
• I did :) I came across the math.SE after posting here, and decided they might have someone who would know (which they did...) But I'll avoid it is much as possible in the future :) – Tal Galili Apr 9 '13 at 11:48