The function HyperGeoDistriDensity returns the density value of the hypergeometric distribution. The parameter p denotes the probability of the occurrence of an interesting case. The parameter npop specifies the total number of cases. The parameter nsample specifies the number of observations drawn from the population of npop cases. Finally, the parameter k defines the number of interesting cases to be expected.
The product p times npop must be an integer and equals the number of interesting cases in the population.
The following figure shows the probability distribution for an experiment with a total of 20 objects, 8 of these being of blue color. The points show the probability to draw exactly k blue objects if the sample size is 8.
For this example the parameters of the hypergeometric distribution have the following values:
p = 0.4
npop = 20
nsample = 8
k = 0..10