跳到主要内容

CRITBINOM

返回累积二项分布大于或等于条件值的最小值。

语法

expression.CRITBINOM(arg1, arg2, arg3);

expression - 表示 ApiWorksheetFunction 类的变量。

参数

名称必需/可选数据类型默认值描述
arg1必需ApiRange | ApiName | number伯努利试验的次数。
arg2必需ApiRange | ApiName | number每次试验成功的概率,一个介于 0 和 1 之间(含 0 和 1)的数字。
arg3必需ApiRange | ApiName | number标准值,一个介于 0 和 1 之间(含 0 和 1)的数字。

返回值

number

示例

查找电子表格中满足概率阈值的最小数字。

// What is the minimum value where cumulative probability exceeds your target in a spreadsheet?

// Identify the threshold value for a binomial distribution in a spreadsheet.

let worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
let ans = func.CRITBINOM(678, 0.1, 0.007);
worksheet.GetRange("B2").SetValue(ans);