Hypergeometric Distribution

Author

Eric W. Weisstein
September 19, 2008

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Statistics/HypergeometricDistribution.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/HypergeometricDistribution.html.

©2008 Wolfram Research, Inc. except for portions noted otherwise

Plot

BarChart[Table[PDF[HypergeometricDistribution[i,10,20],i],{i,1,10}],BarGroupSpacing->0,PlotRange->All,Ticks->None]

36 Pick-6 Lottery

?HypergeometricDistribution

PDF[HypergeometricDistribution[N,n,res],i]

p=With[{N=6,res=36,n=6},
Table[PDF[HypergeometricDistribution[N,n,res],i],{i,0,N}]
]

p//N

1/#-1&/@p

Plus@@p

Stats

Stats[HypergeometricDistribution[N,n,m+n],i]//FullSimplify//StatsForm//TraditionalForm

PDF

PDF[HypergeometricDistribution[N,n,m+n],i]

FunctionExpand[%]/.Gamma[x_]:>(x-1)!

CDF

V6

CDF[HypergeometricDistribution[N,n,m+n],i]

FullSimplify[(∑_($3=Max[0,-m+N])^(Min[n,N,x]))((Binomial[m+n-N,-$3+n] Binomial[N,$3])/(Binomial[m+n,n])),(m|n|N|x)∈Integers&&N≤m+n&&N≥0&&m≥0&&n≥0&&x>0]

V7

CDF[HypergeometricDistribution[N,n,m+n],i]

Characteristic Function

CharacteristicFunction[HypergeometricDistribution[N,n,m+n],t]

Mean

V6

FullSimplify[Sum[((Binomial[m,N-i] Binomial[n,i])/(Binomial[m+n,N])) i,{i,0,N}]]

V7

Sum[((Binomial[m,N-i] Binomial[n,i])/(Binomial[m+n,N])) i,{i,0,N}]

Variance

V6

FullSimplify[Sum[((Binomial[m,N-i] Binomial[n,i])/(Binomial[m+n,N])) (i-((n N)/(m+n)))^2,{i,0,N}]]

V7

Sum[((Binomial[m,N-i] Binomial[n,i])/(Binomial[m+n,N])) (i-((n N)/(m+n)))^2,{i,0,N}]

FullSimplify[%]

Covariance

Sum[Piecewise[{{-((m n)/((((n+m))^2)(n+m-1))),i≠j}}],{i,N},{j,N}]

cov=Sum[Piecewise[{{x,i≠j}}],{i,N},{j,N}]

FullSimplify[cov]

Simplify[cov,N==1]

FullSimplify[cov,N>1]

FullSimplify[cov,N>2]