<< distfun_hygestat Hypergeometric Kolmogorov-Smirnov >>

distfun >> distfun > Hypergeometric > distfun_hygetable

distfun_hygetable

Print a contingency table.

Calling Sequence

distfun_hygetable(x,M,k,N)

Parameters

x :

a 1x1 matrix of doubles, the number of successful draws in the experiment. x belongs to the set [0,min(k,N)]

M :

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

k :

a 1x1 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 1x1 matrix of doubles, the total number of draws in the experiment. N belongs to the set {0,1,2,3.......M-1,M}

Description

Prints a contingency table of the inputs, for the corresponding parameters.

_________   Drawn    Not Drawn    Total
Successes   x        k-x          k
Failures    N-x      M+x-N-k      M-k
Total       N        M-N          M

If the number of successes x in the sample is too small, then a warning is printed. In this case, the probability associated with x is zero.

Examples

distfun_hygetable(3,9,5,6)

// A warning is printed:
// distfun_hygetable(0,9,5,6)

Bibliography

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

Authors


Report an issue
<< distfun_hygestat Hypergeometric Kolmogorov-Smirnov >>