Skip to main content

BINOMDIST

Returns the individual term binomial distribution probability.

Syntax

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

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | numberThe number of successes in trials.
arg2RequiredApiRange | ApiName | numberThe number of independent trials.
arg3RequiredApiRange | ApiName | numberThe probability of success on each trial.
arg4RequiredApiRange | ApiName | booleanSpecifies if this is the cumulative distribution function (true) or the probability mass function (false).

Returns

number

Example

Calculate the probability of exactly N successes in independent trials in a spreadsheet.

// How do I find the chance of a specific number of successes occurring in a spreadsheet?

// Evaluate the likelihood of an outcome appearing a fixed number of times in a spreadsheet.

let worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
worksheet.GetRange("A1").SetValue(func.BINOMDIST(50, 67, 0.45, false));