If the binomial distribution can be treated as from random sampling with replacement from a population of size NN, SS of which are successes and S/N=pS/N = p, then the hypergeometric distribution models the number of successes from random sampling without replacement.

P(xn,N,S)=(Sx)(NSnx)(Nn),x=max(0,nN+S),,min(n,S)\mathbb{P}(x|n,N,S)=\frac{\binom{S}{x}\binom{N-S}{n-x}}{\binom{N}{n}}, \\ x=\max(0,n-N+S), \dots, \min(n,S)

记为 XHypergeometric(n,N,S)X\sim \text{Hypergeometric}(n,N,S).令 p=SNp=\frac{S}{N},其期望和方差为

μX=np,σX2=np(1p)NnN1\mu_X = np,\\ \sigma^2_X=np(1-p)\frac{N-n}{N-1}

Joint Distributed Discrete Random Variables

假设两个变量 X,YX,Y,Marginal Probability Distribution of XX 定义为

P(X)=YSYP(X,Y)\mathbb{P}(X)=\sum_{Y\in S_Y}\mathbb{P}(X,Y)