跳到主要内容

BINOM_DIST_RANGE

Returns the probability of a trial result using a binomial distribution.

Syntax

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

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | numberThe number of independent trials.
arg2RequiredApiRange | ApiName | numberThe probability of success on each trial.
arg3RequiredApiRange | ApiName | numberThe minimum number of successes in the trials to calculate probability for, a numeric value greater than or equal to 0.
arg4OptionalApiRange | ApiName | numberThe maximum number of successes in the trials to calculate probability for,\ a numeric value greater than the minimum number of successes and less than or equal to trials.

Returns

number

Example

let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.BINOM_DIST_RANGE(60, 0.75, 45, 50));