TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

HYPGEOM_DIST

HYPGEOM_DIST(arg1, arg2, arg3, arg4, arg5) → { number }

Returns the hypergeometric distribution.

Parameters:

Name Type Description
arg1 number

The number of successes in the sample.

arg2 number

The size of the sample.

arg3 number

The number of successes in the population.

arg4 number

The population size.

arg5 boolean

A logical value (true or false) that determines the function form. If it is true, the function returns the cumulative distribution function. If it is false, the function returns the probability mass function.

Returns:

Type
number

Example

Copy code
builder.CreateFile("xlsx");
var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
oWorksheet.GetRange("A1").SetValue(oFunction.HYPGEOM_DIST(2, 3, 3, 12, true));
builder.SaveFile("xlsx", "HYPGEOM_DIST.xlsx");
builder.CloseFile();

Resulting document