Skip to main content

HYPGEOMDIST

Returns the hypergeometric distribution.

Syntax

expression.HYPGEOMDIST(arg1, arg2, arg3, arg4);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | numberThe number of successes in the sample.
arg2RequiredApiRange | ApiName | numberThe size of the sample.
arg3RequiredApiRange | ApiName | numberThe number of successes in the population.
arg4RequiredApiRange | ApiName | numberThe population size.

Returns

number

Example

Calculate the hypergeometric distribution probability in a spreadsheet.

// How do I find the probability using a hypergeometric distribution in a spreadsheet?

// Return the hypergeometric distribution value for a statistical analysis in a spreadsheet.

let worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
worksheet.GetRange("A1").SetValue(func.HYPGEOMDIST(2, 3, 3, 12));