The Excel Hypgeomdist function returns the value of the hypergeometric distribution for a given number of successes from a sample of a population.
Syntax: HYPGEOMDIST( sample_s, number_sample,
population_s, number_pop )
Where the function arguments are:
|sample_s||–||The number of successes in the sample|
|number_sample||–||The size of the sample|
|population_s||–||The number of successes in the population|
|number_pop||–||The population size|
The above arguments should all be integers. If these values are supplied as decimals, they are truncated to integers by Excel.
Hypgeomdist Function Example
Imagine you have a bag, containing 4 red balls and 8 green balls. If you remove 4 balls from the bag, the probability that you have selected exactly n red balls can be calculated by the Excel Hypgeomdist function.
This is shown in cells A2-A5 of the spreadsheet on the right. The formulas are shown in the upper spreadsheet and the results are shown in the spreadsheet below.
Hypgeomdist Function Errors
If you get an error from the Excel Hypgeomdist function this is likely to be one of the following :
|#NUM!||–||Occurs if either:
|#VALUE!||–||Occurs if any of the supplied arguments are not recognised as numeric values|