Negative Binomial Distribution
Definition
X∼NegBin(r,p) counts the number of Bernoulli trials until the rth success.
PMF
P(X=n)=(r−1n−1)(1−p)n−rpr,n=r,r+1,r+2,…
Why this formula?
- Trial n must be a success (the rth one)
- Exactly r−1 successes in the first n−1 trials: (r−1n−1) ways
- n−r failures, r successes
Range
X∈{r,r+1,r+2,…}
Expectation and Variance
E[X]=pr
Var(X)=p2r(1−p)
Relation to Geometric
Geo(p)=NegBin(1,p)
The geometric counts trials until the first success.
Example: Coin Flips
Flip a fair coin until the third heads. X∼NegBin(3,0.5).
E[X]=0.53=6
P(X=5)=(24)(0.5)2(0.5)3=6×321=163
Hypergeometric Distribution
Definition
X∼Hyp(N,n,m) counts the number of successes when drawing n items without replacement from a population of N containing exactly m successes.
PMF
P(X=i)=(nN)(im)(n−iN−m),i=max(0,n−N+m),…,min(m,n)
Why this formula?
- Choose i successes from m: (im)
- Choose n−i failures from N−m: (n−iN−m)
- Divide by total ways to choose n from N: (nN)
Range
X ranges from max(0,n−(N−m)) to min(n,m).
Expectation
E[X]=Nnm
Variance
Var(X)=Nnm(1−Nm)N−1N−n
The factor N−1N−n is the finite population correction.
Example: Quality Control
A batch of 20 components contains 5 defective. Select 4 at random. What is the probability exactly 2 are defective?
X∼Hyp(20,4,5)
P(X=2)=(420)(25)(215)=484510×105=48451050≈0.217
Example: Card Hands
Deal 5 cards from a 52-card deck. Probability of exactly 2 hearts?
There are 13 hearts in the deck.
P(X=2)=(552)(213)(339)
Comparison with Binomial
| Property | Binomial | Hypergeometric |
|---|
| Sampling | With replacement | Without replacement |
| Trials | Independent | Dependent |
| Usage | Large population | Finite population |
| Approximation | - | Binomial when n/N small |
When N≫n: Hyp(N,n,m)≈Bin(n,m/N)
Definition
X∼Unif{1,2,…,N} takes each integer from 1 to N with equal probability.
PMF
P(X=k)=N1,k∈{1,2,…,N}
Parameters
Some versions use {a,a+1,…,b} with N=b−a+1.
Expectation
E[X]=2N+1
Variance
Var(X)=12N2−1
Example: Die Roll
A fair die: X∼Unif{1,2,3,4,5,6}.
E[X]=27,Var(X)=1235
Example: Random Digit
A random digit from 0 to 9: X∼Unif{0,1,…,9}.
E[X]=29=4.5
Example: Tank Problem
In the tank estimation problem, captured serial numbers are assumed to come from Unif{1,2,…,N}, where we want to estimate the unknown N.
Summary Table
| Distribution | PMF | Mean | Variance |
|---|
| NegBin(r,p) | (r−1n−1)(1−p)n−rpr | r/p | r(1−p)/p2 |
| Hyp(N,n,m) | (nN)(im)(n−iN−m) | nm/N | Nnm(1−Nm)N−1N−n |
| Unif{1,…,N} | 1/N | (N+1)/2 | (N2−1)/12 |