Share via


WorksheetFunction.HypGeomDist Method (Excel)

Returns the hypergeometric distribution. HYPGEOMDIST returns the probability of a given number of sample successes, given the sample size, population successes, and population size. Use HYPGEOMDIST 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.

Important

This function has been replaced with one or more new functions that may provide improved accuracy and whose names better reflect their usage. This function is still available for compatibility with earlier versions of Excel. However, if backward compatibility is not required, you should consider using the new functions from now on, because they more accurately describe their functionality.

For more information about the new function, see the HypGeom_Dist method.

Syntax

expression .HypGeomDist(Arg1, Arg2, Arg3, Arg4)

expression A variable that represents a WorksheetFunction object.

Parameters

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.

Return Value

Double

Remarks

  • All arguments are truncated to integers.

  • If any argument is nonnumeric, HYPGEOMDIST returns the #VALUE! error value.

  • If sample_s < 0 or sample_s is greater than the lesser of number_sample or population_s, HYPGEOMDIST returns the #NUM! error value.

  • If sample_s is less than the larger of 0 or (number_sample - number_population + population_s), HYPGEOMDIST returns the #NUM! error value.

  • If number_sample ≤ 0 or number_sample > number_population, HYPGEOMDIST returns the #NUM! error value.

  • If population_s ≤ 0 or population_s > number_population, HYPGEOMDIST returns the #NUM! error value.

  • If number_population ≤ 0, HYPGEOMDIST returns the #NUM! error value.

  • The equation for the hypergeometric distribution is: Ff836173.awfhypge_ZA06051151(en-us,office.14).gifwhere: x = sample_s n = number_sample M = population_s N = number_population HYPGEOMDIST is used in sampling without replacement from a finite population.

See Also

Concepts

WorksheetFunction Object

WorksheetFunction Object Members