# Hypergeometric Distribution

We use the Hypergeometric Distribution to answer the following question:

- Given $N$ total objects, where $r$ of them are considered successes, and in $n$ trials, what is the probability you draw $k$ successes without replacement, i.e. $P(X=k)$?

Hypergeometric Distribution (Definition)

We say $X∼HGeo(N,r,n)$, where:

- $X$ is the number of observed successes.
- $n$ objects are randomly selected from $N$ total objects without replacement.
- There are only objects of two types: successes or failures. There are $r$ successes.

p.m.f. of $X$: $P(X=k)=(nN )(kr )(n−kN−r ) $

Expectation and Variance

- $E(X)=Nnr $
- $Var(X)=Nnr (1−Nr )N−1N−n $

If it was with replacement, we can convert $HGeo(N,r,n)$ to $Bin(n,r/N)$, the Binomial Distribution