NORM_DIST
function NORM_DIST(
arg1: number = null,
arg2: number = null,
arg3: number = null,
arg4: boolean = null,
): number
Description
Returns the normal distribution for the specified mean and standard deviation.
Parameters
- arg1
number
null The value for which the distribution will be returned.
- arg2
number
null The arithmetic mean of the distribution.
- arg3
number
null The standard deviation of the distribution, a positive number.
- arg4
boolean
null A logical value (true or false) that determines the function form. If it is true, the function returns the cumulative distribution function. If it is false, the function returns the probability mass function.
Returns
number
Try It
const oWorksheet = Api.GetActiveSheet();
var valueArr = [36, 6, 7, false];
// Place the numbers in cells
for (var i = 0; i < valueArr.length; i++) {
oWorksheet.GetRange("A" + (i + 1)).SetValue(valueArr[i]);
}
//method params
var x = oWorksheet.GetRange("A1").GetValue();
var mean = oWorksheet.GetRange("A2").GetValue();
var standardDeviation = oWorksheet.GetRange("A3").GetValue();
var cumulative = oWorksheet.GetRange("A4").GetValue();
var oFunction = Api.GetWorksheetFunction();
var normalDist = oFunction.NORM_DIST(x, mean, standardDeviation, cumulative);
oWorksheet.GetRange("C1").SetValue(normalDist);