title | keywords | f1_keywords | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|
WorksheetFunction.HypGeom_Dist method (Excel) |
vbaxl10.chm137406 |
|
|
83fd3d7f-f9f0-fa49-863e-7ddd604b4de7 |
05/23/2019 |
medium |
Returns the hypergeometric distribution. HypGeom_Dist returns the probability of a given number of sample successes, given the sample size, population successes, and population size. Use HypGeom_Dist for problems with a finite population, where each observation is either a success or a failure, and where each subset of a given size is chosen with equal likelihood.
expression.HypGeom_Dist (Arg1, Arg2, Arg3, Arg4, Arg5)
expression A variable that represents a WorksheetFunction object.
Name | Required/Optional | Data type | Description |
---|---|---|---|
Arg1 | Required | Double | Sample_s - the number of successes in the sample. |
Arg2 | Required | Double | Number_sample - the size of the sample. |
Arg3 | Required | Double | Population_s - the number of successes in the population. |
Arg4 | Required | Double | Number_population - the population size. |
Arg5 | Optional | Variant | Cumulative - a logical value that determines the form of the function. If cumulative is True, HypGeom_Dist returns the cumulative distribution function; if False, it returns the probability mass function. |
Double
All arguments are truncated to integers.
If any argument is nonnumeric, HypGeom_Dist returns the #VALUE! error value.
If sample_s < 0 or sample_s is greater than the lesser of number_sample or population_s, HypGeom_Dist returns the #NUM! error value.
If sample_s is less than the larger of 0 or (number_sample - number_population + population_s), HypGeom_Dist returns the #NUM! error value.
If number_sample ≤ 0 or number_sample > number_population, HypGeom_Dist returns the #NUM! error value.
If population_s ≤ 0 or population_s > number_population, HypGeom_Dist returns the #NUM! error value.
If number_population ≤ 0, HypGeom_Dist returns the #NUM! error value.
The equation for the hypergeometric distribution is as follows, where:
- x = sample_s
- n = number_sample
- M = population_s
- N = number_population
HypGeom_Dist is used in sampling without replacement from a finite population.
[!includeSupport and feedback]