Properties of the Distribution
Calculation of Mean and Variance
Calculating E( X ), the expectation or mean of the hypergeometric( G, B, n ) distribution.
> restart;
> with(plots):
> f(x):=HypergeometricPDF(G,B,n,x);
> EX:=simplify(sum(x*f(x),x=0..G));
Calculating Var( X ), the variance of the Hypergeometric( G, B, n ).
We will employ the formula: Var( X ) = E( ) -
> EXX:=simplify(sum(x^2*f(x),x=0..G));
> VarX:=simplify(EXX-EX^2);