跳到主要内容

BETA_DIST

Returns the beta probability distribution function.

Syntax

expression.BETA_DIST(arg1, arg2, arg3, arg4, arg5, arg6);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | numberThe value between A and B at which to evaluate the function.
arg2RequiredApiRange | ApiName | numberThe alpha parameter of the distribution which must be greater than 0.
arg3RequiredApiRange | ApiName | numberThe beta parameter of the distribution which must be greater than 0.
arg4RequiredApiRange | ApiName | booleanSpecifies if this is the cumulative distribution function (-true) or the probability density function (-false).
arg5OptionalApiRange | ApiName | numberAn optional lower bound to the interval of x (A). If omitted, it is equal to 0.
arg6OptionalApiRange | ApiName | numberAn optional upper bound to the interval of x (B). If omitted, it is equal to 1.

Returns

number

Example

let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
let ans = func.BETA_DIST(0.4, 4, 5, false);
worksheet.GetRange("B2").SetValue(ans);