<< distfun_hygernd Hypergeometric distfun_hygetable >>

distfun >> distfun > Hypergeometric > distfun_hygestat

distfun_hygestat

Hypergeometric mean and variance

Calling Sequence

MN = distfun_hygestat(M,k,N)
[MN,V] = distfun_hygestat(M,k,N)

Parameters

M :

a matrix of doubles, the size of total population. M belongs to the set {0,1,2,3........}

k :

a matrix of doubles, the number of success states in the population. k belongs to the set {0,1,2,3,.......M-1,M}

N :

a matrix of doubles, the total number of draws in the experiment. N belongs to the set {0,1,2,3.......M-1,M}

MN :

a matrix of doubles, the mean

V :

a matrix of doubles, the variance

Description

Computes statistics from the Hypergeometric distribution.

Any scalar input argument is expanded to a matrix of doubles of the same size as the other input arguments.

The Mean and Variance of the Hypergeometric Distribution are

\begin{eqnarray}
MN &=& N \frac{k}{M} \\
V &=& N \frac{k}{M} \left(1-\frac{k}{M}\right) \frac{M-N}{M-1}
\end{eqnarray}

The expression (M-N)/(M-1) is called the correction factor. This comes from the comparison with the variance of the binomial distribution with parameters N and pr=k/M.

Examples

//Accuracy test
M = [50 60 70]
N = [20 30 40]
k = [10 25 35]
[MN,V] = distfun_hygestat ( M,N,k )
V = [1.9591837 3.7076271 4.3478261]
MN = [4 12.5 20]

Bibliography

http://en.wikipedia.org/wiki/Hypergeometric_distribution

Authors


Report an issue
<< distfun_hygernd Hypergeometric distfun_hygetable >>